0

i am making a webpage with a video that plays all the time. i want this video to replay without loading the video from the internet everytime. i tried the following code:

    <iframe id="frametube" allowfullscreen="1" width="100%" height="700px" src="https://www.youtube.com/embed/xxx?version=3&loop=1&playlist=xxx&autoplay=1" frameborder="0"
        style="position:absolute;"></iframe>

but everytime the video ends, it reload again! how can i prevent this? if you check www.kolor.com the video continue playing and looping even if you turned off the internet after the first replay

user1386213
  • 951
  • 9
  • 17
  • 1
    Try the code implementation from this [SO post](http://stackoverflow.com/questions/19410789/youtube-player-api-with-loop) where you execute player.playVideo() when the video state becomes ENDED. Since you're going to play the same video throughout, this might work for you. Try looking into [service workers](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) as it has the offline first feature where it can store/cache data and use them when the internet is disconnected. – ReyAnthonyRenacia May 07 '17 at 14:25
  • Thank you @noogui, this was what i want – user1386213 May 07 '17 at 19:02
  • Possible duplicate of [Youtube player api with loop](http://stackoverflow.com/questions/19410789/youtube-player-api-with-loop) – paolo May 07 '17 at 19:38
  • This question has already been answered.
    Link: http://stackoverflow.com/questions/7281765/youtube-iframe-embed-auto-play
    – David May 08 '17 at 13:56

0 Answers0