I have created video player in Ionic 2 with html5 video tag.
- The code snippet in video.html
<video width="100%" controls>
<source src="assets/videos/Part_1.mp4" type="video/mp4">
</video>
And the video file is in local there.
The player is fine in web browser, but in android platform it’s not run.
Only audio run and video does not display.
How can I fix that?
2 Likes
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="./assets/videos/Part_1.mp4" type="video/mp4" />
</video>
</ion-content>
1 Like
I had same issue. Added crosswalk plugin for android . Its solved it !!!
Hi @Donbelar.
The html5 video tag isn’t a good aproach, you need to use ionic native for play video.