void InitializeAgora() { rtcEngine = IRtcEngine.GetEngine(appID); rtcEngine.OnUserJoined += OnUserJoinedHandler; rtcEngine.OnLocalUserRegistered += OnLocalUserRegisteredHandler; rtcEngine.EnableVideo(); rtcEngine.EnableVideoObserver(); rtcEngine.JoinChannel("agora", null, 0); }
void OnApplicationQuit() { Debug.Log("OnApplicationQuit1"); if (mRtcEngine != null) { mRtcEngine.LeaveChannel(); mRtcEngine.DisableVideoObserver(); IRtcEngine.Destroy(); } Debug.Log("OnApplicationQuit2"); }
public void loadEngine() { Debug.Log("Loading engine"); if (mRtcEngine != null) { Debug.Log("Engine already loaded"); return; } mRtcEngine = IRtcEngine.getEngine(appId); }
void OnApplicationQuit() { Debug.Log("OnApplicationQuit"); if (mRtcEngine != null) { mRtcEngine.RemovePublishStreamUrl(RTMP_URL); mRtcEngine.LeaveChannel(); mRtcEngine.DisableVideoObserver(); IRtcEngine.Destroy(); } }
// Use this for initialization void Start() { Agora = IRtcEngine.GetEngine(appId); Agora.EnableVideo(); if (OnInitialize != null) { OnInitialize(); } }
// unload agora engine public void unloadEngine() { Debug.Log("calling unloadEngine"); // delete if (mRtcEngine != null) { IRtcEngine.Destroy(); mRtcEngine = null; } }
void UnloadEngine() { Debug.Log("calling unloadEngine"); // delete if (mRtcEngine != null) { IRtcEngine.Destroy(); // Place this call in ApplicationQuit mRtcEngine = null; } }
void InitRtcEngine() { mRtcEngine = IRtcEngine.GetEngine(APP_ID); mRtcEngine.SetExternalAudioSink(true, SAMPLE_RATE, CHANNEL); mRtcEngine.SetLogFile("log.txt"); mRtcEngine.OnJoinChannelSuccess += OnJoinChannelSuccessHandler; mRtcEngine.OnLeaveChannel += OnLeaveChannelHandler; mRtcEngine.OnWarning += OnSDKWarningHandler; mRtcEngine.OnError += OnSDKErrorHandler; mRtcEngine.OnConnectionLost += OnConnectionLostHandler; }
public void loadEngine() { Debug.Log("starting engine"); if (mRtcEngine != null) { Debug.Log("engine exists"); return; } mRtcEngine = IRtcEngine.getEngine(appid); mRtcEngine.SetLogFilter(LOG_FILTER.DEBUG); }
void ShowVersion() { GameObject go = GameObject.Find("VersionText"); if (go != null) { Text text = go.GetComponent <Text>(); var engine = IRtcEngine.GetEngine(AppID); Debug.Assert(engine != null, "Failed to get engine, appid = " + AppID); text.text = IRtcEngine.GetSdkVersion(); } }
public void loadEngine() { if (mRtcEngine != null) { Debug.Log("Engine already exists, please unload it"); return; } mRtcEngine = IRtcEngine.GetEngine(appId); mRtcEngine.SetLogFilter(LOG_FILTER.DEBUG); Debug.Log("initializing engine: " + mRtcEngine); }
private void ShowVersion() { // init engine mRtcEngine = IRtcEngine.GetEngine(AppID); // enable log mRtcEngine.SetLogFilter(LOG_FILTER.DEBUG | LOG_FILTER.INFO | LOG_FILTER.WARNING | LOG_FILTER.ERROR | LOG_FILTER.CRITICAL); GameObject textVersionGameObject = GameObject.Find("VersionText"); textVersionGameObject.GetComponent <Text>().text = "SDK Version : " + IRtcEngine.GetSdkVersion(); }
//------------------------------------------------------// //-------------------AGORA JOIN/LEAVE-------------------// //------------------------------------------------------// //Load / Unload Engine. Call this to init / destroy Agora public void loadEngine(string appId) { Debug.Log("initializeEngine"); if (mRtcEngine != null) { Debug.Log("Engine exists. Please unload it first!"); return; } // init engine mRtcEngine = IRtcEngine.GetEngine(appId); // enable log mRtcEngine.SetLogFilter(LOG_FILTER.DEBUG | LOG_FILTER.INFO | LOG_FILTER.WARNING | LOG_FILTER.ERROR | LOG_FILTER.CRITICAL); }
public void unloadEngine() { Debug.Log("destroying engine"); if (mRtcEngine == null) { Debug.Log("no engine to destroy"); return; } IRtcEngine.Destroy(); mRtcEngine = null; }
void endCall() { Debug.Log("End call."); mRtcEngine.EnableLocalVideo(false); mRtcEngine.DisableVideo(); // leave channel mRtcEngine.LeaveChannel(); // deregister video frame observers in native-c code mRtcEngine.DisableVideoObserver(); IRtcEngine.Destroy(); mRtcEngine = null; }
private bool LoadEngine(string appId, AREA_CODE areaCode) { UnloadEngine(); _RtcEngine = IRtcEngine.GetEngine(new RtcEngineConfig(appId, new LogConfig(), areaCode)); if (_RtcEngine == null) { return(false); } _RtcEngine.SetLogFilter(LOG_FILTER.DEBUG | LOG_FILTER.INFO | LOG_FILTER.WARNING | LOG_FILTER.ERROR | LOG_FILTER.CRITICAL); return(true); }
public void loadEngine() { // Debug.Log("initialize engine"); if (mRtcEngine != null) { Debug.Log("Engine already exits. Please unload it first!"); return; } //init RTC engine mRtcEngine = IRtcEngine.getEngine(appId); mRtcEngine.SetLogFilter(LOG_FILTER.DEBUG); }
void InitRtcEngine() { mRtcEngine = IRtcEngine.GetEngine(APP_ID); mRtcEngine.SetAudioProfile(AUDIO_PROFILE_TYPE.AUDIO_PROFILE_MUSIC_HIGH_QUALITY, AUDIO_SCENARIO_TYPE.AUDIO_SCENARIO_GAME_STREAMING); mRtcEngine.SetExternalAudioSource(true, SAMPLE_RATE, CHANNEL); mRtcEngine.SetLogFile("log.txt"); mRtcEngine.OnJoinChannelSuccess += OnJoinChannelSuccessHandler; mRtcEngine.OnLeaveChannel += OnLeaveChannelHandler; mRtcEngine.OnWarning += OnSDKWarningHandler; mRtcEngine.OnError += OnSDKErrorHandler; mRtcEngine.OnConnectionLost += OnConnectionLostHandler; }
void OnApplicationQuit() { Debug.Log("OnApplicationQuit"); if (mRtcEngine != null) { mRtcEngine.LeaveChannel(); mRtcEngine.DisableVideoObserver(); if (_audioRawDataManager != null) { AudioRawDataManager.ReleaseInstance(); } IRtcEngine.Destroy(); } }
//------------------------------------------------------// //------------AGORA MISCELLANEOUS FUNCTIONS-------------// //------------------------------------------------------// public string getSdkVersion() { string ver = IRtcEngine.GetSdkVersion(); if (ver == "2.9.1.45") { ver = "2.9.2"; } // A conversion for the current internal version# else if (ver == "2.9.1.46") { ver = "2.9.2.1"; } return(ver); }
private AgoraVideoController() { Debug_Log("Agora IRtcEngine Version : " + IRtcEngine.GetSdkVersion()); QualitySettings.vSyncCount = 0; Application.targetFrameRate = 30; mRtcEngine = IRtcEngine.GetEngine(Tanks.GameSettings.s_Instance.AgoraAppId); Debug.Assert(mRtcEngine != null, "Can not create Agora RTC Engine instance!"); if (mRtcEngine != null) { agoraAPI = new AgoraApiHandlersImpl(mRtcEngine); } Setup(); }
public void Initialize() { _rtcEngine = IRtcEngine.QueryEngine(); if (_rtcEngine != null) { _audioRawDataManager = AudioRawDataManager.GetInstance(_rtcEngine); _initialized = true; } else { _initialized = false; } }
void OnApplicationQuit() { Debug.Log("OnApplicationQuit"); if (mRtcEngine != null) { channel1.LeaveChannel(); channel2.LeaveChannel(); channel1.ReleaseChannel(); channel2.ReleaseChannel(); mRtcEngine.DisableVideoObserver(); IRtcEngine.Destroy(); } }
public void loadEngine() { //start sdk Debug.Log("Initializing Engine"); if (mrtcEngine != null) { Debug.Log("Engine already Exits...please unload"); return; } //init rtc engine mrtcEngine = IRtcEngine.GetEngine(appId); //set log level mrtcEngine.SetLogFilter(LOG_FILTER.DEBUG); }
void OnApplicationQuit() { if (webCameraTexture) { webCameraTexture.Stop(); } if (mRtcEngine != null) { mRtcEngine.LeaveChannel(); mRtcEngine.DisableVideoObserver(); IRtcEngine.Destroy(); mRtcEngine = null; } }
public IRtcEngine loadEngine() { if (!ReferenceEquals(RtcEngine, null)) { return(RtcEngine); } // 初始化TTTRtcEngine RtcEngine = IRtcEngine.GetEngine(AppID); // // enable log // RtcEngine.SetLogFilter (LOG_FILTER.DEBUG | LOG_FILTER.INFO | LOG_FILTER.WARNING | LOG_FILTER.ERROR | LOG_FILTER.CRITICAL); return(RtcEngine); }
private void Initialize() { IRtcEngine engine = IRtcEngine.QueryEngine(); if (engine != null) { var videoRawDataManager = VideoRawDataManager.GetInstance(engine); videoRawDataManager.SetOnRenderVideoFrameCallback(OnRenderVideoFrameHandler); _IsInitialized = true; } else { _IsInitialized = false; } }
private void InitEngine() { mRtcEngine = IRtcEngine.GetEngine(APP_ID); mRtcEngine.SetLogFile("log.txt"); mRtcEngine.EnableAudio(); mRtcEngine.EnableVideo(); mRtcEngine.EnableVideoObserver(); mRtcEngine.OnJoinChannelSuccess += OnJoinChannelSuccessHandler; mRtcEngine.OnLeaveChannel += OnLeaveChannelHandler; mRtcEngine.OnWarning += OnSDKWarningHandler; mRtcEngine.OnError += OnSDKErrorHandler; mRtcEngine.OnConnectionLost += OnConnectionLostHandler; mRtcEngine.OnUserJoined += OnUserJoinedHandler; mRtcEngine.OnUserOffline += OnUserOfflineHandler; }
void InitRtcEngine() { mRtcEngine = IRtcEngine.GetEngine(APP_ID); mRtcEngine.SetLogFile("log.txt"); mRtcEngine.OnJoinChannelSuccess += OnJoinChannelSuccessHandler; mRtcEngine.OnLeaveChannel += OnLeaveChannelHandler; mRtcEngine.OnWarning += OnSDKWarningHandler; mRtcEngine.OnError += OnSDKErrorHandler; mRtcEngine.OnConnectionLost += OnConnectionLostHandler; GetAudioRecordingDevice(); GetAudioPlaybackDevice(); GetVideoDeviceManager(); SetCurrentDevice(); SetCurrentDeviceVolume(); ReleaseDeviceManager(); }
void Start() { audio = false; video = false; rtcEngine = IRtcEngine.GetEngine(appId); print(rtcEngine); rtcEngine.OnJoinChannelSuccess = OnJoinChannelSuccess; rtcEngine.OnUserJoined = OnUserJoined; rtcEngine.OnUserOffline = OnUserOffline; rtcEngine.OnLeaveChannel = OnLeaveChannel; rtcEngine.EnableVideo(); rtcEngine.EnableVideoObserver(); rtcEngine.SetLogFilter(LOG_FILTER.DEBUG | LOG_FILTER.INFO | LOG_FILTER.WARNING | LOG_FILTER.ERROR | LOG_FILTER.CRITICAL); print(ChannelManager.ChannelName); print(rtcEngine.JoinChannel(ChannelManager.ChannelName, null, 0)); }