vue-responsive-video-background-player icon indicating copy to clipboard operation
vue-responsive-video-background-player copied to clipboard

Add stop() method or get access to video object

Open ribagek opened this issue 4 years ago • 4 comments

Hello!

I need to have ability to stop and reset video to the start. That's why I need the following in VideoPlayer.vue:

stop() {
            if (this.$refs.video) {
                this.$refs.video.stop();
            }
        },

or to have more control there'll be great to have:

video() {
            return this.$refs.video;
        },

thanks!

ribagek avatar Oct 28 '21 08:10 ribagek

Hey :) You should have everything what you need here https://github.com/avidofood/vue-responsive-video-background-player#methods

pmochine avatar Oct 29 '21 07:10 pmochine

@pmochine may be I don't understand, but how can I rollback a video to the start? I tried all methods from your list.

vdomah avatar Oct 29 '21 07:10 vdomah

@vdomah the "reload" method for HTML5 video is missing

Have a look here, you should implement this here as well.

pmochine avatar Oct 29 '21 14:10 pmochine

The problem is your load() method has 1 second delay and I can't make it 0. For now I solved my problem by rerendering the vue component by manually changing the :key attr of the component.

vdomah avatar Oct 30 '21 08:10 vdomah