Closed Bug 1621166 Opened 5 years ago Closed 5 years ago

Don't start a stop timer for the media which is being used in PIP mode

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

Details

Attachments

(5 files)

Since we added a timer to stop listening to the media control keys in bug1617033, if media has been paused after a certain period of time, then we would think that media won't need to be controlled any more.

That feature is used to relase platfom level focus for those media are not being used for a while. However, we didn't consider PIP video in this situation, if user change a video to PIP mode, then it's a clear signal that user would still want to control this video.

Therefore, we should not start a timer for the video which is being used in PIP mode.


STR.

  1. go to https://alastor0325.github.io/htmltests/autoplay_tests/autoplay_test1.html
  2. play video in the PIP mode
  3. wait for the time which is equal to the value of media.mediacontrol.stopcontrol.timer.ms

Expected.
4. video is still able to be controlled by media control keys

Actual.
4. video is not able to be controlled by media control keys

I will set this bug as P3 temporarily, I would like to spend some time considering all possible use cases of watching video in PIP mode. Eg. should we always control the PIP mode video?

Priority: -- → P3

The media element being used in the PIP mode would always display on the screen even if the the tab it belongs to is in the background, so users would have high chance to interact with it again. Therefore, we don't want to start a stop-timer to cancel media control for that element.

There are several tests using similar methods of playing/pausing media, and we should make them as util functions to share the same code.

Summary: Don't stop listening to the media control keys for the media which is being used in PIP mode → Don't start a stop timer for the media which is being used in PIP mode
See Also: → 1623486
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d192e8ccf609 part1 : add a method to know if media element is being used in PIP mode. r=bryce https://hg.mozilla.org/integration/autoland/rev/bbad080cc1ac part2 : do not stop media control for media being used in PIP mode. r=MeFisto94 https://hg.mozilla.org/integration/autoland/rev/108486872d5b part3 : make 'playMedia' and 'pauseMedia' as general utils functions. r=MeFisto94 https://hg.mozilla.org/integration/autoland/rev/224a2033ef9e part4 : add test. r=MeFisto94
Pushed by marc.streckfuss@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b17e239f9f79 Fix ESLint bustage in browser_media_control_stop_timer.js. r=MeFisto94
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: