Skip to content

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

@robertalibey

Description

@robertalibey

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions