Closed Bug 1611031 Opened 1 month ago Closed 1 month ago

No need to check controller's playback state when receiving `ePlay` and `ePause`

Categories

(Core :: Audio/Video: Playback, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The check here was used to prevent calling play or pause during playing or pausing.

However, according to the spec [1], even if media session is playing, we would still want to trigger its play action handler when play action happens. So we should forward all media control key events to the content, not to block any of them.

For the non-media session senario, it's not harmful to dispatch play or pause again, because calling play on playing media or calling pause on paused media won't take any effect.

[1] https://w3c.github.io/mediasession/#handle-media-session-action

The check here was used to prevent calling play or pause during playing or pausing.

However, according to the spec [1], even if media session is playing, we would still want to trigger its play action handler when play action happens. So we should forward all media control key events to the content, not to block any of them.

For the non-media session senario, it's not harmful to dispatch play or pause again, because calling play on playing media or calling pause on paused media won't take any effect.

[1] https://w3c.github.io/mediasession/#handle-media-session-action

Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/37c53e8a0382
always trigger corespending controller method when receving media control key events. r=chunmin
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.