This message was deleted.
# cloud
s
This message was deleted.
a
Hi Umut, the client will get an TrackStreamStateChanged event when a track is paused. • If you’re using the JS SDK, you can listen to that event • If you’re using the React SDK (with the
useParticipant
hook) the track
.paused
attribute will be
true
if it is paused (docs) you can read the event docs here: https://docs.livekit.io/client/events/#events
q
thanks, but when it paused we still need latest picture and it doesnt allow. how we can workaround it? as i see in react repo it creates empty stream with black screen by canvas
d
When a publisher pauses publishing, there will be no video data forwarded to the subscriber. During this time, you would not need to render the video element on the receiver side.
q
but publisher doesnt stop publishing. I’ve seen that in streamtracker all of video layers removed when it doesnt send new frames. but for screen share there is an exception to keep one layer because of if screen not moving
https://github.com/livekit/livekit/blob/aba18accd9cc2ec638c01b4296d21ede8d21ee3e/pkg/sfu/streamtrackermanager.go#L1 its all about this file. I think this configs should be set by config.yml not hardcoded. in my use case I’ve to disable them to not get black screen on pauses (react sdk does by creating empty canvas on pause events)
as i reviewed there is no logic to see its paused because peers internet is slow or just keeps sending same frame
when sending same frame and internet connection is good, I dont think it should be throw pause and remove layers
to reproduce this problem you can use obs studio virtual camera and put an image on thane join a room with different peers. when you change image to a video it works but when you put image back it stucks (when first join if its just image gives empyt canvas as track)
d
I understand what you mean now! This makes sense. Can you open an issue for it? Also, if you are up for creating a PR to make it configurable, we'd be happy to take it.
f
@quaint-car-35828 In your example case of using a OBS studio virtual camera with a static image, is the encoder sending some minimum frame rate? Although it is a static image and there is no change, wondering if the encoder is sending anything at all periodically. For static screen share, browsers tend to do 1 fps or 0.5 fps. Interested in seeing if the same happens with static image or does it just send one frame and nothing after that?