Can't play YouTube video on mobile phone twice when rel = 0

The relsetting in the YouTube API determines whether related videos are displayed at the end. When the rel=0video returns to the thumbnail using the play button.

However, on mobile devices (tested on iPhone / iPad / Fire Tablet), when the video returns to thumbnail, it cannot be played a second time. He just does nothing.

I reported the problem to Google , but there was nothing left after a few days.

I had to resort to destroying the video and recreating it, but this created a kind of vile flicker.

My experience with YouTube is that they never end up fixing anything related to iOS, so I was wondering if there was any other trick to prevent this.

Testing Page

+4
source share
3 answers

- , , , , , , script . . . , . ... , . , API YouTube "Events" "Listeners", , , : "onStateChange".

When onStateChange = "ended" () , . javascript. API .

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

loop playlist. , .

, - : http://www.youtube.com/embed/ {VIDEO_ID}? wmode = opaque & loop = 1 & version = 3 & playlist = {VIDEO_ID}

, !

+2

YouTube.

Now I can play the video several times (on multiple devices) without getting stuck. I was too busy wondering why my question had so little attention that I forgot to check again to make sure it was fixed; -)

+1
source

Source: https://habr.com/ru/post/1606001/


All Articles