_mediaRecording = await _mediaCapture.PrepareLowLagRecordToStorageFileAsync(MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Auto), file); will randomly throw the following exception
Exception thrown: 'System.Runtime.InteropServices.COMException' in WinRT.Runtime.dll
The object invoked has disconnected from its clients. (0x80010108 (RPC_E_DISCONNECTED))
and return a null object to_mediaRecording, causing the saving of the video file to fail.
Seems like the error occurs more often after recording of a larger file, around more than 25s. Multiple recording of videos below 20s does not cause the error.
I have code to record multiple videos.
_mediaRecording = await _mediaCapture.PrepareLowLagRecordToStorageFileAsync(MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Auto), file);
will randomly throw the following exceptionand return a null object to
_mediaRecording
, causing the saving of the video file to fail.Seems like the error occurs more often after recording of a larger file, around more than 25s. Multiple recording of videos below 20s does not cause the error.