3

I'm using Videogular plugin to create an ionic app. Everything is working fine. But I want to show thumbnails for videos and I don't know how to do that using videogular. I saw an example using that is

 <vg-scrub-bar>
   <vg-scrub-bar-buffer></vg-scrub-bar-buffer>
   <vg-scrub-bar-current-time></vg-scrub-bar-current-time>
   <vg-scrub-bar-thumbnails vg-thumbnails="Ctrl.thumbnails"></vg-scrub-bar-thumbnails>
 </vg-scrub-bar>

But the above thumbnails code will work only when the video is playing. I want to show the thumbnail before we play any video.

dpk
  • 339
  • 2
  • 5
  • 22

1 Answers1

0

You can use the default poster attribute that is available in HTML5.

<vg-player>
    <video [vgMedia]="media" #media id="myVideo" preload="auto" controls>
       <source src="https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4" poster="your-poster.jpg" type="video/mp4">
    </video>
</vg-player>
Neel Dsouza
  • 1,342
  • 4
  • 15
  • 33