dobromir-hristov / vue-vimeo-player

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

SetCurrentTime not working #102

Closed fscaringi closed 12 months ago

fscaringi commented 12 months ago

Hi everyone, I'm having trouble setting the currentTime of the video.

In my component I have this: <vimeo-player ref="player" allow="autoplay" :video-id="{{ vimeo_id }}" @ready="onReady" @timeupdate="onTimeUpdateHandler"/>

And in the mounted I'm trying to invoke the player like this: this.$refs.player.setCurrentTime(100).

That "100" is a value that will return to me via API.

I read in the console that player is undefined, I tried to look in the other issues and I also tried to use "player.player" but without success.

I have also made a button with @click event and the this.$refs.player.play() functions is working perfectly. The setCurrentTime() not.

Could you help me? Thank you.