-
Notifications
You must be signed in to change notification settings - Fork 27
Description
LiveKit Unity version: 1.5.1
Unity version: 2023.2.5 & 6.0.0.5
Steps to reproduce:
- Create a new WebGL project in Unity
- From the Package Manager import the LiveKit package (via the git URL)
- From the same Package Manager window, import the Livekit sample from the Samples tab
- In
ExampleAssembly.asmdef
under Assets\Samples\LiveKit WebGL SDK\1.5.1\Example\ExampleRoom, add the LiveKitBridge reference - Generate a token in LiveKit Cloud
- In
JoinScene.unity
, copy the LiveKit Cloud project URL & token to the input fields under the UI Canvas - Edit the
ExampleRoom.cs
file and add the following after line 50 (at the end of theStart()
method):
yield return m_Room.LocalParticipant.SetScreenShareEnabled(true);
- Build and Run the project
- Accept all permission requests
- Click on the Connect button and accept the permission requests
- When the Screen Share dialog pops up, select the 'Window' tab and then select an open application window
Result:
The video track shows up momentarily and then disappears.
The track gets created via the HandleAddedTrack()
method in ExampleRoom.cs and then HandleRemovedTrack()
gets called immediately after & the video track is removed.
NOTE: This does not happen when selecting any Chrome tab or the Entire Screen option in the Screen Share dialog. This can be tested by clicking on the Disconnect button in the RoomScene and then connecting again.
Expected Behaviour:
Screen share video track is displayed like it is for the Chrome Tab and Entire Screen options.
Looks to be similar to this issue: livekit/client-sdk-flutter#463