Picture-in-Picture toggle should re-evaluate visibility on video duration change
Categories
(Toolkit :: Video/Audio Controls, enhancement)
Tracking
()
People
(Reporter: mconley, Assigned: mconley)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Currently, we use some heuristics to determine whether or not to display the toggle. One heuristic we use is to only show the toggle for videos that are 45 seconds or longer. This works well on most sites, but on some sites, the duration on the video element changes after the metadata has been made available.
Live videos on https://www.cbc.ca/news, for example, are like this.
We should listen for the durationchange
event, and re-evaluate the visibility of the toggle.
Assignee | ||
Comment 1•5 years ago
|
||
Unfortuntely, this seems pretty hard to write an automated test for -
I can't seem to tease our media stack into firing durationchange
events, or tricking the video into thinking its duration has
gotten longer.
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
I did test this manually by visiting https://www.cbc.ca/news/politics/trudeau-covid19-premiers-address-1.5506473 during the live broadcast. This tests the no-controls case out of the box. I was able to test the controls case by running this in the console before clicking "play" on the video:
document.querySelectorAll("video").forEach(v => v.setAttribute("controls", true));
Comment 4•5 years ago
|
||
bugherder |
Updated•4 years ago
|
Comment 5•4 years ago
|
||
I managed to reproduce the issue using an older version of Nightly (2020-03-16) on Windows 10 x64.
I retested everything using latest Nightly 77.0a1 and Firefox 76.0b4 on macOS 10.11, Ubuntu 18.04 x64 and Windows 10 x64. The issue is not reproducing anymore.
Description
•