New issue
Advanced search Search tips

Issue 816321 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Jan 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

captureStream() for cross-origin video/audio fails

Reported by s.h.h.n....@gmail.com, Feb 26 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36

Example URL:
https://test.shhnjk.com/whycapture.html

Steps to reproduce the problem:
1.  Go to https://test.shhnjk.com/whycapture.html
2. Open console and see error.

What is the expected behavior?
As per spec (https://w3c.github.io/mediacapture-fromelement/) captureStream of cross-origin video/audio should work.

What went wrong?
Chrome doesn't allow captureStream for cross-origin video/audio. This has use case such as Web Audio API.

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes

Chrome version: 64.0.3282.167  Channel: n/a
OS Version: OS X 10.13.3
Flash Version: 

Contents of chrome://gpu:
 
Labels: Needs-Triage-M64
Labels: Triaged-ET M-66 FoundIn-66 Target-66 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on Mac 10.13.3, Win-10 and Ubuntu 14.04 using chrome reported version #64.0.3282.167 and latest canary #66.0.3353.0.
This is a non-regression issue as it is observed from M60 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Cc: dalecur...@chromium.org
Components: -Internals>Media Internals>Media>Capture
Owner: m...@chromium.org
Status: Assigned (was: Untriaged)

Comment 4 by m...@chromium.org, Mar 7 2018

Components: -Internals>Media>Capture Blink>GetUserMedia
Owner: ----
Status: Available (was: Assigned)
Labels: -M-66 M-69

Comment 6 by guidou@chromium.org, Jun 25 2018

Components: -Blink>GetUserMedia Blink>MediaStream>CaptureFromElement
Owner: mcasas@chromium.org
Status: WontFix (was: Available)
Summary: captureStream() for cross-origin video/audio fails (was: captureStream for cross-origin video/audio fails)
This is a WAI, as explained in the codepen:
https://codepen.io/miguelao/pen/OrEyRm?editors=1010

https://test.shhnjk.com/whycapture.html uses a MP3 file:
  https://www.w3schools.com/tags/horse.mp3 that is not served
with a permissive 'Access-Control-Allow-Origin' header tag,
so we get an exception in the console:

 "Access to audio at 'https://www.w3schools.com/tags/horse.mp3' from 
  origin 'https://s.codepen.io' has been blocked by CORS policy: No 
  'Access-Control-Allow-Origin' header is present on the requested 
  resource."

However, 
  https://upload.wikimedia.org/wikipedia/commons/2/22/Chopin_-_Waltz_in_E_minor%2C_B_56.mp3
or even
  https://upload.wikimedia.org/wikipedia/commons/2/25/Sintel_webm_extract.webm
works because wikicommons is happy with CORS requests (i.e. it 
has Access-Control-Allow-Origin:* or similar in the response 
headers).

Note that in all cases you'll need a crossorigin="anonymous" in the 
HTMLMediaElement itself,see 
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/crossOrigin

Sign in to add a comment