does anyone know if is it possible to render an audio waveform from a video playing in a youtube player using Javascript? Thank you!
On the client side, it's not possible to isolate the audio from the video data. You would need to get the raw audio data to be able to then process it with the WebAudio API (e.g. display it).
There are some server-side solutions (extracting audio from video, sending it back etc.), but that's not legal, as it's written in the TOS of youtube: (https://developers.google.com/youtube/terms?hl=fr)
You are not allowed to:
separate, isolate, or modify the audio or video components of any YouTube >audiovisual content made available through the YouTube API;
promote separately the audio or video components of any YouTube audiovisual >content made available through the YouTube API;
See this questions for more details: Is there a Youtube API that gives only audio?
© 2022 - 2024 — McMap. All rights reserved.