dobromir-hristov / vue-vimeo-player

Vue.js wrapper for Vimeo player
MIT License
111 stars 56 forks source link

Start playback at specific time #33

Closed EvanAgee closed 4 years ago

EvanAgee commented 4 years ago

Thanks for the hard work!

I'm working on storing a users watch progress on a video and then when the page is revisited later the video will automatically start where they left off. I'm not seeing a way to do this, can you assist? Thanks!

dobromir-hristov commented 4 years ago

Hey, thanks. Try accessing the player's API directly - this.$refs.vimeo.player.setCurrentTime() https://github.com/vimeo/player.js/#setcurrenttimeseconds-number-promisenumber-rangeerrorerror

EvanAgee commented 4 years ago

Thanks so much @dobromir-hristov , got it working!

EvanAgee commented 4 years ago

For anyone else you needs this later, here's what ended up working.

this.$refs.player.player.setCurrentTime(this.videoProgress);