I'm using the Youtube IFrame Player API to play a video from Youtube. I want the video to be played from the beginning but Youtube automatically resume the video from where I last left off.
Here is my code:
new YT.Player('yt-player', {
height: '439',
width: '100%',
videoId: 'my-video-id',
startSeconds: 0,
playerVars: {
controls: 0,
color: 'white',
disablekb: 1,
enablejsapi: 0,
modestbranding: 1,
rel: 0,
showinfo: 1,
iv_load_policy: 3,
start: 0
},
events: {
onReady: function() {
this.playVideo();
}
}
})
I tried using startSeconds
and start
parameters but it does not work.
How can I fix this problem?
Try to change the
start:0
tostart:1
.This should reset the video but I don't know the reason.
I tested with direct url with parameters.
You will see that start=1 will works correctly.