1

Today, all of a sudden, I encountered the following error in our React application: HTTP Error 429. We implement Youtube links in the ReactPlayer and it appears this error means there are too many requests from our app to Youtube.

I tried working around the problem by using the iframe link for embedding Youtube videos, such as https://www.youtube.com/embed/tckGI4C7k10. This works well, with no error, but unfortunately, I am not able to access the current time or seekTo() on the player, since iframes are isolated (according to Getting Current YouTube Video Time). I want to be able to use seekTo() in order to navigate to different timestamps in the video, dynamically.

Other people seem to face the same issue, but without any clear solutions:

Does anyone know how to solve this issue? Thanks.

EDIT:

The iframe I am using is the following.

 <iframe
       src={setupRef.current.content}
       allowFullScreen
       webkitallowfullscreen="true"
       playsInline={true}
       mozallowfullscreen="true"
       allow="autoplay *; fullscreen *; encrypted-media *"
       frameBorder="0"
       style={{ width: "100%", height: "100%" }}
  />

I resolved the error by switching to another WIFI from the eduroam school WIFI I was on. But I will continue researching this by filing a support issue on Google since it should work everywhere.

swedishtea
  • 149
  • 1
  • 7
  • If I understand correctly, keep using the iframe and set the `start` parameter with the miliseconds of the time you want to set - like: `https://www.youtube.com/embed/sap2hfA-pHg?start=337` - more info [here](https://stackoverflow.com/a/54538623/4092887) - or use YouTube Ifrrame Player - [edit] your question with the code your' using. – Mauricio Arias Olave Nov 05 '20 at 16:18
  • Thanks for your answer @MauricioAriasOlave. I found the problem now, and it seemed to be resolved with using another WIFI. Since, even the ReactPlayer official demo received the same error 429 for YT links. I clarified the question according to your comment. I want to set time dynamically, so I do not think the start parameter alone is enough to do that with the iframe, since that would trigger a rerender each time I update the URL to set a new time? – swedishtea Nov 07 '20 at 15:36

0 Answers0