bulky-house-11843
10/23/2023, 2:03 PMscreen to true in the LiveKitRoom provider I can easily change the current track being used in the room while the streaming is happening but it has a weird behavior of asking the screen sharing permissions right when the streamer opens the room instead of when we change the current track shown to be the screen sharing.
I also managed to make it work by rebuilding the LiveKitRoom provider when the streamer selects to share screen, this way they only have to give permission for their screen sharing when they actively select to do so but the problem is that the whole room seems to go down for a second when this happens, erasing the chat history completely for both streamer and users watching.
So I wanted to know if there is any better way to handle this.
Note: This is not super important, the first situation where we ask screen sharing permissions right off the bat is fine for me, it's mostly me trying to polishing some user experience points.
NEVERMIND: Just found you can use TrackToggle to turn screen sharing from inside the room that was initiated without screen sharing permission.