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

How to jump to a timestamp in a YouTube iFrame in React?

$
0
0

I'm trying to make a button that jumps to a specific time in an iFrame of a YouTube post, but I'm getting the error "TypeError document.getElementsById is not a function".

I've looked into the YouTube Player API but I couldn't figure out how to make it work in React.

<iframe src="https://codesandbox.io/embed/react-playground-forked-pcuxkr?fontsize=14&hidenavigation=1&theme=dark"     style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"     title="React PlayGround (forked)"     allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"     sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>

Viewing all articles
Browse latest Browse all 3831

Trending Articles



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