|
@@ -74,6 +74,33 @@ RCT_EXPORT_MODULE();
|
74
|
74
|
@"Connected": @(AgoraConnectionStateConnected),
|
75
|
75
|
@"Reconnecting": @(AgoraConnectionStateReconnecting),
|
76
|
76
|
@"ConnectionFailed": @(AgoraConnectionStateFailed),
|
|
77
|
+ @"ConnectionChangedConnecting": @(AgoraConnectionChangedConnecting),
|
|
78
|
+ @"ConnectionChangedJoinSuccess": @(AgoraConnectionChangedJoinSuccess),
|
|
79
|
+ @"ConnectionChangedInterrupted": @(AgoraConnectionChangedInterrupted),
|
|
80
|
+ @"ConnectionChangedBannedByServer": @(AgoraConnectionChangedBannedByServer),
|
|
81
|
+ @"ConnectionChangedJoinFailed": @(AgoraConnectionChangedJoinFailed),
|
|
82
|
+ @"ConnectionChangedLeaveChannel": @(AgoraConnectionChangedLeaveChannel),
|
|
83
|
+ @"AudioOutputRoutingDefault": @(AgoraAudioOutputRoutingDefault),
|
|
84
|
+ @"AudioOutputRoutingHeadset": @(AgoraAudioOutputRoutingHeadset),
|
|
85
|
+ @"AudioOutputRoutingEarpiece": @(AgoraAudioOutputRoutingEarpiece),
|
|
86
|
+ @"AudioOutputRoutingHeadsetNoMic": @(AgoraAudioOutputRoutingHeadsetNoMic),
|
|
87
|
+ @"AudioOutputRoutingSpeakerphone": @(AgoraAudioOutputRoutingSpeakerphone),
|
|
88
|
+ @"AudioOutputRoutingLoudspeaker": @(AgoraAudioOutputRoutingLoudspeaker),
|
|
89
|
+ @"AudioOutputRoutingHeadsetBluetooth": @(AgoraAudioOutputRoutingHeadsetBluetooth),
|
|
90
|
+ @"NetworkQualityUnknown": @(AgoraNetworkQualityUnknown),
|
|
91
|
+ @"NetworkQualityExcellent": @(AgoraNetworkQualityExcellent),
|
|
92
|
+ @"NetworkQualityGood": @(AgoraNetworkQualityGood),
|
|
93
|
+ @"NetworkQualityPoor": @(AgoraNetworkQualityPoor),
|
|
94
|
+ @"NetworkQualityBad": @(AgoraNetworkQualityBad),
|
|
95
|
+ @"NetworkQualityVBad": @(AgoraNetworkQualityVBad),
|
|
96
|
+ @"NetworkQualityDown": @(AgoraNetworkQualityDown),
|
|
97
|
+ @"ErrorCodeNoError": @(AgoraErrorCodeNoError),
|
|
98
|
+ @"ErrorCodeFailed": @(AgoraErrorCodeFailed),
|
|
99
|
+ @"ErrorCodeInvalidArgument": @(AgoraErrorCodeInvalidArgument),
|
|
100
|
+ @"ErrorCodeTimedOut": @(AgoraErrorCodeTimedOut),
|
|
101
|
+ @"ErrorCodeAlreadyInUse": @(AgoraErrorCodeAlreadyInUse),
|
|
102
|
+ @"ErrorCodeAbort": @(AgoraErrorCodeAbort),
|
|
103
|
+ @"ErrorCodeResourceLimited": @(AgoraErrorCodeResourceLimited),
|
77
|
104
|
@"AudioProfileDefault": @(AgoraAudioProfileDefault),
|
78
|
105
|
@"AudioProfileSpeechStandard": @(AgoraAudioProfileSpeechStandard),
|
79
|
106
|
@"AudioProfileMusicStandard": @(AgoraAudioProfileMusicStandard),
|
|
@@ -107,7 +134,10 @@ RCT_EXPORT_MODULE();
|
107
|
134
|
@"AgoraVideoMirrorModeAuto": @(AgoraVideoMirrorModeAuto),
|
108
|
135
|
@"AgoraVideoMirrorModeEnabled": @(AgoraVideoMirrorModeEnabled),
|
109
|
136
|
@"AgoraVideoMirrorModeDisabled": @(AgoraVideoMirrorModeDisabled),
|
110
|
|
- };
|
|
137
|
+ @"AgoraChannelProfileCommunication": @(AgoraChannelProfileCommunication),
|
|
138
|
+ @"AgoraChannelProfileLiveBroadcasting": @(AgoraChannelProfileLiveBroadcasting),
|
|
139
|
+ @"AgoraChannelProfileGame": @(AgoraChannelProfileGame)
|
|
140
|
+ };
|
111
|
141
|
}
|
112
|
142
|
|
113
|
143
|
// init
|
|
@@ -133,7 +163,7 @@ RCT_EXPORT_METHOD(init:(NSDictionary *)options) {
|
133
|
163
|
}
|
134
|
164
|
}
|
135
|
165
|
|
136
|
|
- AgoraVideoEncoderConfiguration *video_encoder_config = [[AgoraVideoEncoderConfiguration new] initWithWidth:[options[@"videoEncoderConfig.width"] integerValue] height:[options[@"videoEncoderConfig.height"] integerValue] frameRate:(AgoraVideoFrameRate)[options[@"videoEncoderConfig.frameRate"] integerValue] bitrate:[options[@"videoEncoderConfig.bitrate"] integerValue] orientationMode: (AgoraVideoOutputOrientationMode)[options[@"videoEncoderCnofig.orientationMode"] integerValue]];
|
|
166
|
+ AgoraVideoEncoderConfiguration *video_encoder_config = [[AgoraVideoEncoderConfiguration new] initWithWidth:[options[@"videoEncoderConfig"][@"width"] integerValue] height:[options[@"videoEncoderConfig"][@"height"] integerValue] frameRate:(AgoraVideoFrameRate)[options[@"videoEncoderConfig"][@"frameRate"] integerValue] bitrate:[options[@"videoEncoderConfig"][@"bitrate"] integerValue] orientationMode: (AgoraVideoOutputOrientationMode)[options[@"videoEncoderConfig"][@"orientationMode"] integerValue]];
|
137
|
167
|
[self.rtcEngine setVideoEncoderConfiguration:video_encoder_config];
|
138
|
168
|
[self.rtcEngine setClientRole:(AgoraClientRole)[options[@"clientRole"] integerValue]];
|
139
|
169
|
[self.rtcEngine setAudioProfile:(AgoraAudioProfile)[options[@"audioProfile"] integerValue]
|