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

[Android] Can't read video file after media capture #9

Closed
roblav96 opened this issue Apr 7, 2016 · 2 comments
Closed

[Android] Can't read video file after media capture #9

roblav96 opened this issue Apr 7, 2016 · 2 comments

Comments

@roblav96
Copy link

roblav96 commented Apr 7, 2016

It doesn't want to read a video file in the path format of:

file:/storage/emulated/0/DCIM/Camera/VID_20160407_171709.mp4
        _snapVideo: function () {
            console.warn( 'snapVideo >' )

            window.plugins.videocaptureplus.captureVideo( this.capturedVideo, function ( err ) {
                console.error( 'snapVideo > ERR >', err )
            }, {
                limit: 1,
                duration: 10,
                highquality: true,
            } )
        },

        capturedVideo: _.debounce( function ( media ) {
            if ( _.isEmpty( media ) ) {
                return
            }

            console.log( 'capturedVideo > media >', media )
            // fullPath: "file:/storage/emulated/0/DCIM/Camera/VID_20160407_171709.mp4"
            // lastModifiedDate: 1460063833000
            // name: "VID_20160407_171709.mp4"
            // size: 7519513
            // type: "video/mp4"

            window.PKVideoThumbnail.createThumbnail( media[ 0 ].fullPath, cordova.file.dataDirectory + media[ 0 ].name + '_thumb.jpg', {
                mode: 'file',
                quality: 50
            }, function ( thumb ) {
                console.log( 'thumb >', thumb )
            }.bind( this ), function ( err ) {
                console.error( err )
            } )

        }, 250 ),
@roblav96
Copy link
Author

roblav96 commented Apr 7, 2016

EDIT

Seems like adding an extra / after file: fixed it

file://storage/emulated/0/DCIM/Camera/VID_20160407_171709.mp4

@kerrishotts
Copy link
Member

Yep, it's picky about URI schemas. Glad you got it working.

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

2 participants