• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

angular cordova application html5 video tag does not play on android

chinnar

Lurker
I have an angular cordova application which has got the html video tag that plays on IOS but not on Android. Play button does not show on android

html tag is as below:

Code:
<video width="320" height="240" controls="controls">
  <source src="https://sample1.mp4" type="video/mp4" />
</video>


config.xml of Cordova is as below:
Code:
<content src="index.cordova.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*://*.xxx.com" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
<platform name="android">
        <allow-intent href="market:*" />
        <icon src="assets/android/ldpi.png" density="ldpi" />
        <icon src="assets/android/mdpi.png" density="mdpi" />
        <icon src="assets/android/hdpi.png" density="hdpi" />
        <icon src="assets/android/xhdpi.png" density="xhdpi" />
        <icon src="assets/android/xxhdpi.png" density="xxhdpi" />
        <icon src="assets/android/xxxhdpi.png" density="xxxhdpi" />
    </platform>
<platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />

        <edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
            <string>Need camera access to take pictures</string>
        </edit-config>

        <edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
          <string>Need photo library access to get pictures from there</string>
        </edit-config>

        <!-- iOS 8.0+ -->
        <!-- iPhone 6 Plus  -->
        <icon src="assets/ios/icon-60@3x.png" width="180" height="180" />
        <!-- iOS 7.0+ -->
        <!-- iPhone / iPod Touch  -->
        <icon src="assets/ios/icon-60.png" width="60" height="60" />
        <icon src="assets/ios/icon-60@2x.png" width="120" height="120" />
        <!-- iPad -->
        <icon src="assets/ios/icon-76.png" width="76" height="76" />
        <icon src="assets/ios/icon-76@2x.png" width="152" height="152" />
        <!-- Spotlight Icon -->
        <icon src="assets/ios/icon-40.png" width="40" height="40" />
        <icon src="assets/ios/icon-40@2x.png" width="80" height="80" />
        <!-- iOS 6.1 -->
        <!-- iPhone / iPod Touch -->
        <icon src="assets/ios/icon.png" width="57" height="57" />
        <icon src="assets/ios/icon@2x.png" width="114" height="114" />
        <!-- iPad -->
        <icon src="assets/ios/icon-72.png" width="72" height="72" />
        <icon src="assets/ios/icon-72@2x.png" width="144" height="144" />
        <!-- iPad Pro -->
        <icon src="assets/ios/icon-167.png" width="167" height="167" />
        <!-- iPhone Spotlight and Settings Icon -->
        <icon src="assets/ios/icon-small.png" width="29" height="29" />
        <icon src="assets/ios/icon-small@2x.png" width="58" height="58" />
        <icon src="assets/ios/icon-small@3x.png" width="87" height="87" />
        <!-- iPad Spotlight and Settings Icon -->
        <icon src="assets/ios/icon-50.png" width="50" height="50" />
        <icon src="assets/ios/icon-50@2x.png" width="100" height="100" />
        <!-- iPad Pro -->
        <icon src="assets/ios/icon-83.5@2x.png" width="167" height="167" />
    </platform>
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="23" />
    <preference name="BackupWebStorage" value="none" />


Not sure if there is a problem with the video tag or any configuration specific to Android in Cordova. Is there any plugin specific to Android Cordova need to be installed or changes to video tag to be done.
 
Last edited:
Back
Top Bottom