annnoyboy / YouTube Waveform

Published:

Version: 1.0+7d48eae

Summary: Visualizes the audio of the YouTube video's audio.

Copyright: 2019, annnoyboy (https://openuserjs.org/users/annnoyboy)

License: MPL-2.0

"YouTube Waveform" is a YouTube plugin which implements a floating window. The floating window shows the real-time Waveform of the video's audio. The waveform is drawn using the Canvas API and the waveform data is got from the WebAudio API.

How it gets the Waveform?

The WebAudio API gets the sample data from the video's audio then streams it through AnalsyerNode. The AnalyserNode has a method called getFloatTimeDomainData which analyses the waveform data. The time-domain data ranges is in between -1.0 and 1.0.
And, the whole bitstream stuff it handles internally.

The visualisation of this workflow:

MediaElementAudioSource -> AnalyserNode -> AudioContext 

Rating: 0