cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "harish (JIRA)" <>
Subject [jira] [Created] (CB-12356) cdvfile:// not working in html5 video tag
Date Tue, 17 Jan 2017 11:19:26 GMT
harish created CB-12356:

             Summary: cdvfile:// not working in html5 video tag
                 Key: CB-12356
             Project: Apache Cordova
          Issue Type: Bug
         Environment: Android version : 4.4.2
Model : HTC 
Meteor : 1.4
            Reporter: harish

I have a file downloaded to sdCard.
I can play it in media player.So file is not corrupted.

As per documentation to use 'cdvfile://..' in html tag two settings have to be set.
1.I set the Content-Security-Policy with
    <meta http-equiv="Content-Security-Policy" content="default-src cdvfile: 'self' https:
data: ; style-src 'self' https: 'unsafe-inline' ; img-src * data: ;connect-src * ; script-src
'self' * 'unsafe-eval' 'unsafe-inline' ">

2.I set origin access with
App.accessRule('cdvfile://*'); in mobile-config.js

Html :

  <source src="cdvfile://localhost/files-external/ksnYb8A3bBr5BnSbT-aK2xDY3_460sv.mp4">

video tag should play the video.

A black screen appears without any error.No playback.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message