javascript - Play Local Video on PhoneGap/Cordova in Windows Apps -


i'm developing windows/windows phone 8.1 apps using phonegap(html, js, css, jqm) , native/windows runtime component. want play video in html page. video file located inside application folder. don't know what's wrong. please me.

in html, have added:

<div id="content">         <button onclick="domainobject.playvideo()" type="button" data-theme="b">play video</button>         <video id="video" src='' type='video/mp4' width="400" autoplay="autoplay" controls></video> </div> 

and in js:

var domainobject = {      playvideo: function () {         var vidpath = windows.storage.applicationdata.current.localfolder.path + "\\test.mp4";         var video = document.getelementbyid('video');         var source = document.createelement('source');         source.setattribute('src', vidpath);          video.appendchild(source);         video.load();         video.play();   } 


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 -