Phonegap/iOS-捕获的视频未保存到iPhone相机胶卷 [英] Phonegap/ios - Capture video not saving to iPhone camera roll

查看:116
本文介绍了Phonegap/iOS-捕获的视频未保存到iPhone相机胶卷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在应用中拍摄视频时,视频不会保存到相机胶卷中.

When taking a video in the app the video is not saved to camera roll.

我已将标志saveToPhotoAlbum设置为true.

I have set the flag saveToPhotoAlbum: true.

我的代码

            opt = {
                limit: 1,
                saveToPhotoAlbum: true,
                quality: 1
            };

            navigator.device.capture.captureVideo(
                that.captureVideoOnSuccess,
                that.onCaptureFail,
                opt
            );

类似的代码也可以毫无问题地用于getPicture

A similar code works for getPicture with no problems

        navigator.camera.getPicture(
            that.uploadPhoto,
            that.onCaptureFail, {
                destinationType: Camera.DestinationType.FILE_URI,
                sourceType: Camera.PictureSourceType.CAMERA,
                mediaType: Camera.MediaType.PICTURE,
                saveToPhotoAlbum: true
            }
        );

有什么想法可以解决这个问题吗? 任何解决方案都将受到欢迎-通过config,js代码,Objective-C

Any idea how to over come this? Any solution will be welcome - by config, js code, Objective-C

谢谢

推荐答案

这是我的解决方案(基于 https://groups.google.com/forum/#!topic/phonegap/245nKJoqqak )

Here is my solution (based on https://groups.google.com/forum/#!topic/phonegap/245nKJoqqak)

在plugins/org.apache.cordova.media-capture/src/ios/CDVCapture.m

In plugins/org.apache.cordova.media-capture/src/ios/CDVCapture.m

方法-(CDVPluginResult *)processVideo:(NSString *)moviePath forCallbackId:(NSString *)callbackId

Method - (CDVPluginResult*)processVideo:(NSString*)moviePath forCallbackId:(NSString*)callbackId

取消注释

/*不需要,它会自动保存

/* don't need, it should automatically get saved

我不知道为什么这些行被注释掉了...

I don't know why those line are comment out...

这篇关于Phonegap/iOS-捕获的视频未保存到iPhone相机胶卷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