-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Story mediapool] Reused videos with gain node stay muted after reuse #38206
Comments
Should be able to reset the gain node in amp-video's |
I would not implement it in My suggestion:Prevent
This won't fix stories that have the Alternative:Force all Google cached videos to have the Alternative:Keep separate video pools for videos attached to gain nodes and videos that play the audio directly. It's clear we shouldn't do this due to complexity and headaches. |
Description
When the mediapool changes the volume of a video, it connects a
gainNode
tocreateMediaElementSource
to distort the audio coming from the video. However, the gainNode and MediaElementSource need to be removed from the video before it's reused by another amp-video. Currently, reusing the mediapool video element will keep it silent.Eg: a story with 8 pages that have
noaudio
videos (that are muted) will initialize 8 mediapool videos that are all muted. All videos on pages 9+ will be muted because they reuse the same sources, and they were never unmuted.Reproduction Steps
Go to https://stories.nws.ai/1288496525/what-makes-content-good-copy-only-mp4-2/ and unmute the story, then advance until the 3rd to last video shows up (page with Andrew Robertson) and it will not be audible. The error
MediaElementAudioSource outputs zeroes due to CORS access restrictions for <video URL>
is thrown on the console.Relevant Logs
I don't believe CORS is the cause of muting because the unmuted videos shouldn't have the
createMediaElementSource
at all. This error could make videos withvolume=x
mute when in cross origin. Also when reloading the page, those videos play properly. However, MediaElementAudioSource should not process the audio from videos with audio (and novolume
attr)Browser(s) Affected
Chrome
OS(s) Affected
Mac, others?
Device(s) Affected
Macbook, others?
AMP Version Affected
latest
The text was updated successfully, but these errors were encountered: