mediaSubscribeParameters
function mediaSubscribeParameters(kind, overrides?): MessageParameters;Defined in: relay-sdks/ts/src/media-track-properties.ts:100
The subscription parameters a viewer gives a media track, so audio goes ahead of video when the downlink is congested
(spec/behavior.md, “Media subscribing”). Pass them to subscribe, want or switchTo:
subscriber.subscribe({ namespace, track: 'audio', parameters: mediaSubscribeParameters('audio') }, handlers);subscriber.subscribe({ namespace, track: 'video', parameters: mediaSubscribeParameters('video') }, handlers);The result is a SUBSCRIBER_PRIORITY of 16 for audio and 96 for video, lower being more urgent: the same values
mediaTrackProperties gives as publisher priorities. moq-relay 0.17 orders what it sends a viewer by subscriber
priority alone and ignores the publisher’s, so this is the priority that decides delivery there. It cannot be
changed later: on that relay any update() ends the subscription. overrides are copied onto the result, such as a
locationFilter; an explicit subscriberPriority, an integer from 0 to 255, replaces the default.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
kind |
MediaKind |
overrides? |
MessageParameters |