AddBlackList
takes effect locally and has a higher priority than custom audio routing. For example, if A sets to only hear B's voice through SetServerAudioRouteSendOperateType
but calls AddBlackList
to mute B, then A will not hear B's voice.public abstract class ITMGRoom{public abstract int SetServerAudioRouteSendOperateType(ITMG_SERVER_AUDIO_ROUTE_SEND_TYPE Sendtype, string[] OpenIDforSend, ITMG_SERVER_AUDIO_ROUTE_RECV_TYPE Recvtype, string[] OpenIDforRecv);}
virtual int SetServerAudioRoute(ITMG_SERVER_AUDIO_ROUTE_SEND_TYPE SendType, const char OpenIDforSend[][21], int OpenIDforSendSize, ITMG_SERVER_AUDIO_ROUTE_RECV_TYPE RecvType,const char OpenIDforRecv[][21], int OpenIDforRecvSize) = 0;
public abstract int SetServerAudioRoute(ITMGContext.ITMG_SERVER_AUDIO_ROUTE_SEND_TYPE sendType, ArrayList<String> SendList, ITMGContext.ITMG_SERVER_AUDIO_ROUTE_RECV_TYPE recvType, ArrayList<String> RecvList);
-(int)SetServerAudioRouteSendOperateType:(ITMG_SERVER_AUDIO_ROUTE_SEND_TYPE) Sendtype SendList:(NSArray *)OpenIDForSend RecvOperateType:(ITMG_SERVER_AUDIO_ROUTE_RECV_TYPE) Recvtype RecvList:(NSArray *)OpenIDForRecv;
Receiving Type | Effect |
AUDIO_ROUTE_NOT_SEND_TO_ANYONE | The local audio is sent upstream to the backend, but the backend does not forward to anyone, which is equivalent to mute the local. At this time, the parameter OpenIDForSend is invalid. You just need to enter null. |
AUDIO_ROUTE_SEND_TO_ALL | The local audio is sent upstream to everyone. At this time, the parameter OpenIDForSend is invalid. You just need to enter null. |
AUDIO_ROUTE_SEND_BLACK_LIST | The local audio is sent upstream and will not be forwarded to people in the blocklist, which is provided by the parameter OpenIDForSend. |
AUDIO_ROUTE_SEND_WHITE_LIST | The local audio is sent upstream and is forwarded to people in the allowlist, which is provided by the parameter OpenIDForSend. |
Receiving Type | Effect |
AUDIO_ROUTE_NOT_RECV_FROM_ANYONE | The local does not receive any audio, which is equivalent to disable the speaker in the room. At this time, the parameter OpenIDForSend is invalid. You just need to enter null. |
AUDIO_ROUTE_RECV_FROM_ALL | The local receives everyone's audio. At this time, the parameter OpenIDForSend is invalid. You just need to enter null. |
AUDIO_ROUTE_RECV_BLACK_LIST | The local does not receive the audio of people in the blocklist. The blocklist is provided by the parameter OpenIDForSend. |
AUDIO_ROUTE_RECV_WHITE_LIST | The local will only receive the audio of people in the allowlist. The allowlist is provided by the parameter OpenIDForSend. |
@synthesize _sendListArray;@synthesize _recvListArray;int ret = [[[ITMGContext GetInstance] GetRoom] SetServerAudioRouteSendOperateType:SendType SendList:_sendListArray RecvOperateType:RecvType RecvList:_recvListArray];if (ret != QAV_OK) {UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Failed to update audioroute list" message:[NSString stringWithFormat:@"error code:%d",ret] delegate:NULL cancelButtonTitle:@"OK" otherButtonTitles:nil];[alert show];}
-(void)OnEvent:(ITMG_MAIN_EVENT_TYPE)eventType data:(NSDictionary *)data{NSString* log =[NSString stringWithFormat:@"OnEvent:%d,data:%@", (int)eventType, data];switch (eventType) {case ITMG_MAIN_EVENT_TYPE_SERVER_AUDIO_ROUTE_EVENT:{{UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Update audioroute" message:[NSString stringWithFormat:@"Result:%@,sub_type: %@ errorinof: %@", data[@"result"],data[@"sub_type"],data[@"error_info"]] delegate:NULL cancelButtonTitle:@"OK" otherButtonTitles:nil];[alert show];}}default:break;}}
public abstract ITMG_SERVER_AUDIO_ROUTE_SEND_TYPE GetCurrentSendAudioRoute(List<string> OpenIDforSend);public abstract ITMG_SERVER_AUDIO_ROUTE_RECV_TYPE GetCurrentRecvAudioRoute(List<string> OpenIDforRecve);
-(ITMG_SERVER_AUDIO_ROUTE_SEND_TYPE)GetCurrentSendAudioRoute:(NSMutableArray *) OpenIDForSend;-(ITMG_SERVER_AUDIO_ROUTE_RECV_TYPE)GetCurrentRecvAudioRoute:(NSMutableArray *) OpenIDForRecv;
Receiving Type | Effect |
AUDIO_ROUTE_NOT_SEND_TO_ANYONE | The local audio is sent upstream to the backend, but the backend does not forward to anyone, which is equivalent to mute the local. |
AUDIO_ROUTE_SEND_TO_ALL | The local audio is sent upstream to everyone. |
AUDIO_ROUTE_SEND_BLACK_LIST | The local audio is sent upstream and will not be forwarded to people in the blocklist. |
AUDIO_ROUTE_SEND_WHITE_LIST | The local audio is sent upstream and is forwarded to people in the allowlist. |
AUDIO_ROUTE_RECV_INQUIRE_ERROR | An error occurred during obtaining. Check whether the local has entered the room and whether the SDK has been initialized. |
Receiving Type | Effect |
AUDIO_ROUTE_NOT_RECV_FROM_ANYONE | The local does not receive any audio, which is equivalent to disable the speaker in the room. |
AUDIO_ROUTE_RECV_FROM_ALL | The local receives everyone's audio. |
AUDIO_ROUTE_RECV_BLACK_LIST | The local does not receive the audio of people in the blocklist. |
AUDIO_ROUTE_RECV_WHITE_LIST | The local will only receive the audio of people in the allowlist. |
AUDIO_ROUTE_RECV_INQUIRE_ERROR | An error occurred during obtaining. Check whether the local has entered the room and whether the SDK has been initialized. |
AUDIO_ROUTE_RECV_INQUIRE_ERROR
in the SetServerAudioRouteSendOperateType
API.
Was this page helpful?