captureStream() for cross-origin video/audio fails
Reported by
s.h.h.n....@gmail.com,
Feb 26 2018
|
|||||||
Issue descriptionUserAgent: 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:
,
Feb 26 2018
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...!!
,
Mar 5 2018
,
Mar 7 2018
,
May 25 2018
,
Jun 25 2018
,
Jan 7
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 |
|||||||
Comment 1 by krajshree@chromium.org
, Feb 26 2018