How to show Video preview in my ionic html page. I have just Video URL from my web server

1.6k Views Asked by At

I want to show my video preview to fetch Video URL just like http://url/videos/1234.mp4 from my web server. how to show video preview on my video.html page?

<video poster="{{review.videoPath}}" preload="auto">
  <source [src]="review.videoPath" type="mp4">
</video>
2

There are 2 best solutions below

2
Hassan Ali On BEST ANSWER

I done with this. I can overlay my content and play/pasue video onclick.

<video #videoTag style="width: 100%; position: absolute;" [autoplay]="true (click)="videocontorl($event)" *ngIf="isShow"> 
    <source [src]="videoPath" type="video/mp4"> 
</video> 
0
VC.One On

"Does it work if you do a normal tag with poster in HTML file?"

This is what I meant...

<video loop controls="true" preload="auto" width="100%" height="100%">
<source src="http://url/videos/1234.mp4" type="video/mp4">
</video>