Open Bug 1688507 Opened 3 years ago Updated 3 years ago

Media controller's event is racing

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

People

(Reporter: alwu, Assigned: alwu)

References

Details

In bug 1625099, I found that the test failures were caused by not resolving the promise for metadatachange.

That is because metadatachange event is racing with media controller's deactivated event. If metadatachange is dispatched before the controller gets deactivated, then the controller can receive metadatachange. If not, then the metadatachange event would be simply ignored.

The root cause of that is because we queue the task for deactivated directly on MediaController, but for other events, we need to wait for the media event like this.

That causes that those events might be dispatched later than deactivated event, even if the actual trigger point for them happened before deactivating the controller.

You need to log in before you can comment on or make changes to this bug.