Switching tracks doesn't work on test page if the current audio.src is invalid or unsupported |
|||||
Issue descriptionThis is due to the session goes inactive when audio.src is invalid or unsupported. Currently there's nothing we can do now. Because we treat the session as inactive in this situation and will not send actions to the page. I think it could be fixed by the page. When the play() promise is rejected, it tries the next track. I guess the user gesture is gone when the promise is rejected, but as long as the gesture requirement on the media element is unlocked, it should be fine. fbeaufort@, Can you try if this solution works?
,
Jan 13 2017
Here's a fix from the page: http://xxyzzzq.github.io/sandbox/media-session/full-test-with-failure.html
,
Jan 25 2017
As you can see at https://github.com/google/WebFundamentals/pull/4057/files#diff-b6ad1f10b69cb64abd579dcd65b034d8R84, we recommend setting up the media session when audio play is successful. // User interacted with the page. Let's play audio... audio.play() .then(_ => { /* Set up Media Session... */ }) .catch(error => { console.log(error) }); }); So we should be good. However this brings another issue I filed previously at https://bugs.chromium.org/p/chromium/issues/detail?id=685118
,
Jan 25 2017
The idea of "broken state" sounds good. Posted comments on that bug. However that one might not solve this issue totally, such as switching src on a very slow network, in which case no failure has occurred. FWIW we should improve audio focus and media session routing to solve this. For example, we keep the latest session alive even if it's not playing anything. In that case we'll need a "inactive" playbackState value for the web page to indicate that the session has terminated and we don't show notification for it.
,
Apr 22 2017
,
Apr 26 2017
,
Apr 26 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 27 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by zqzh...@chromium.org
, Jan 13 2017