How to play local video in ionic app <video> tag is not working


#1

i am unable to play video from my project folder…

i’m trying to make an app with 3 to 4 static videos which will play on device without internet connection

but i unable to do this

<div class="modal transparent full screen-player" ng-click="closeModal()">
    <video ng-src="img/test.mp4" class="centerme" controls="controls" autoplay> 
    </video>
</div>

currently i’m using this code,

video is playing very fine on ionic serve with this code but when i compile to .apk file by ionic build android or ionic run android this code stop working on device… a video player is appearing on device but not play video…

there is no error in chrome://inspect

i have also tried $cordovaMedia http://ngcordova.com/docs/plugins/media/

but this is not for playing video i think its documentation only showing examples for audios

http://stackoverflow.com/questions/33571027/how-to-play-local-video-in-ionic-app-video-tag-is-not-working


#2

Perhaps the device you are using for testing is missing the required video codec.
You could try with different video formats.

What is the format of the videos?
Have you tried to run the app in the emulator? Does it log something on the console?


#3

not working on device