コード例 #1
0
 void OnApplicationQuit()
 {
     if (mRtcEngine != null)
     {
         IRtcEngine.Destroy();
     }
 }
コード例 #2
0
ファイル: AgoraEngine.cs プロジェクト: joel-agora/VideoChat
 private void OnApplicationQuit()
 {
     userCount = 0;
     rtcEngine.LeaveChannel();
     IRtcEngine.Destroy();
     rtcEngine = null;
 }
コード例 #3
0
    void Start()
    {
        if (!photonView.isMine)
        {
            return;
        }


        playerVideoList = new List <GameObject>();

        // Setup Agora Engine and Callbacks.
        if (mRtcEngine != null)
        {
            IRtcEngine.Destroy();
        }

        originalChannel = channel;

        // -- These are all necessary steps to initialize the Agora engine -- //
        // Initialize Agora engine
        mRtcEngine = IRtcEngine.GetEngine(appID);

        // Setup our callbacks (there are many other Agora callbacks, however these are the calls we need).
        mRtcEngine.OnJoinChannelSuccess = OnJoinChannelSuccessHandler;
        mRtcEngine.OnUserJoined         = OnUserJoinedHandler;
        mRtcEngine.OnLeaveChannel       = OnLeaveChannelHandler;
        mRtcEngine.OnUserOffline        = OnUserOfflineHandler;

        // Your video feed will not render if EnableVideo() isn't called.
        mRtcEngine.EnableVideo();
        mRtcEngine.EnableVideoObserver();

        // By setting our UID to "0" the Agora Engine creates a new one and assigns it.
        mRtcEngine.JoinChannel(channel, null, 0);
    }
コード例 #4
0
 private void UnloadEngine()
 {
     if (_RtcEngine != null)
     {
         IRtcEngine.Destroy();
         _RtcEngine = null;
     }
 }
コード例 #5
0
 void OnApplicationQuit()
 {
     if (mRtcEngine != null)
     {
         mRtcEngine.LeaveChannel();
         IRtcEngine.Destroy();
     }
 }
コード例 #6
0
 public void unloadEngine()
 {
     if (!ReferenceEquals(RtcEngine, null))
     {
         IRtcEngine.Destroy();
         RtcEngine = null;
     }
 }
コード例 #7
0
 public void unloadEngine()
 {
     if (streamingSolution == EStreamingSolution.Agora && mRtcEngine != null)
     {
         IRtcEngine.Destroy();
         mRtcEngine = null;
     }
 }
コード例 #8
0
 void OnApplicationQuit()
 {
     Debug.Log("OnApplicationQuit");
     _pushAudioFrameThreadSignal = false;
     if (mRtcEngine != null)
     {
         IRtcEngine.Destroy();
     }
 }
コード例 #9
0
 public void unloadEngine()
 {
     Debug.Log("Unload Agora Engine!");
     if (mRtcEngine != null)
     {
         IRtcEngine.Destroy();
         mRtcEngine = null;
     }
 }
コード例 #10
0
 public void unloadEngine()
 {
     Debug.Log("calling unloadEngine");
     // delete and Place this call in ApplicationQuit
     if (mRtcEngine != null)
     {
         IRtcEngine.Destroy(); mRtcEngine = null;
     }
 }
コード例 #11
0
 public void unloadEngine()
 {
     Debug.Log("unloading engine");
     if (mRtcEngine != null)
     {
         IRtcEngine.Destroy();
         mRtcEngine = null;
     }
 }
コード例 #12
0
 private void TerminateAgoraEngine()
 {
     if (mRtcEngine != null)
     {
         mRtcEngine.LeaveChannel();
         mRtcEngine = null;
         IRtcEngine.Destroy();
     }
 }
コード例 #13
0
 public void unLoadEngine()
 {
     Debug.Log("Unloading Engine");
     if (mrtcEngine != null)
     {
         IRtcEngine.Destroy();
         mrtcEngine = null;
     }
 }
コード例 #14
0
 private void OnApplicationQuit()
 {
     //currentUsers--;
     if (mRtcEngine != null)
     {
         //mRtcEngine.LeaveChannel();
         mRtcEngine = null;
         IRtcEngine.Destroy();
     }
 }
 private void OnApplicationQuit()
 {
     if (mRtcEngine != null)
     {
         AudioRecordingDeviceManager.ReleaseInstance();
         mRtcEngine.LeaveChannel();
         IRtcEngine.Destroy();
         mRtcEngine = null;
     }
 }
コード例 #16
0
 void OnApplicationQuit()
 {
     Debug.Log("OnApplicationQuit");
     if (mRtcEngine != null)
     {
         mRtcEngine.LeaveChannel();
         mRtcEngine.DisableVideoObserver();
         IRtcEngine.Destroy();
     }
 }
