class MyAVCaptureFileOutputRecordingDelegate implements AVCaptureFileOutputRecordingDelegate {
constructor() {
}
fileOutput(output : AVCaptureFileOutput, @argumentLabel("didStartRecordingTo") fileURL : URL, @argumentLabel("from") connections : [AVCaptureConnection]) : void {
}
fileOutput(output : AVCaptureFileOutput, @argumentLabel("didFinishRecordingTo") outputFileURL : URL, @argumentLabel("from") connections : [AVCaptureConnection], @argumentLabel("error") error ?: Error) : void {
}
}
13:02:40.367 error: type 'MyAVCaptureFileOutputRecordingDelegate' does not conform to protocol 'AVCaptureFileOutputRecordingDelegate'
13:02:40.367 at uni_modules/XF-cameraUTS/utssdk/app-ios/camera.uts:50:6
13:02:40.368 48 | ])
13:02:40.368 49 |
13:02:40.368 50 | class MyAVCaptureFileOutputRecordingDelegate implements AVCaptureFileOutputRecordingDelegate {
13:02:40.368 | ^
13:02:40.368 51 | constructor() {
13:02:40.368 52 | }
3 个回复
DCloud_iOS_LZY
13:02:40.367 error: type 'MyAVCaptureFileOutputRecordingDelegate' does not conform to protocol 'AVCaptureFileOutputRecordingDelegate'
上述错误提示已经表明,你实现的类未遵循AVCaptureFileOutputRecordingDelegate要求的代理方法,仔细核对下哪个代理方法没写对。另外不需要写无参的constructor() { } 函数。
DCloud_iOS_LZY
上述代码中的Error改成NSError
52yaoer (作者)
好的。收到,还真是这个error的问题,,谢谢。
2024-07-04 19:51
52yaoer (作者)
结帖,结帖,一个Error引起的血案。。。