File tree Expand file tree Collapse file tree
macOS/APIExample/Examples/Basic/JoinChannelAudio Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,20 +51,13 @@ class JoinChannelAudioMain: BaseViewController {
5151 var audioScenarios = AgoraAudioScenario . allValues ( )
5252 var selectedAudioScenario : AgoraAudioScenario ? {
5353 let index = self . selectAudioScenarioPicker. indexOfSelectedItem
54- if index >= 0 && index < Configs . Resolutions. count {
55- return audioScenarios [ index]
56- } else {
57- return nil
58- }
54+ return audioScenarios [ index >= audioScenarios. count ? 0 : index]
5955 }
6056 func initSelectAudioScenarioPicker( ) {
6157 selectAudioScenarioPicker. label. stringValue = " Audio Scenario " . localized
6258 selectAudioScenarioPicker. picker. addItems ( withTitles: audioScenarios. map { $0. description ( ) } )
6359
6460 selectAudioScenarioPicker. onSelectChanged {
65- if !self . isJoined {
66- return
67- }
6861 guard let profile = self . selectedProfile,
6962 let scenario = self . selectedAudioScenario else {
7063 return
You can’t perform that action at this time.
0 commit comments