Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3638

How to render the playback rate for a YouTube video player

$
0
0

I am working on a personal YouTube video player project and am looking at cookpete's react-player. Here is the link to the file I am referencing: https://github.com/cookpete/react-player/blob/master/src/demo/App.js.

Here's the actual player as well: https://cookpete.com/react-player/.

I'm trying to figure out how to render the playback rate on the page. cookpete's includes three buttons (1x, 1.5x, 2x) that changes the playback rate displayed, but if you use a YouTube link as the URL and change the speed with the built-in YouTube bar, the speed rendered doesn't change.

Would it be possible to render the current playback rate on the page that updates with the built-in bar? I believe there a function in the YouTube iFrame API (player.getPlaybackRate()), but since I am not using iFrame, how would I integrate this (if possible)? I've also seen some things about React refs but not sure how I'd use here.

Thank you for your time. I am new to React/API calls, so any help is greatly appreciated.


Viewing all articles
Browse latest Browse all 3638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>