Closed Bug 996685 Opened 10 years ago Closed 8 years ago

Report an error in the console when a cross-origin media element is used with a MediaElementAudioSourceNode

Categories

(Core :: Web Audio, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: padenot, Assigned: padenot)

References

Details

Attachments

(2 files)

This will prevent devs from wasting their time trying to figure out why there is only silence coming out of the MediaElementAudioSourceNode in Firefox when using cross-origin resources.
Attached file wip patch
Assignee: nobody → paul
See Also: → 937718
Rank: 25
Priority: -- → P2
Comment on attachment 8745377 [details]
MozReview Request: Bug 996685 - Report an error in the console when a cross-origin media element is used with a Media(ElementAudio|Stream)SourceNode. r=pehrsons

https://reviewboard.mozilla.org/r/49027/#review45829

Small nits is all I have. r+.

::: dom/locales/en-US/chrome/dom/dom.properties:98
(Diff revision 1)
>  MediaDecodeAudioDataInvalidContent=The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully.
>  # LOCALIZATION NOTE: Do not translate decodeAudioData.
>  MediaDecodeAudioDataNoAudio=The buffer passed to decodeAudioData does not contain any audio.
> +# LOCALIZATION NOTE: Do not translate HTMLMediaElement and createMediaElementAudioSourceNode.
> +MediaElementAudioSourceNodeCrossOrigin=The HTMLMediaElement passed to createMediaElementAudioSourceNode has a cross-origin resource, the node will output silence.
> +MediaStreamAudioSourceNodeCrossOrigin=The MediaStream passed to createMediaStreamSource has a cross-origin resource, the node it will output silence.

Add a "Do not translate" note here as well.

::: dom/media/webaudio/MediaStreamAudioSourceNode.cpp:182
(Diff revision 1)
>      }
>    }
>    auto stream = static_cast<AudioNodeExternalInputStream*>(mStream.get());
> +  bool enabled = subsumes || aMediaStreamTrack->GetCORSMode() != CORS_NONE;
>    stream->SetInt32Parameter(MediaStreamAudioSourceNodeEngine::ENABLE,
> -                            subsumes || aMediaStreamTrack->GetCORSMode() != CORS_NONE);
> +                            enabled);

Can you make it one line now?
Attachment #8745377 - Flags: review?(pehrsons) → review+
Pulse bot looks a bit tired, so I'm putting this in manually:

remote:   https://hg.mozilla.org/integration/mozilla-inbound/rev/910c7dab253e
https://hg.mozilla.org/mozilla-central/rev/910c7dab253e
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Target Milestone: mozilla48 → mozilla49
Depends on: 1270187
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: