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>