So, to know exactly what I'm trying to do, I suppose it's best to look at my code below:
<iframe class="youtube-player" type="text/html" width="280" height="35" src="http://www.youtube.com/embed/XejH7tnOVKA?vq=tiny&autoplay=1&fs=0&iv_load_policy=3&loop=1&rel=0&showinfo=0&color=white&autohide=0&disablekb=1&end=10&playlist=XejH7tnOVKA" frameborder="0"></iframe>
Basically everything works, except the following happens: The video starts playing, it ends at 10 seconds, it loops (restarts), and from that point on it just replays the whole video, instead of stopping at 10 seconds.
Is there any workaround for this? I've really searched all of the web, but I haven't been able to find anything.
PS: I used a blank video, because I don't feel like sharing the video I want to use for this. The 10 seconds is also only for ease of testing.
Best Answer
I think the below code is exactly what you want. I did this by combining https://developers.google.com/youtube/iframe_api_reference and Iframe API.
Just replace the video iD, and test it on your local pc.