mirror of
https://github.com/livekit/livekit.git
synced 2026-04-05 10:15:47 +00:00
This fixes the case of screen share forwarding. We should probably also look at proper AddTrack. The problem was that - AddTrack used two layers for screen share from JS sample app - Track was published with rid = f. Given that and the track info, consistent layer mapping set the layer as 1. - `getBufferLocked` always uses the highest layer for SVC - Between the two, when down track was requesting PLI, there was no buffer at the requested layer and hence no PLI went out. A few other notes - Tried locking SVC to layer 0 (instead of layer 2), but that resulted in PLI layer lock spamming. It did not happen in v1.3.0 of the server though. Not sure what causes that. Need to investigate later. But, that does not happen when using layer 2 buffer as SVC buffer. - When using layer 2 for SVC, the PLI throttle config will be using that of layer 2. Is that okay? - `buffer` structure should maintain more stats about spatial layers for SVC case so that layer stats can be reported to analytics/scoring etc. - In general, `buffer` may need some more hooks to make it SVC aware so that it can handle various spetial layer aware/specific bits.