Skip to content

Commit

Permalink
Fix supportedVideoFormat out of index exception in demo (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgezy-amzn authored Jan 16, 2024
1 parent 45c01bd commit 358e8c9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class DeviceSelectionModel {
}

var selectedVideoFormat: VideoCaptureFormat? {
let supportedVideoFormat = self.supportedVideoFormat
guard supportedVideoFormat.count >= selectedVideoDeviceIndex + 1 else {
return nil
}
return supportedVideoFormat[selectedVideoDeviceIndex][selectedVideoFormatIndex]
}

Expand Down

0 comments on commit 358e8c9

Please sign in to comment.