Reputation: 4262
Is there a proper way of including videos in the ionic pages? Because when I use the html 5 video element the buttons are not usable when fullscreen.
<video id="video1" width="100%" preload="metadata" controls webkit-playsinline>
<source type="video/mp4" src="http://www.w3schools.com/html/mov_bbb.mp4"/>
<source type="video/ogg" src="http://www.w3schools.com/html/mov_bbb.ogg"/>
Your browser does not support HTML5 video.
</video>
Is there any proper way of including videos in ionic2?
Upvotes: 1
Views: 1035
Reputation: 65870
You can do it as shown below.
<ion-content overflow-scroll="true">
<video controls="controls" preload="metadata" autoplay="autoplay" webkit-playsinline="webkit-playsinline" class="videoPlayer">
<source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4" />
</video>
</ion-content>
Upvotes: 1
Reputation: 8065
Can't you use Video Player from Ionic Native?
https://ionicframework.com/docs/native/video-player/
Upvotes: 0
Reputation: 939
I suggest to use file-opener2
plugin which allow you to open any kind of files in the default applications on the device, check the usage https://ionicframework.com/docs/native/file-opener/
but make sure that you have installed @ionic-native/core
Upvotes: 0