Skip to main content
0 votes
0 answers
11 views

on macOS, when a call is active and the microphone is in use, the API does not work with the Bluetooth headset

navigator.mediaSession.setActionHandler('play', () => { console.log('Play action received'); // Add your play logic here }); navigator.mediaSession.setActionHandler('pause', () => { ...
charanjeet singh's user avatar
0 votes
0 answers
22 views

Android Video State

I need to know for my settings application, If any video is playing in the whole System, if that is the case I need to restrict my Screensaver. I have tried media Session but its only giving the state,...
Sagar Singh's user avatar
2 votes
1 answer
247 views

MediaSession unable to play audio in android 10 and above

I am using MediaSessionService as a foreground service to play the audio (in my audio player android project). Previously I was using the ExoPlayer and a Service, that time I was fetching (getAudios(...
Ashis Kayal's user avatar
0 votes
0 answers
82 views

androidx media router and media session

I'm going through MediaRouter documentation: https://developer.android.com/media/routing/mediarouter and it looks like I must use the media router button in order to connect and create a media session....
TheDragoner's user avatar
2 votes
1 answer
570 views

Media3 ExoPlayer Update Notification Title during playback

I'm using Media3 [email protected] with a PlaybackService that extends MediaSessionService using setMediaNotificationProvider to create a Notification for API below 33. public class PlaybackService ...
Amr SubZero's user avatar
  • 1,276
3 votes
2 answers
333 views

How can I disable "seekto" in mediaSession?

Please I need help. How can I disable seekto in mediaSession? I don't know if I'm getting the name correctly but I'll attach a screenshot with an arrow pointing to it so you can understand better. ...
BarryOvb's user avatar
1 vote
1 answer
329 views

JavaScript MediaSession stops working when changing the 'src' attribute of HTMLAudioElement

I'm creating a music player web app, and I've got almost everything worked out, but I've run into a major problem. First, here's the part that works. When music begins playing, MediaSession kicks in. ...
Steohawk's user avatar
2 votes
1 answer
635 views

Media Session API on iOS 16, does it require name/URL of website?

I'm playing around with a PWA web app created in Vue and I've added this as a Home Screen bookmark to my iPhone running iOS 16. When I play an audio file in the app, I create a Media Session instance ...
tobiasg's user avatar
  • 1,063
4 votes
0 answers
169 views

Playing video in an iframe overwrites MediaSession data

We are using the Javascript MediaSession API to set the Media Data: navigator.mediaSession.metadata = new MediaMetadata(opts); This works after playing a video. The cover art and title appear on the ...
Zeus's user avatar
  • 864
0 votes
1 answer
382 views

MediaSession.Callback onPrepareFromMediaId not triggered from android auto

I'm working on an Android project that uses MediaSession and it seems no matter what I do , MediaSession.Callback's onPrepareFromMediaId function is not triggered from the Android Auto. The onGetRoot ...
George Dumitrascu's user avatar
1 vote
0 answers
115 views

How to set cover of playing song in Safari for Now playing widget?

I trying to set metadata in injected script on music website like this var updateMediaSessionMetadata = function() { if (!navigator.mediaSession) return; var coverPath = trackInfo[&...
Nikolai Nagornyi's user avatar
2 votes
1 answer
753 views

MediaButtonReceiver.buildMediaButtonPendingIntent() Giving Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or

I made an audio application that shows a foreground notification in the notification tray with play/pause controls. It was working fine but after Android S started to get the "Targeting S+ (...
Saif's user avatar
  • 397
4 votes
2 answers
1k views

web audio player - iOS next song & previous song buttons are not in control center

This is something I've researched off and on for literal years and have never been able to find the answer. I found the MediaSession api which works for populating song data but the next track and ...
b.stevens.photo's user avatar
2 votes
0 answers
181 views

How can I get lock screen controls to show up on iPhone when using multiple HTML audio elements?

I'm using four HTML audio elements in a page in a React application and would like to get the lock screen media controls (play, pause, next, previous etc.) to show up on iPhone, which I'd like to ...
Alex Fiennes's user avatar
1 vote
1 answer
956 views

navigator.mediaSession.metadata not updating after page reload

I am currently tying our audio player with mediaSession. Everything is working as it should, when I hit play and update navigator.mediaSession.metadata, it's properly displayed in the notification on ...
Vincurekf's user avatar
  • 107

15 30 50 per page