Skip to content

Commit

Permalink
chore: record lateinit non-fatal exception
Browse files Browse the repository at this point in the history
  • Loading branch information
adityaa30 committed Feb 18, 2021
1 parent cc9be5f commit b240104
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import live.hms.video.payload.HMSStreamInfo
import live.hms.video.webrtc.HMSRTCAudioTrack
import live.hms.video.webrtc.HMSRTCMediaStreamConstraints
import live.hms.video.webrtc.HMSRTCVideoTrack
import java.lang.Exception
import java.util.*
import kotlin.collections.ArrayList

Expand Down Expand Up @@ -331,7 +332,12 @@ class MeetingViewModel(
private fun cleanup() {
// NOTE: Make sure that we have stopped capturing whenever we disconnect/leave/handle failures
if (settings.publishVideo) {
localStream.cameraVideoCapturer.stop()
try {
localStream.cameraVideoCapturer.stop()
} catch (e: UninitializedPropertyAccessException) {
e.printStackTrace()
crashlytics.recordException(e)
}
}

// Reset the values of bottom control buttons
Expand Down

0 comments on commit b240104

Please sign in to comment.