Skip to content Skip to sidebar Skip to footer

Seekto() Is Not A Function Youtube Iframe Api Error

I am using a Wordpress plugin to add timestamp links of videos that will seek the video automatically to a certain timeframe. Javascript: function onYouTubeIframeAPIReady

Solution 1:

Based from this documentation, you need to set both the two parameter of the player.seekTo(seconds:Number, allowSeekAhead:Boolean).

Seeks to a specified time in the video. If the player is paused when the function is called, it will remain paused. If the function is called from another state (playing, video cued, etc.), the player will play the video.

  • The seconds parameter identifies the time to which the player should advance.

    The player will advance to the closest keyframe before that time unless the player has already downloaded the portion of the video to which the user is seeking.

  • The allowSeekAhead parameter determines whether the player will make a new request to the server if the seconds parameter specifies a time outside of the currently buffered video data.

It should be like: Player.seekTo(120, true)//120 seconds

Post a Comment for "Seekto() Is Not A Function Youtube Iframe Api Error"