Show equalizer icon on amp-story videos containing sound
See original GitHub issueThe audio icon is sometimes displayed even though the page does not have audio, and the audio icon is sometimes not displayed even though the page does have audio.
The definition we’re using for whether the page has audio is found in page-element.js (copied below):
mediaElement.mozHasAudio ||
Boolean(mediaElement['webkitAudioDecodedByteCount']) ||
Boolean(mediaElement.audioTracks && mediaElement.audioTracks.length);
This is not foolproof and doesn’t work cross-browser. We can instead use a ScriptProcessorNode
in audio.js and check when audio is actually being produced by some source on the page, and display the icon at that time. At that time, we can also add a has-audio
attribute or CSS class to the page so that we don’t have to recalculate this.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Documentation: <amp-video> - amp.dev
Annotates the video as having no audio. This hides the equalizer icon that is displayed when the video has autoplay. rotate-to-fullscreen. If the...
Read more >Amp story amp-video "noaudio" attribute doesn't applied
noaudio is only an annotation to hide the equalizer icon, it doesn't mute the video. The Stories audio button mutes/unmutes all videos ......
Read more >After Effects 'Ring Music Equalizer' TUTORIAL - YouTube
In this video we will create an awesome audio visualiser/equaliser effect in After Effects...No plugins!BUY T-SHIRTS: http://www.viralkiller ...
Read more >How to Enable the EQUALIZER BUILT INTO WINDOWS 10
Hey guys this is going to be a short video where I show you how to enable the built in Equalizer in Windows...
Read more >Video Sound Equalizer - Apps on Google Play
Video Sound Equalizer is a simple apps that let's you modify audio parameters in every video file. Then you can share the result...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sanjsanj Feel free to give it a go! Let me know if you have any questions.
Is this issue available to be picked up please? I’ve only done a GFI involving amp-story so far.