ripe-monitor-50671
02/27/2025, 3:02 PMgray-monkey-83525
02/27/2025, 3:02 PMTrackUnpublished
event in LiveKit. This event is triggered when a local track is unpublished, which includes when screen sharing is stopped. You can attach an event listener to handle this event and update your UI accordingly.
Here's a basic example using the LiveKit JS Client SDK:
const room = new Room();
room.on(RoomEvent.LocalTrackUnpublished, (trackPublication) => {
if (trackPublication.track.source === TrackSource.screenShareVideo) {
console.log('Screen sharing stopped');
// Update your UI here
}
});
Would you like more details on this process?
Sources:
- RoomEvent Documentation 👍 1 button 👎 0 button 💡 Hint: Mention @millions-hair-24956 in the thread for followups.