Closed Bug 1580944 Opened 2 years ago Closed 2 years ago

Require user gesture for getDisplayMedia()


(Core :: WebRTC: Audio/Video, enhancement, P2)




Tracking Status
firefox72 --- fixed


(Reporter: jib, Assigned: jib, NeedInfo)



(Keywords: dev-doc-complete, site-compat)


(1 file)

With w3c/mediacapture-screen-share#106, the spec now requires a user gesture for getDisplayMedia(). Without one, it must reject with InvalidStateError.

Keywords: site-compat
Assignee: nobody → jib
Regressions: 1597285
Pushed by
Require user gesture for getDisplayMedia(). r=pehrsons,tnguyen,ng
Created web-platform-tests PR for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Upstream PR was closed without merging

Backed out changeset 1f4bac75290e (bug 1580944) for wpt failures at screen-capture/feature-policy.https.html.

Push with failure:

Failure log:

Backout link:

[task 2019-11-19T07:11:09.585Z] 07:11:09     INFO - TEST-START | /screen-capture/feature-policy.https.html
[task 2019-11-19T07:11:09.601Z] 07:11:09     INFO - Setting pref (true)
[task 2019-11-19T07:11:09.617Z] 07:11:09     INFO - Setting pref (true)
[task 2019-11-19T07:11:09.636Z] 07:11:09     INFO - Setting pref media.navigator.permission.disabled (true)
[task 2019-11-19T07:11:09.640Z] 07:11:09     INFO - Setting pref media.navigator.streams.fake (true)
[task 2019-11-19T07:11:09.655Z] 07:11:09     INFO - Setting pref (true)
[task 2019-11-19T07:11:10.260Z] 07:11:10     INFO - 
[task 2019-11-19T07:11:10.260Z] 07:11:10     INFO - TEST-FAIL | /screen-capture/feature-policy.https.html | Default "display-capture" feature policy ["self"] allows the top-level document. - promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context."
[task 2019-11-19T07:11:10.260Z] 07:11:10     INFO - TEST-UNEXPECTED-FAIL | /screen-capture/feature-policy.https.html | Default "display-capture" feature policy ["self"] disallows cross-origin iframes. - assert_equals: expected "#NotAllowedError" but got "#Error"
[task 2019-11-19T07:11:10.261Z] 07:11:10     INFO - test_result@https://web-platform.test:8443/feature-policy/resources/featurepolicy.js:77:18
[task 2019-11-19T07:11:10.261Z] 07:11:10     INFO - handler@https://web-platform.test:8443/feature-policy/resources/featurepolicy.js:45:31
[task 2019-11-19T07:11:10.261Z] 07:11:10     INFO - Test.prototype.step@https://web-platform.test:8443/resources/testharness.js:1908:25
[task 2019-11-19T07:11:10.261Z] 07:11:10     INFO - Test.prototype.step_func/<@https://web-platform.test:8443/resources/testharness.js:1932:35
[task 2019-11-19T07:11:10.770Z] 07:11:10     INFO - TEST-OK | /screen-capture/feature-policy.https.html | took 1187ms
[task 2019-11-19T07:11:11.453Z] 07:11:11     INFO - Closing logging queue
[task 2019-11-19T07:11:11.454Z] 07:11:11     INFO - queue closed
[task 2019-11-19T07:11:11.500Z] 07:11:11     INFO - Setting up ssl
[task 2019-11-19T07:11:11.617Z] 07:11:11     INFO - certutil | 
[task 2019-11-19T07:11:11.718Z] 07:11:11     INFO - certutil | 
[task 2019-11-19T07:11:11.734Z] 07:11:11     INFO - certutil | 
[task 2019-11-19T07:11:11.734Z] 07:11:11     INFO - Certificate Nickname                                         Trust Attributes
[task 2019-11-19T07:11:11.734Z] 07:11:11     INFO -                                                              SSL,S/MIME,JAR/XPI
[task 2019-11-19T07:11:11.734Z] 07:11:11     INFO - 
[task 2019-11-19T07:11:11.734Z] 07:11:11     INFO - web-platform-tests                                           CT,, 
[task 2019-11-19T07:11:11.734Z] 07:11:11     INFO - 
[task 2019-11-19T07:11:14.675Z] 07:11:14     INFO - adb Granting important runtime permissions to org.mozilla.geckoview.test
[task 2019-11-19T07:11:15.949Z] 07:11:15     INFO - adb launch_application: am start -W -n org.mozilla.geckoview.test/org.mozilla.geckoview.test.TestRunnerActivity -a android.intent.action.MAIN --es env9 MOZ_DISABLE_NONLOCAL_CONNECTIONS=1 --es env8 R_LOG_DESTINATION=stderr --es args "-no-remote -profile /sdcard/tests/profile --marionette about:blank" --es env3 MOZ_HIDE_RESULTS_TABLE=1 --es env2 R_LOG_VERBOSE=1 --es env1 MOZ_WEBRENDER=0 --es env0 MOZ_CRASHREPORTER=1 --es env7 MOZ_CRASHREPORTER_SHUTDOWN=1 --es env6 MOZ_IN_AUTOMATION=1 --es env5 MOZ_LOG=signaling:3,mtransport:4,DataChannel:4,jsep:4 --es env4 STYLO_THREADS=4 --ez use_multiprocess True --es env12 R_LOG_LEVEL=6 --es env11 MOZ_PROCESS_LOG=/tmp/tmp43G6iNpidlog --es env10 MOZ_CRASHREPORTER_NO_REPORT=1
Flags: needinfo?(jib)
Regressions: 1597658
Pushed by
Require user gesture for getDisplayMedia(). r=pehrsons,tnguyen,ng
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Upstream PR merged by moz-wptsync-bot
Flags: needinfo?(jib)

Can this be disabled with a config controlled from selenium?

So it doesn't look like there's a pref for disabling this right now, but I feel like we wouldn't be opposed to adding one for the automation use case. Probably Jan-Ivar's call to make, though. Can you file a new bug for that?

Flags: needinfo?(damencho)
Depends on: 1679735
Depends on: 1705289
You need to log in before you can comment on or make changes to this bug.