ios_to_code static method
Implementation
static SingleStreamTaskErrorCode ios_to_code(
$p_i.ByteRTCSingleStreamTaskErrorCode value) {
var $m = {
$p_i.ByteRTCSingleStreamTaskErrorCode.ByteRTCSingleStreamTaskErrorCodeOK:
SingleStreamTaskErrorCode.ok,
$p_i.ByteRTCSingleStreamTaskErrorCode
.ByteRTCSingleStreamTaskErrorCodeBase: SingleStreamTaskErrorCode.base,
$p_i.ByteRTCSingleStreamTaskErrorCode
.ByteRTCSingleStreamTaskErrorCodeUnknownByServer:
SingleStreamTaskErrorCode.unknown_by_server,
$p_i.ByteRTCSingleStreamTaskErrorCode
.ByteRTCSingleStreamTaskErrorCodeSignalRequestTimeout:
SingleStreamTaskErrorCode.signal_request_timeout,
$p_i.ByteRTCSingleStreamTaskErrorCode
.ByteRTCSingleStreamTaskErrorCodeInvalidParamByServer:
SingleStreamTaskErrorCode.invalid_param_by_server,
$p_i.ByteRTCSingleStreamTaskErrorCode
.ByteRTCSingleStreamTaskErrorCodeRemoteKicked:
SingleStreamTaskErrorCode.remote_kicked,
$p_i.ByteRTCSingleStreamTaskErrorCode
.ByteRTCSingleStreamTaskErrorCodeJoinDestRoomFailed:
SingleStreamTaskErrorCode.join_dest_room_failed,
$p_i.ByteRTCSingleStreamTaskErrorCode
.ByteRTCSingleStreamTaskErrorCodeReceiveSrcStreamTimeout:
SingleStreamTaskErrorCode.receive_src_stream_timeout,
$p_i.ByteRTCSingleStreamTaskErrorCode
.ByteRTCSingleStreamTaskErrorCodeNotSurportCodec:
SingleStreamTaskErrorCode.not_surport_codec,
};
if (!($m.containsKey(value))) {
throw Exception("invalid value:" + value.toString());
}
// @ts-ignore
return $m[value] as SingleStreamTaskErrorCode;
}