Closed Bug 1580944 Opened 5 years ago Closed 4 years ago

Require user gesture for getDisplayMedia()

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: jib, Assigned: jib, NeedInfo)

References

Details

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

Attachments

(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 jbruaroey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1f4bac75290e
Require user gesture for getDisplayMedia(). r=pehrsons,tnguyen,ng
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/20314 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: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedJob=276932511&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=1f4bac75290ebf1aed98980395180250e19c01a1

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=276927492&repo=autoland

Backout link: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=bdbdb1a54bfd07f0aa792c88cc93ee6ef2881834

[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 dom.security.featurePolicy.enabled (true)
[task 2019-11-19T07:11:09.617Z] 07:11:09     INFO - Setting pref dom.security.featurePolicy.header.enabled (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 dom.security.featurePolicy.webidl.enabled (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 jbruaroey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4d512fa7b071
Require user gesture for getDisplayMedia(). r=pehrsons,tnguyen,ng
Status: NEW → RESOLVED
Closed: 4 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.

Attachment

General

Created:
Updated:
Size: