videogular / videogular2

The HTML5 video player for Angular 2
https://videogular.github.io/videogular2-showroom/#/
MIT License
672 stars 210 forks source link

Is it possible to show some image, for example first frame of video in player? it is supposed that this first frame of video is stored somewhere #748

Open remotenode opened 6 years ago

remotenode commented 6 years ago

Hi guys. Is it possible to show some image, for example first frame of video in player? it is supposed that this first frame of video is stored somewhere

Thank you in advance

kwarismian commented 6 years ago

Videogular supports the "poster" element of HTML video. Is this what you are wanting? You can also write a very simple "vg-poster" element, subscribe through the API to play/pause events and hide show this element however you would like.

Pulling the frame from the video itself will be difficult, as the video render is handled by the browser itself as opposed to Videogular doing the work (videogular core HTML video functionality).

remotenode commented 6 years ago

@kwarismian , thank you so much! It is what I was looking for. Some more questions: 1) Is it possible to disable auto preloading video? I have a list of video on the page and each of them are starting loading automatically, I want to disable this behavior. I want only video play when user clicks on video. 2) Is it possible by default to hide bottom panel? I want to leave only "play" button which is located on the middle of video player.

FlashBanistan commented 6 years ago

@AwanesowArtem You can disable preloading by adding preload="none" to your video element. When you say "bottom panel" do you mean the controls? If so then you can simply leave <vg-controls></vg-controls> out of your code.