Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videos from expansion file do not display using the video tag (source src='object URL returned from XAPKReader') #25

Open
robertalibey opened this issue Sep 27, 2015 · 0 comments

Comments

@robertalibey
Copy link

I am running the xapkreader plugin 2.0.0 on Android 4.4 with Cordova 3.6.

Code example:
XAPKReader.get("main_expansion/vid/niceVideo.mp4", gotVideo, errorVideo);

function gotVideo(theObjectURL) {
//theObjectURL is the objectURL returned by the xapkreaer plugin (something like blob:file%3A...)
//just create a video tag that has it's source src set to theObjectURL.
...
}

The theObjectURL parameter of gotVideo() is an objectURL like 'blob:file%3A.....". In this scenario, the video does not play.

I also tried modifying XAPKReader.java to return a base64 string to add to source src of the video tag. Something like 'data:video/mp4;base64,blablabla...' .The video does not play in this case either.

I can only get a video to play using the html video tag if source src='a relative path to a video in the Android APK' or an http URL.

Can the objectURL returned by this plugin be used as the source src attribute of the html video tag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant