Ionic, Android and video formats


Hi there
I’m currently working on an app for iOS and Android with a lot of local video content. The videos have to be part of the app (required by the client). So I used the video tag with

<video controls="controls" preload="metadata" class="videoPlayer">
     <source ng-src="{{video.src}}" type="video/mp4"/>

{{video.src}} in this case contains the string video/_demo_video.mp4

On iOS the whole thing works like a charm. But on Android the videos don’t work. There is a video thumbnail, but tapping on it doesn’t play the video. On the smartphone itself nothing happens. In the emulator (with ‘ionic emulate android’) the app quits unexpectedly.

The videos are in an mp4 containter with H264 - MPEG-4 AVC 4:2:0 encoding and mp4a MPEG AAC audio. According to the supported media formats of android, this should work:

Does anybody have an idea what I could do about that?


I’m not sure if this applies to videos, but for playing local audios on Android you sometimes need to set the directory as /android_asset/www/audios/myaudio.mp3.’ Something like:

if ($'android')) { src = '/android_asset/www/' + $; }

Maybe this might be relevant:


Thanks @praxis
Sadly it didn’t work… still looking for the problem. I’m trying another video format now with .ogg


tried ogg and even webm. Didn’t work. I’m clearly doing something wrong here. On the device is Android 4.4.2 installed.
Question: Does anybody got video in an ionic app on android working where the source was internal and not over the internet?


I wonder how have you solved it? All around the internet I only see the problem, with no solution!!


I have the same problem