manish manish - 3 months ago 10
jQuery Question

How to reset you-tube video after playing to stop recommadations

I have one scenario. I am playing a you-tube video in iframe using embed code

<iframe width="940" height="552" src="//www.youtube.com/embed/ucXTSAUH2UE" frameborder="0" allowfullscreen></iframe>


Now if we play video and when video completes it shows suggestion videos at end. Can someone suggest me how i can stop this suggestion and reset my you-tube video again.

Lal Lal
Answer

you can simply append ?rel=0 to the end of the YouTube URL to disable related videos at the end of the video.

That is,

Replace

<iframe width="940" height="552" src="//www.youtube.com/embed/ucXTSAUH2UE" frameborder="0" allowfullscreen></iframe>

with

<iframe width="940" height="552" src="//www.youtube.com/embed/ucXTSAUH2UE?rel=0" frameborder="0" allowfullscreen></iframe>