Question: The `rel` parameter in YouTube API dictates whether or not related videos are shown at the end. When `rel=0` the video reverts back to the thumbnail with a play button.

However on mobile (tested on iPhone / iPad / Fire Tablet) when the video goes back to the thumbnail it cannot be played a second time. It just does nothing.

I [reported the issue to Google](https://code.google.com/p/gdata-issues/issues/detail?id=7523&can=4&colspec=API%20ID%20Type%20Status%20Priority%20Stars%20Summary) but nothing yet after a few days.

I had to resort to destroying the video and recreating it but this makes for a kind of nasty flickering.

My experience with YouTube issues is they never seem to end up fixing anything related to iOS - so I was wondering if there was any other kind of trick to prevent this.

[Test page](http://defenderrazor.com/webtests/youtube_second_playback_disallowed.htm)

Answer: 
The trouble with refreshing a webpage at a specific interval is that you dont know exactly when the video ends so you need to develop a method which the video player sends a signal when the video ends, which would then start the script to refresh the page. Otherwise you end up restarting it in the middle of the video. so personally, I would not even mess with refreshing the page. For Audio players it works ok because audio is smaller and streams more quicker. Video dont.... they always stop to buffer.
So YouTube API uses `"Events"` and `"Listeners"`, so in particular, you need to design around the Event: `"onStateChange"`. 

`When onStateChange = "ended"` (zero) the video has ended, so then you reload the video player with the same video and set it to its Ready State again.
In theory its very easy you basically need to setup and control the entire video player through javascript. And the API gives examples on that.

```
http://code.google.com/apis/youtube/js_api_reference.html
http://grizzlyweb.com/webmaster/javascripts/refresh.asp
http://code.google.com/apis/youtube/forum/

```
### Appears to have been fixed by YouTube.

I can now play the video multiple times (on multiple devices) without it getting stuck. Was too busy wondering why my question was getting so little attention that I forgot to check again to see if it was fixed ;-)