【问题标题】:Captured Video URL not Found未找到捕获的视频 URL
【发布时间】:2016-05-19 03:19:09
【问题描述】:

当我专门运行这段代码时,我不断收到这个错误:这可能是什么问题?我假设找不到视频的 URL,但如果是这种情况,那么为什么会发生这种情况?

错误复制图像:错误域=NSURLErrorDomain 代码=-1100“在此服务器上找不到请求的 URL。” UserInfo={NSLocalizedDescription=在此服务器上未找到请求的 URL。, NSUnderlyingError=0x161215860 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} 复制图像时出错,没有要复制的先前帧

这是导致问题的代码的 sn-p:

isRecording = true
        self.godDamnWebView.hidden = true
        UIView.animateWithDuration(0.5, delay: 0.0, options: [.Repeat, .Autoreverse, .AllowUserInteraction], animations: { () -> () in
            self.cameraButton.transform = CGAffineTransformMakeScale(0.5, 0.5)
            }, completion: nil)

        let outputPath = NSTemporaryDirectory() + "output.mov"
        let outputFileURL = NSURL(fileURLWithPath: outputPath)

        videoFileOutput?.startRecordingToOutputFileURL(outputFileURL, recordingDelegate: self)

【问题讨论】:

    标签: ios swift camera


    【解决方案1】:

    最好的办法是:

    let outputFileURL = NSURL(fileURLWithPath: NSTemporaryDirectory()).URLByAppendingPathComponent("output.mov")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-10-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-09
      • 1970-01-01
      相关资源
      最近更新 更多