コード例 #17
0
ファイル: AgoraTest.cs プロジェクト: jloudermilk/AgoraTest
    void endCall()
    {
        // leave channel
        mRtcEngine.LeaveChannel();
        // deregister video frame observers in native-c code
        mRtcEngine.DisableVideoObserver();

        IRtcEngine.Destroy();
        mRtcEngine = null;
    }
コード例 #18
0
    // unload agora engine
    public void unloadEngine()
    {
        logAPICall("calling unloadEngine");

        // delete
        if (mRtcEngine != null)
        {
            IRtcEngine.Destroy();
            mRtcEngine = null;
        }
    }
コード例 #19
0
    // unload agora engine
    public virtual void UnloadEngine()
    {
        Debug.Log("calling unloadEngine");

        // delete
        if (mRtcEngine != null)
        {
            IRtcEngine.Destroy();  // Place this call in ApplicationQuit
            mRtcEngine = null;
        }
    }
コード例 #20
0
 void OnApplicationQuit()
 {
     Debug.Log("OnApplicationQuit");
     if (mRtcEngine != null)
     {
         mRtcEngine.RemovePublishStreamUrl(RTMP_URL);
         mRtcEngine.LeaveChannel();
         mRtcEngine.DisableVideoObserver();
         IRtcEngine.Destroy();
     }
 }
コード例 #21
0
    public void unloadEngine()
    {
        Debug.Log("destroying engine");
        if (mRtcEngine == null)
        {
            Debug.Log("no engine to destroy");
            return;
        }

        IRtcEngine.Destroy();
        mRtcEngine = null;
    }
コード例 #22
0
    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;
    }
 void OnApplicationQuit()
 {
     Debug.Log("OnApplicationQuit");
     if (mRtcEngine != null)
     {
         mRtcEngine.LeaveChannel();
         mRtcEngine.DisableVideoObserver();
         if (_audioRawDataManager != null)
         {
             AudioRawDataManager.ReleaseInstance();
         }
         IRtcEngine.Destroy();
     }
 }
コード例 #24
0
    void Start()
    {
        if (!photonView.isMine)
        {
            return;
        }


        playerVideoList = new List <GameObject>();

        // Setup Agora Engine and Callbacks.
        if (mRtcEngine != null)
        {
            IRtcEngine.Destroy();
        }

        originalChannel = channel;

        // -- These are all necessary steps to initialize the Agora engine -- //
        // Initialize Agora engine
        mRtcEngine = IRtcEngine.GetEngine(appID);

        // Setup square video profile
        VideoEncoderConfiguration config = new VideoEncoderConfiguration();

        config.dimensions.width      = 480;
        config.dimensions.height     = 480;
        config.frameRate             = FRAME_RATE.FRAME_RATE_FPS_15;
        config.bitrate               = 800;
        config.degradationPreference = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
        mRtcEngine.SetVideoEncoderConfiguration(config);

        // Setup our callbacks (there are many other Agora callbacks, however these are the calls we need).
        mRtcEngine.OnJoinChannelSuccess = OnJoinChannelSuccessHandler;
        mRtcEngine.OnUserJoined         = OnUserJoinedHandler;
        mRtcEngine.OnLeaveChannel       = OnLeaveChannelHandler;
        mRtcEngine.OnUserOffline        = OnUserOfflineHandler;

        // Your video feed will not render if EnableVideo() isn't called.
        mRtcEngine.EnableVideo();
        mRtcEngine.EnableVideoObserver();

        // By setting our UID to "0" the Agora Engine creates a unique UID and returns it in the OnJoinChannelSuccess callback.
        mRtcEngine.JoinChannel(channel, null, 0);
    }
コード例 #25
0
 void OnApplicationQuit()
 {
     Debug.Log("OnApplicationQuit, clean up...");
     if (_previewing)
     {
         var engine = IRtcEngine.QueryEngine();
         if (engine != null)
         {
             engine.StopPreview();
             _previewing = false;
         }
     }
     if (!ReferenceEquals(app, null))
     {
         app.UnloadEngine();
     }
     IRtcEngine.Destroy();
 }
コード例 #26
0
    void Start()
    {
        pView = GetComponent <PhotonView>();

        if (mRtcEngine != null)
        {
            IRtcEngine.Destroy();
        }

        mRtcEngine = IRtcEngine.GetEngine(appID);

        mRtcEngine.OnJoinChannelSuccess = OnJoinChannelSuccessHandler;
        mRtcEngine.OnUserJoined         = OnUserJoinedHandler;
        mRtcEngine.OnLeaveChannel       = OnLeaveChannelHandler;
        mRtcEngine.OnUserOffline        = OnUserOfflineHandler;

        mRtcEngine.EnableVideo();
        mRtcEngine.EnableVideoObserver();

        mRtcEngine.JoinChannel(channel, null, 0);
    }