New issue
Advanced search Search tips

Issue 680976 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug


Participants' hotlists:
Audio-Focus
Media-Session-API

Show other hotlists

Other hotlists containing this issue:
Hotlist-1


Sign in to add a comment

Switching tracks doesn't work on test page if the current audio.src is invalid or unsupported

Project Member Reported by zqzh...@chromium.org, Jan 13 2017

Issue description

This 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?
 
I think I can also try on my test page :)
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
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.
Owner: mlamouri@chromium.org
Owner: ----
Project Member

Comment 7 by sheriffbot@chromium.org, Apr 26 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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
Status: WontFix (was: Untriaged)

Sign in to add a comment