livekit / client-sdk-flutter

Flutter Client SDK for LiveKit
https://docs.livekit.io
Apache License 2.0
236 stars 112 forks source link

[bug] participant.setCameraEnabled(true); published multiple VideoTracks if pressed multiple times. #419

Open patrikheinonen opened 7 months ago

patrikheinonen commented 7 months ago

Describe the bug

participant.setCameraEnabled(true); published multiple VideoTracks if pressed multiple times.

Im wondering if setMicrophoneEnabled does this as well and if it does I hope it can be fixed as well.

To Reproduce

Run example and see video:

https://github.com/livekit/client-sdk-flutter/assets/36403567/e190bf3a-86b8-406d-b8e1-7ae52443b38d

There is no proper client end frontend workaround for this like _busy that the examples connect.dart uses for room connecting because if you never accept the permissions then you will get in a state that you cant publish your camera anymore with the participant.setCameraEnabled(true)

Expected behavior

In any scenario participant.setCameraEnabled(true) should not publish multiple same video tracks.

if setMicrophoneEnabled publishes multiple audio tracks in a similar manner it should not do so.

Platform information

Flutter Web

NirmalsinhRathod commented 5 months ago

Having the same problem in Flutter. Has anyone figured out a solution for this?

ArjunBhilare commented 2 months ago

@NirmalsinhRathod Did you find any solution?