Closed Bug 1543128 Opened 6 years ago Closed 6 years ago

Add a no-controls <video> UAWidget binding to show the Picture-in-Picture toggle

Categories

(Toolkit :: Video/Audio Controls, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

(Depends on 1 open bug, Regressed 1 open bug)

Details

Attachments

(5 files)

This will require the following:

  1. We'll need to fire the UAWidgetSetupOrChange event even if the <video> has no controls

  2. We'll need to choose the right underlying UAWidget implementation for the case where we have no controls on Desktop

  3. We'll need to adjust the PictureInPictureToggleChild to monitor and fire events on the no-controls <video> element when it needs to display or hide the toggle (since we currently can't trust that the <video> element itself will actually receive these mouse events - at least, not until bug 1539652 is fixed).

  4. In order to detect clicks on the Picture-in-Picture toggle, we'll have to do some gymnastics to do a visibility hit test to see if the user is actually clicking on the toggle, rather than something on top of the toggle. This will require some slight modifications to nsIDOMWindowUtils.nodesForRect, and the things it calls.

Assignee: nobody → mconley
Priority: -- → P1
Type: defect → enhancement
Type: enhancement → task
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1692fc6491a0 Fire UAWidgetSetupOrChange for the no-controls <video> case on Desktop. r=jya https://hg.mozilla.org/integration/autoland/rev/a2e73d143aba Add a no-controls <video> UAWidget binding to show the Picture-in-Picture toggle. r=jaws https://hg.mozilla.org/integration/autoland/rev/aeb23f8f45fb Get rid of most of the AnonymousContent toggle implementation, but leave some things stubbed out for a later patch. r=jaws,zbraniecki https://hg.mozilla.org/integration/autoland/rev/cea8c1af70ad Have PictureInPictureToggleChild set hover states on the no-controls <video> widget manually. r=jaws https://hg.mozilla.org/integration/autoland/rev/ce3a15e1b737 Have PictureInPictureChild detect clicks on Picture-in-Picture toggle if visible. r=jaws

Backed out for /test_setSinkId.html - media failures,

backout: https://hg.mozilla.org/integration/autoland/rev/5472f0a2d39db5d0854a0af0d3eedf930b685c85

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=ce3a15e1b7373a147f13706856511f2e4bc07261&searchStr=mochitest-media

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=240102874&repo=autoland&lineNumber=13838

