Reputation: 695
I'm trying to integrate this video editor into an ionic/cordova app: https://github.com/imgly/vesdk-cordova
It actually works really well using a test mp4 video built into the ionic assets, but what i need is to record a video with the device camera and load it in.
So with a saved test.mp4 this works:
VESDK.openEditor(
(args: VideoEditorResult) => {
console.log("SUCCESS ARGS",args)
},
(error:any) => {
console.log("FAIL ERROR",error)
},
VESDK.resolveStaticResource('www/assets/test.mp4')
);
However if i try to load in the media from the camera:
VESDK.resolveStaticResource(media[0].fullPath)
Xcode shows this error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVPlayerItem setVideoComposition:] video composition must have a positive renderSize'
This seems like something is wrong when it records the video. It's iPhone 11 i am testing on.
Upvotes: 0
Views: 234
Reputation: 57
Keep in mind that using the VESDK.resolveStaticResource
function should only be used for loading in static resources that you are shipping inside your application bundle (your www/assets
folder). This said, please pass in a valid URI without wrapping it inside this function.
Upvotes: 1