无法从Cordova视频编辑器插件访问缩略图

时间:2018-10-01 10:47:09

标签: cordova ionic-framework video editor

从转码后的视频创建缩略图后,我无法在离子缩略图中显示它。这是我的代码。

 //FullPath video from mediaCapture: 
 file:///storage/emulated/0/DCIM/Camera/20181001_113532.mp4

 //Transcode Video
 return this.videoEditor.transcodeVideo(transCodeOptions)
 .then(transcodedVideo => {

 //Prepend file with file://
 transcodedVideo = "file:/"+transcodedVideo; // =>  
/storage/emulated/0/Movies/CV.video/20181001_113532.mp4

 //Creating new video
 let video = new VideoModel(fullName, size, transcodedVideo, lastModifiedDate, "", false, "");

 //Create thumbnail
 this.videoEditor.createThumbnail({ fileUri: video.path, outputFileName: 
 name + "-thumb"}).then((thumbnail: string) => {

 //Prepend thumbnail with file://
 thumbnail = "file:/"+thumbnail;

 //thumbnail : file://storage/emulated/0/Android/data/cv.video/files/files/videos/20181001_113532- 
 //thumb.jpg
 video.thumbnail = thumbnail;

 console.log("video.thumbnail : "+video.thumbnail); // 

我尝试附加“ file:/”和“ file://”,但是没有运气,没有任何效果。请帮忙。

0 个答案:

没有答案