It'd be a very flexible approach to be able to manually set priorities for tracks. A (non-default) priority could influence the stream allocation based on the application needs by (de-)prioritizing specific tracks, making sure the bandwidth needs for the ones marked with higher priority are satisfied first.
It could be a hint for published tracks
const pub = await room.localParticipant.publishTrack(mediaStreamTrack, {
name: 'mytrack',
priority: 2
})
but in the best case scenario also for subscriptions
function handleTrackSubscribed(
track: RemoteTrack,
publication: RemoteTrackPublication,
participant: RemoteParticipant
) {
if (track.kind === Track.Kind.Video) {
publication.setPriority(2)
}
}
Common application examples I can think of:
- prioritizing all audio tracks over video tracks (or vice versa)
- prioritizing screen share tracks over regular video tracks
- prioritizing certain video (and audio) tracks of participants on a "stage"
I'm not sure if this would be in any way connected to the work going on around the stream allocator (e.g. #257).
It'd be a very flexible approach to be able to manually set priorities for tracks. A (non-default) priority could influence the stream allocation based on the application needs by (de-)prioritizing specific tracks, making sure the bandwidth needs for the ones marked with higher priority are satisfied first.
It could be a hint for published tracks
but in the best case scenario also for subscriptions
Common application examples I can think of:
I'm not sure if this would be in any way connected to the work going on around the stream allocator (e.g. #257).