Closed Bug 1592461 Opened 4 months ago Closed 3 months ago

Create an intermediate layer to decide if we would handle media control keys by default behavior or by media session action handler

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Now we have implemented default handlers for Play(), Pause() and Stop() in MediaController. However, once sites create their own MediaSession and attach MediaSessionActionHandler to it, then we should call their MediaSessionActionHandler instead.

For now we only handle some MediaControlActions by using our custom default behaviors, however, once we have an active media session which has already been set the MediaActionHandler, then we should use those hanlders to let website decide how they should act when media action occurs.

Instead of letting the outer window to process MediaControlActions, it would be better to handle those actions all in MediaActionsHandler.

As we have removed the use of MediaControlActions in nsGlobalWindowOuter, we can remove the related included files and add other included files, which are needed, separatly on each files.

Attachment #9105101 - Attachment description: Bug 1592461 - part2 : use 'MediaActionsHandler' to handle 'MediaControlActions'. → Bug 1592461 - part2 : use 'MediaActionHandler' to handle 'MediaControlActions'.
See Also: → 1593826
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/72ce902e8c16
part1 : create an intermediate layer to encapsulate the detail of handling 'MediaControlActions' r=bzbarsky,chunmin
https://hg.mozilla.org/integration/autoland/rev/c5be1a7e7665
part2 : use 'MediaActionHandler' to handle 'MediaControlActions'. r=bzbarsky
https://hg.mozilla.org/integration/autoland/rev/84792f97d4db
part3 : included header changes. r=bzbarsky
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.