Start video recording
已完成Hello all,
I am strugling within the video recor to de Mavic 3M microSD.
Using the following kotlin code:
KeyManager.getInstance().performAction(
DJIKey.create(CameraKey.KeyStartRecord),
object : CommonCallbacks.CompletionCallbackWithParam<EmptyMsg> {
override fun onSuccess(t: EmptyMsg?) {
Log.i(javaClass.simpleName, t.toString())
}
override fun onFailure(error: IDJIError) {
Log.i(javaClass.simpleName, error.toString())
}
}
)
I always get the following error:
ErrorImp{errorType='CORE', errorCode='SYSTEM_ERROR', innerCode='', description='null', hint='error code = -7'}
Please, let me know what I am doing wrong :S
Thank you in advance!
-
Yes, of course.
I just add a button to the UXSDK (https://github.com/dji-sdk/Mobile-SDK-Android-V5) and add a click listener that performs the code shown above to start a video recording:
KeyManager.getInstance().performAction(
DJIKey.create(CameraKey.KeyStartRecord),
object : CommonCallbacks.CompletionCallbackWithParam<EmptyMsg> {
override fun onSuccess(t: EmptyMsg?) {
Log.i(javaClass.simpleName, t.toString())
}
override fun onFailure(error: IDJIError) {
Log.i(javaClass.simpleName, error.toString())
}
}
)But I always get the same error shown above:
ErrorImp{errorType='CORE', errorCode='SYSTEM_ERROR', innerCode='', description='null', hint='error code = -7'}
Thanks in advance for the support!
-
That was my problem!
Now it works like a charm :)
CameraKey.KeyCameraMode.create().set(
CameraMode.VIDEO_NORMAL,
onSuccess = {
KeyManager.getInstance().performAction(
DJIKey.create(CameraKey.KeyStartRecord),
object : CommonCallbacks.CompletionCallbackWithParam<EmptyMsg> {
override fun onSuccess(t: EmptyMsg?) {
Log.i(javaClass.simpleName, t.toString())
}
override fun onFailure(error: IDJIError) {
Log.i(javaClass.simpleName, error.toString())
}
}
)
},
onFailure = { Log.i(javaClass.simpleName, "fail start video record) }
)Thank you very much!!
请先登录再写评论。
评论
10 条评论