question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show equalizer icon on amp-story videos containing sound

See original GitHub issue

The 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:closed
  • Created 6 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dreamofabearcommented, Dec 8, 2017

@sanjsanj Feel free to give it a go! Let me know if you have any questions.

1reaction
sanjsanjcommented, Dec 8, 2017

Is this issue available to be picked up please? I’ve only done a GFI involving amp-story so far.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found