Closed Bug 1602336 Opened 3 months ago Closed 3 months ago

Merge MediaController and TabMediaController

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The intial reason of creating MediaController as a basic class and extend this class to TabMediaController is that we would like to have a class MediaSessionController in the future, which is used to handle media session operations.

However, I found that being a media session controller or not is actually a dynamic change, so if we implement that as a different controller, we have to create and destroy controllers and switch between them a lots of times.

Ex. the tab can be controlled by TabController in the beginning, but after we create a media session, we have to use MediaSessionController. However, if we cancel the action handlers of the media session, then we have to switch back to TabController again...

Therefore, we should merge them into one class, and handle the media session part by different methods.

The intial reason of creating MediaController as a basic class and extend this class to TabMediaController is that we would like to have a class MediaSessionController in the future, which is used to handle media session operations.

However, I found that being a media session controller or not is actually a dynamic change, so if we implement that as a different controller, we have to create and destroy controllers and switch between them a lots of times.

Ex. the tab can be controlled by TabController in the beginning, but after we create a media session, we have to use MediaSessionController. However, if we cancel the action handlers of the media session, then we have to switch back to TabController again...

Therefore, we should merge them into one class, and handle the media session part by different methods.

Blocks: 1577367
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c4144927452f
merge MediaController and TabMediaController. r=chunmin
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.