public static IAliRtcEngine GetEngine(string extras) { if (instance == null) { instance = new IAliRtcEngine(extras); } return(instance); }
private static void OnUpdateRoleNotifyCallback(int oldRole, int newRole) { #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX if ((IAliRtcEngine.OnUpdateRoleNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { IAliRtcEngine.OnUpdateRoleNotify(oldRole, newRole); }); } #else if ((instance.OnUpdateRoleNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { instance.OnUpdateRoleNotify(oldRole, newRole); }); } #endif }
private static void OnOccurErrorNotifyCallback(int error) { #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX if ((IAliRtcEngine.OnOccurErrorNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { IAliRtcEngine.OnOccurErrorNotify(error); }); } #else if ((instance.OnOccurErrorNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { instance.OnOccurErrorNotify(error); }); } #endif }
private static void OnLeaveChannelResultNotifyCallback(int result) { #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX if ((IAliRtcEngine.OnLeaveChannelResultNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { IAliRtcEngine.OnLeaveChannelResultNotify(result); }); } #else if ((instance.OnLeaveChannelResultNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { instance.OnLeaveChannelResultNotify(result); }); } #endif }
private static void OnConnectionRecoveryNotifyCallback() { #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX if (IAliRtcEngine.OnConnectionRecoveryNotify != null && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { IAliRtcEngine.OnConnectionRecoveryNotify(); }); } #else if (instance.OnConnectionRecoveryNotify != null && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { instance.OnConnectionRecoveryNotify(); }); } #endif }
private static void OnNetworkQualityChangedNotifyCallback(string userId, int upQuality, int downQuality) { #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX if ((IAliRtcEngine.OnNetworkQualityChangedNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { IAliRtcEngine.OnNetworkQualityChangedNotify(userId, upQuality, downQuality); }); } #else if ((instance.OnNetworkQualityChangedNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { instance.OnNetworkQualityChangedNotify(userId, upQuality, downQuality); }); } #endif }
private static void OnSubscribeChangedNotifyCallback(string userId, int audioTrack, int videoTrack) { #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX if ((IAliRtcEngine.OnSubscribeChangedNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { IAliRtcEngine.OnSubscribeChangedNotify(userId, audioTrack, videoTrack); }); } #else if ((instance.OnSubscribeChangedNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { instance.OnSubscribeChangedNotify(userId, audioTrack, videoTrack); }); } #endif }
private static void OnRemoteUserOffLineNotifyCallback(string userId) { #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX if ((IAliRtcEngine.OnRemoteUserOffLineNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { IAliRtcEngine.OnRemoteUserOffLineNotify(userId); }); } #else if ((instance.OnRemoteUserOffLineNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { instance.OnRemoteUserOffLineNotify(userId); }); } #endif }
private static void OnJoinChanneNotifyCallback(int errorCode) { #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX if ((IAliRtcEngine.OnJoinChannelNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { IAliRtcEngine.OnJoinChannelNotify(errorCode); }); } #else if (instance != null && (instance.OnJoinChannelNotify != null) && AliRtcEngineCallBackQueue.Current != null) { AliRtcEngineCallBackQueue.Current.EnQueue(() => { instance.OnJoinChannelNotify(errorCode); }); } #endif }