Skip to content

Commit

Permalink
Apparently, a video track can be published even though room.IsConnect…
Browse files Browse the repository at this point in the history
…ed is false.
  • Loading branch information
koschke committed Jan 14, 2025
1 parent 3400ae7 commit e834e58
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Assets/SEE/Tools/Livekit/LivekitVideoManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ private IEnumerator JoinRoom(string token)
/// <returns>Coroutine to handle the asynchronous publishing process.</returns>
private IEnumerator PublishVideo()
{
if (room == null || !room.IsConnected)
if (room == null)
{
ShowNotification.Error("Livekit", "Not connected.");
yield break;
Expand Down Expand Up @@ -324,8 +324,6 @@ private IEnumerator PublishVideo()
};

// Publish the video track to the room.
Debug.Log($"[Livekit] Connection state: {room.IsConnected}\n");
UnityEngine.Assertions.Assert.IsNotNull(room, "Room is null");
UnityEngine.Assertions.Assert.IsNotNull(room.LocalParticipant, "Local participant is null");
PublishTrackInstruction publish = room.LocalParticipant.PublishTrack(track, options);
yield return publish;
Expand Down

0 comments on commit e834e58

Please sign in to comment.