You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jcesarmobile (Jira)" <ji...@apache.org> on 2019/11/29 12:55:00 UTC

[jira] [Closed] (CB-8058) Cordova iOS: Load videos with downloaded html's and video files

     [ https://issues.apache.org/jira/browse/CB-8058?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jcesarmobile closed CB-8058.
----------------------------
    Resolution: Incomplete

closing as the requested project was not provided

> Cordova iOS: Load videos with downloaded html's and video files
> ---------------------------------------------------------------
>
>                 Key: CB-8058
>                 URL: https://issues.apache.org/jira/browse/CB-8058
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-ios
>    Affects Versions: 3.6.0
>            Reporter: Jorge Miranda
>            Priority: Major
>              Labels: download, inappbrowser, ios, video, videodisplay
>
> I have the following issue:
> - I have an iOS Cordova Application.
> - The application download a zip file and decompress it in "cdvfile://localhost/persistent/content/myfolder" by ussing the following Cordova plugins: org.apache.cordova.file-transfer, org.apache.cordova.file and https://github.com/MobileChromeApps/zip.git
> - Inside the zip there is an "index.html" file with "video tags" on it.
> - I was able to succesfully load and execute the "index.html" file, but the video doesn't load.
> I know that the video file was decompressed successfully because:
> - I check the file inside my iPad.
> - I embed the video in the index of the cordova app (not the downloaded one) in the following way and it works:
>           
>  
>          var videocontainer = document.getElementsByTagName('video')[0];
>          var videosource = document.getElementsByTagName('source')[0];
>          var newmp4 = cordova.file.documentsDirectory + 'content/myfolder/videos/myvideo.mp4';
>          videosource.setAttribute('src', newmp4);
>          videocontainer.load();
>          videocontainer.play();
> But, the video is not loaded/played inside the downloaded HTML file. To understand what I'm doing, I have to develop an application that will be updated by downloading its contents from zips, and the contents includes pages with videos embeded on them. It works on PC and Android, but not in iOS.
> I tried the following things:
> - Loading the page in "_self". The page is displayed but not the video.
> - Loading the page in an iframe. Same result.
> - Loading the page within an inAppBrowser (plugin). Same result.
> - Video tag with source src="videos/myvideo.mp4"  (works in Web and Android). Same result.
> - Video tag with source src="./videos/myvideo.mp4" (works in Web and Android). Same result.
> - Video tag with source src= cordova.file.documentsDirectory + 'content/myfolder/videos/myvideo.mp4' (with JS, by passing the path in a query string, same path that works in the root index.html as I described before). Same result.
> - Video tag with source src= cordova.file.documentsDirectory + 'cdvfile://localhost/persistent/content/myfolder/videos/myvideo.mp4'. Same result.
> - All the combination of previous things. Same result....
> Loading the downloaded resources in a DIV is not an option, because the resources (images, css, javascripts, audios, videos, etc.) are downloaded on other iOS device's folder: the app's Documents' folder (cdvfile://localhost/persistent/).
> I thing I tried almost everything... Why is not trivial to play a video tag, inside an html, that are both in the app's Documents' folder???
> :-(
> EDIT 1: Cordova Version = 3.6.3
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org