avidofood / vue-responsive-video-background-player

Play your own videos in background responsively in different resolutions.
https://avidofood.github.io/vue-responsive-video-background-player/
MIT License
292 stars 36 forks source link

Play/Pause function #3

Closed nawalnew closed 4 years ago

nawalnew commented 4 years ago

Hey,

i love your plugin. works nice and meets nearly all requirements. Do you have an Idea for a Play Pause function? Maybe for a custom button that triggers the play/pause function?

would be happy if you have an idea for a possible solution.

Thanks :)

nawalnew commented 4 years ago

I found it by myself and building it now. Just for other people who looking for the play/pause function

In your Docs I found:

The video is going to be played immediately when the video is ready. If you are setting it to false, you can start the video just by this.$refs.videobackground.player.play(). But remember to set ref=videobackground to the html tag , so that it can work.

This is also working with this.$refs.videobackground.player.play() and this.$refs.videobackground.player.pause()

Would be great if you put the play/pause in your docs. Would be more attractive for other users. And i think you have one of the best solutions. I tried ALL other VideoBG solutions :)

pmochine commented 4 years ago

Thanks for the nice words! I wasn't happy with other packages, that's why I build this here and wanted to share it.

I will update the readme. Thanks for the tip!