intel / APKexpansion

5 stars 12 forks source link

Loading video file : Downloading assets freezes #7

Open Simon-Edwards-21 opened 8 years ago

Simon-Edwards-21 commented 8 years ago

Hi

I am using this code in a Cordova app to load a video file from an expansion pack. Without success..

 <script type="text/javascript" charset="utf-8">
(function(){
var btn = document.getElementById("serratus-playbutton");
btn.onclick = function(){
XAPKReader.get(
    'Anterior_Seratus_16-9.mp4',
    function (url) {
        cordova.plugins.disusered.open(url);
    },
    function (error) {
        console.error(error);
    }
);
}
})();
 </script>

I am testing this with an Android device attached (OSX) and the .obb file pre-loaded into the Android/obb folder. The app is installed directly by the usual "cordova run android" command or updated as a tester from the play store.

When the button to play the asset is selected a window launches showing "Downloading assets..." and freezes.

I am not a coder by background so this could be a basic oversight.

Could you give any insight as to why this may happen? Or offer some suggestions on how to diagnose this.

Thanks

Simon