Skip to content

Read the video file on android #319

Open
@idreamin

Description

@idreamin

the fullpath is file:///storage/emulated/0/DCIM/Camera/VID_20190523_184820.mp4
How should I use cordova-plugin-file to read it ?

Here's my code:
I want to get the 'reader.result', thank you very much !

window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory, function (dirEntry) {
dirEntry.getFile(_this.filename, { create: true, exclusive: false }, function (fileEntry) {
    fileEntry.file(function (file) {
    var reader = new FileReader()
     reader.onloadend = function () {
     console.log('Successful file read: ' + reader.result)
   }
   })
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions