这是indexloc提供的服务,不要输入任何密码
Skip to content

Window screen share not working #55

@girish-d

Description

@girish-d

LiveKit Unity version: 1.5.1
Unity version: 2023.2.5 & 6.0.0.5

Steps to reproduce:

  1. Create a new WebGL project in Unity
  2. From the Package Manager import the LiveKit package (via the git URL)
  3. From the same Package Manager window, import the Livekit sample from the Samples tab
  4. In ExampleAssembly.asmdef under Assets\Samples\LiveKit WebGL SDK\1.5.1\Example\ExampleRoom, add the LiveKitBridge reference
  5. Generate a token in LiveKit Cloud
  6. In JoinScene.unity, copy the LiveKit Cloud project URL & token to the input fields under the UI Canvas
  7. Edit the ExampleRoom.cs file and add the following after line 50 (at the end of the Start() method):

yield return m_Room.LocalParticipant.SetScreenShareEnabled(true);

  1. Build and Run the project
  2. Accept all permission requests
  3. Click on the Connect button and accept the permission requests
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions