Closed Bug 1673502 Opened 5 years ago Closed 5 years ago

Ensure MediaSession Delegate.onActivated is always dispatched first

Categories

(GeckoView :: Media, enhancement, P1)

All
Android
enhancement

Tracking

(firefox84 fixed)

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: esawin, Assigned: esawin)

References

Details

Attachments

(1 file)

Currently, the MediaSession delegate does not ensure the order of events dispatched, which may result in events like onPlay to be dispatched before onActivated.

Generally, the order of events should be controlled by Gecko, however, in the case of onActivated, this has some unwanted side effects for the integration of the GV API with A-C media components.

Let's explore a solution to at least ensure that onActivated is dispatched first.

Is there a reason for Gecko's MediaController to dispatch playback and metadata events explicitly before the activated event?

For now, we can work around this by synthesizing an onActivated event in GV for each (non-fullscreen) event called on an inactive media session, but it seems odd that Gecko doesn't dispatch them in the expected order.

Flags: needinfo?(alwu)
See Also: → 1673509

Thank for letting me know, will fix that in bug1673509.

Flags: needinfo?(alwu)
Pushed by esawin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3cab705ee635 [1.0] Ensure onActivated is called first on an inactive media session. r=geckoview-reviewers,agi
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch

Moving some media bugs to the new GeckoView::Media component.

Component: General → Media
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: