Start video recording
CompletedHello 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!
-
I hope this message finds you well. I would like to inform you that the issue you are experiencing might be a result of not properly configuring the camera mode to VIDEO_NORMAL. To resolve this, I kindly request you to switch to the recording mode before initiating the recording process. -
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!!
Please sign in to leave a comment.
Comments
10 comments