Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start time for video is not updating time when I am changing start time form mounted function. #56

Open
monumehta opened this issue Apr 26, 2019 · 3 comments

Comments

@monumehta
Copy link

playerVars: {
autoplay: 1,
controls: 0,
rel: 0,
start: 0,
}

changing video id and start time on mounted :
this.playerVars.start = Math.floor(data[0].skip)
this.videoId = data[0].video_id

@liquidvisual
Copy link

@monumehta Same problem. Did you ever this figure this out?

@monumehta
Copy link
Author

monumehta commented Sep 4, 2019 via email

@dentonzh
Copy link

I'm looking to achieve something similar. For now, I'm using playing event handler and having it call a function that uses the player's seekTo method.

In template:
<client-only> <youtube @ready="playerReady" @playing="playerPlaying" :video-id="videoId" /> </client-only>

And under methods:
playerPlaying (event) { // The player is playing a video. this.player.seekTo(100) }

This is a workaround, but it achieves the desired end result of start. When you hit play on the video, it very briefly starts at 0:00 for a split second (mostly unnoticeable) before skipping itself to the timestamp you specify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants