kevin-chau / TReactr

A Traktor clone in React
https://treactr.herokuapp.com
MIT License
29 stars 4 forks source link

Manipulate Youtube Audio #1

Open kevin-chau opened 7 years ago

kevin-chau commented 7 years ago

https://www.reddit.com/r/webdev/comments/4d3rvx/help_with_visualising_youtube_audio/

kevin-chau commented 7 years ago

http://stackoverflow.com/questions/41066847/unable-to-connect-to-the-video-element-in-a-youtube-iframe

kevin-chau commented 7 years ago

we can now stream youtube videos as mp4 html5 embeds in our react framework. we should be able to connect it to the web audio api now.

kevin-chau commented 7 years ago

Playback with audio works fine for standalone players, but connecting the videos to createMediaElementSource() results in a CORS error.

Enabling 'crossOrigin="anonymous"' on the html5 video player results in the video failing to load.

Without crossOrigin set, the video plays, but sound is disabled. We will need a way to insert an allow-control-allow-origin:* header before loading the video or find a different youtube to mp4 service.