[task 2019-04-13T03:11:11.969Z] 03:11:11 INFO - Found 1 output devices
[task 2019-04-13T03:11:11.969Z] 03:11:11 INFO - TEST-PASS | dom/media/tests/mochitest/test_setSinkId.html | More than one output device found
[task 2019-04-13T03:11:11.969Z] 03:11:11 INFO - Buffered messages finished
[task 2019-04-13T03:11:11.969Z] 03:11:11 INFO - TEST-UNEXPECTED-FAIL | dom/media/tests/mochitest/test_setSinkId.html | Initial value is empty string - got undefined, expected ""
[task 2019-04-13T03:11:11.969Z] 03:11:11 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:320:16
[task 2019-04-13T03:11:11.970Z] 03:11:11 INFO - @dom/media/tests/mochitest/test_setSinkId.html:33:5
[task 2019-04-13T03:11:11.970Z] 03:11:11 INFO - asyncrunTestWhenReady/<@dom/media/tests/mochitest/head.js:473:41
[task 2019-04-13T03:11:11.970Z] 03:11:11 INFO - promise callback
runTestWhenReady@dom/media/tests/mochitest/head.js:473:25
[task 2019-04-13T03:11:11.970Z] 03:11:11 INFO - runTest/<@dom/media/tests/mochitest/mediaStreamPlayback.js:176:15
[task 2019-04-13T03:11:11.971Z] 03:11:11 INFO - promise callbackrunTest@dom/media/tests/mochitest/mediaStreamPlayback.js:176:4
[task 2019-04-13T03:11:11.971Z] 03:11:11 INFO - @dom/media/tests/mochitest/test_setSinkId.html:20:3
[task 2019-04-13T03:11:11.971Z] 03:11:11 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-04-13T03:11:11.972Z] 03:11:11 INFO - TEST-UNEXPECTED-FAIL | dom/media/tests/mochitest/test_setSinkId.html | Error executing test: TypeError: audio.setSinkId is not a function @http://mochi.test:8888/tests/dom/media/tests/mochitest/test_setSinkId.html:35:21 ... async
runTestWhenReady/<@http://mochi.test:8888/tests/dom/media/tests/mochitest/head.js:473:41 ... promise callbackrunTestWhenReady@http://mochi.test:8888/tests/dom/media/tests/mochitest/head.js:473:25 ... runTest/<@http://mochi.test:8888/tests/dom/media/tests/mochitest/mediaStreamPlayback.js:176:15 ... promise callbackrunTest@http://mochi.test:8888/tests/dom/media/tests/mochitest/mediaStreamPlayback.js:176:4 ... @http://mochi.test:8888/tests/dom/media/tests/mochitest/test_setSinkId.html:20:3 ...
[task 2019-04-13T03:11:11.972Z] 03:11:11 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:275:18
[task 2019-04-13T03:11:11.973Z] 03:11:11 INFO - runTestWhenReady/<@dom/media/tests/mochitest/head.js:475:7
[task 2019-04-13T03:11:11.973Z] 03:11:11 INFO - promise callbackrunTestWhenReady@dom/media/tests/mochitest/head.js:474:6
[task 2019-04-13T03:11:11.973Z] 03:11:11 INFO - runTest/<@dom/media/tests/mochitest/mediaStreamPlayback.js:176:15
[task 2019-04-13T03:11:11.974Z] 03:11:11 INFO - promise callback
runTest@dom/media/tests/mochitest/mediaStreamPlayback.js:176:4
[task 2019-04-13T03:11:11.974Z] 03:11:11 INFO - @dom/media/tests/mochitest/test_setSinkId.html:20:3
[task 2019-04-13T03:11:11.974Z] 03:11:11 INFO - GECKO(1072) | MEMORY STAT | vsize 2698MB | residentFast 182MB | heapAllocated 23MB
[task 2019-04-13T03:11:11.975Z] 03:11:11 INFO - TEST-OK | dom/media/tests/mochitest/test_setSinkId.html | took 842ms
[task 2019-04-13T03:11:11.976Z] 03:11:11 INFO - TEST-PASS | dom/media/tests/mochitest/test_setSinkId.html | Test must leave no active gUM streams behind.
[task 2019-04-13T03:11:11.977Z] 03:11:11 ERROR - [SimpleTest.finish()] this test already called finish!
[task 2019-04-13T03:11:11.979Z] 03:11:11 INFO - TEST-UNEXPECTED-ERROR | dom/media/tests/mochitest/test_setSinkId.html | called finish() multiple times
[task 2019-04-13T03:11:11.979Z] 03:11:11 INFO - TEST-INFO

Other failure e.g.: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=240101738&repo=autoland&lineNumber=4334

Flags: needinfo?(mconley)
Flags: needinfo?(mconley)
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/15eaea4c4c08 Fire UAWidgetSetupOrChange for the no-controls <video> case on Desktop. r=jya https://hg.mozilla.org/integration/autoland/rev/3ac660e7f45c Add a no-controls <video> UAWidget binding to show the Picture-in-Picture toggle. r=jaws https://hg.mozilla.org/integration/autoland/rev/1f09366dd6bd Get rid of most of the AnonymousContent toggle implementation, but leave some things stubbed out for a later patch. r=jaws,zbraniecki https://hg.mozilla.org/integration/autoland/rev/47c6930938a7 Have PictureInPictureToggleChild set hover states on the no-controls <video> widget manually. r=jaws https://hg.mozilla.org/integration/autoland/rev/932333a30c71 Have PictureInPictureChild detect clicks on Picture-in-Picture toggle if visible. r=jaws
Depends on: 1544345
Regressions: 1590883
Depends on: 1686294
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: