예제 #1
0
 private void OnDestroy()
 {
     if (client)
     {
         client.OnJoinedRoom.RemoveListener(OnJoinedRoom);
         client.OnPeerRemoved.RemoveListener(OnPeerRemoved);
         client.OnRoomUpdated.RemoveListener(OnRoomUpdated);
     }
     peerConnectionSource = null;
 }
예제 #2
0
        private void Awake()
        {
            peerConnectionSource = new RTCPeerConnectionSource();
            client = GetComponentInParent <RoomClient>();
            peerUuidToConnection = new Dictionary <string, VoipPeerConnection>();
            OnPeerConnection.SetExisting(peerUuidToConnection.Values);

            audioSource = CreateAudioSource();
            audioSource.StartAudio();
        }