javascript - Meteor Cordova iOS video element not loading captured video -


what right approach dynamically set src attribute of video element in meteor cordova app? trying capture video , show user.

i using meteor , cordova ios application. capture video first using cordova media capture plugin , try display video playing using html5 video tag on ios meteor cordova app.

problem when use <video> element , specify src file application or tmp folder, video not play.

i tried cdvfile://..., file:///... , /var/mobile/... , none of them work. tried calling load , play function after setting src , not work.

i noticed earlier versions of cordova had issue (https://issues.apache.org/jira/browse/cb-6051) supposed fixed now. kind of url work?

so problem turned out not cordova combination of cordova , framework meteor. (see : https://issues.apache.org/jira/browse/cb-6051). meteor serves content @ http meteor.local while cordova uses file. since meteor uses http: serve app , local files @ file:, considered cross domain access restricted. since plain cordova uses file serve application , local files @ file:, works.

the solution used(from above link) use following plugin serve local files on http protocol, circumventing access issues when mixing protocols on page. when local storage files served way, video tag able load video there (in meteor+cordova apps)
https://github.com/floatinghotpot/cordova-httpd


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -