New issue
Advanced search Search tips

Issue 619114 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 24
Components:
EstimatedDays: ----
NextAction: 2018-09-24
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

MediaElementAudioSource outputs zeroes CORS Warning Printed on subsequent loads

Reported by boush...@gmail.com, Jun 10 2016

Issue description

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

Example URL:
http://codepen.io/boushley/pen/VjeGJb

Steps to reproduce the problem:
1. Create an Audio API object
2. Set crossOrigin to "anonymous"
3. Attach a AudioContext and analyser to the Audio object.
4. Load an asset by setting "src" and start playback
5. At some future point, set "src" to a new value and begin playback of that track.

What is the expected behavior?
No warnings are printed and the analyzer returns valid data since `crossOrigin = "anonymous"` is set and the track has CORS headers on the response.

What went wrong?
The CORS warning is printed: "MediaElementAudioSource outputs zeroes due to CORS access restrictions" Although the data is still available and the analyzer still works.

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes 

Chrome version: 50.0.2661.102  Channel: stable
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 21.0 r0

This isn't really high priority, since the API still works, but it would be good to get rid of the warning message since it doesn't apply.
 

Comment 1 by tapted@chromium.org, Jun 15 2016

Components: Blink>SecurityFeature
Labels: -OS-Mac OS-All
Components: -Internals>Media Internals>Media>Source
Owner: wolenetz@chromium.org
Status: Assigned (was: Unconfirmed)
Matt, can you take a look or re-assign appropriately? 
Components: -Internals>Media>Source Blink>WebAudio
Owner: rtoy@chromium.org
Looks like a web audio error.

Comment 4 by est...@chromium.org, Nov 10 2017

Labels: Hotlist-EnamelAndFriendsFixIt

Comment 5 by est...@chromium.org, Feb 18 2018

Labels: -Hotlist-EnamelAndFriendsFixIt
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/761c75d2d607638ff53c764b4925bcca9be601d8

commit 761c75d2d607638ff53c764b4925bcca9be601d8
Author: Raymond Toy <rtoy@chromium.org>
Date: Tue Jun 05 00:28:50 2018

Redirect should not circumvent same-origin restrictions

Check whether we have access to the audio data when the format is set.
At this point we have enough information to determine this. The old approach
based on when the src was changed was incorrect because at the point, we
only know the new src; none of the response headers have been read yet.

This new approach also removes the incorrect message reported in 619114.

Bug:  826552 ,  619114 
Change-Id: I95119b3a1e399c05d0fbd2da71f87967978efff6
Reviewed-on: https://chromium-review.googlesource.com/1069540
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564313}
[add] https://crrev.com/761c75d2d607638ff53c764b4925bcca9be601d8/third_party/WebKit/LayoutTests/http/tests/security/media-element-audio-source-node-redirect-expected.txt
[add] https://crrev.com/761c75d2d607638ff53c764b4925bcca9be601d8/third_party/WebKit/LayoutTests/http/tests/security/media-element-audio-source-node-redirect.html
[modify] https://crrev.com/761c75d2d607638ff53c764b4925bcca9be601d8/third_party/WebKit/LayoutTests/http/tests/security/resources/webaudio/media-element-audio-source-node-test.js
[modify] https://crrev.com/761c75d2d607638ff53c764b4925bcca9be601d8/third_party/blink/renderer/modules/webaudio/base_audio_context.cc
[modify] https://crrev.com/761c75d2d607638ff53c764b4925bcca9be601d8/third_party/blink/renderer/modules/webaudio/base_audio_context.h
[modify] https://crrev.com/761c75d2d607638ff53c764b4925bcca9be601d8/third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.cc
[modify] https://crrev.com/761c75d2d607638ff53c764b4925bcca9be601d8/third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.h

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 6 2018

Labels: merge-merged-3440
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/93d25b7e2449ca6fd7b1c3dc003f5bfce1495559

commit 93d25b7e2449ca6fd7b1c3dc003f5bfce1495559
Author: Raymond Toy <rtoy@chromium.org>
Date: Wed Jun 06 15:48:11 2018

Redirect should not circumvent same-origin restrictions

Check whether we have access to the audio data when the format is set.
At this point we have enough information to determine this. The old approach
based on when the src was changed was incorrect because at the point, we
only know the new src; none of the response headers have been read yet.

This new approach also removes the incorrect message reported in 619114.

Bug:  826552 ,  619114 
Change-Id: I95119b3a1e399c05d0fbd2da71f87967978efff6
Reviewed-on: https://chromium-review.googlesource.com/1069540
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#564313}(cherry picked from commit 761c75d2d607638ff53c764b4925bcca9be601d8)
Reviewed-on: https://chromium-review.googlesource.com/1089070
Reviewed-by: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/branch-heads/3440@{#210}
Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733}
[add] https://crrev.com/93d25b7e2449ca6fd7b1c3dc003f5bfce1495559/third_party/WebKit/LayoutTests/http/tests/security/media-element-audio-source-node-redirect-expected.txt
[add] https://crrev.com/93d25b7e2449ca6fd7b1c3dc003f5bfce1495559/third_party/WebKit/LayoutTests/http/tests/security/media-element-audio-source-node-redirect.html
[modify] https://crrev.com/93d25b7e2449ca6fd7b1c3dc003f5bfce1495559/third_party/WebKit/LayoutTests/http/tests/security/resources/webaudio/media-element-audio-source-node-test.js
[modify] https://crrev.com/93d25b7e2449ca6fd7b1c3dc003f5bfce1495559/third_party/blink/renderer/modules/webaudio/base_audio_context.cc
[modify] https://crrev.com/93d25b7e2449ca6fd7b1c3dc003f5bfce1495559/third_party/blink/renderer/modules/webaudio/base_audio_context.h
[modify] https://crrev.com/93d25b7e2449ca6fd7b1c3dc003f5bfce1495559/third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.cc
[modify] https://crrev.com/93d25b7e2449ca6fd7b1c3dc003f5bfce1495559/third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.h

I had the same issue. Here's a minimal repro if it helps. http://jsfiddle.net/gryLvtnb/47/
Labels: Needs-Feedback
NextAction: 2018-09-24
therealbenwiley:  What version of chrome did you use?

I tested this with chrome  69.0.3497.42 and see no console messages about CORS on first or subsequent loads
The NextAction date has arrived: 2018-09-24
Status: Fixed (was: Assigned)
No additional feedback.  Closing.  Please file a new bug if this still exists.

Sign in to add a comment