-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for local priority in presets #677
Conversation
🦋 Changeset detectedLatest commit: 221f819 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg, how well does the priorities work in practice? does it show a visible improvement when using NLC?
super(); | ||
this.pc = new RTCPeerConnection(config); | ||
this.pc = isChromiumBased() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be
isChromiumBased() ? new RTCPeerConnection(config, mediaConstraints) : new RTCPeerConnection(config)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, of course, thanks!
encodings = [ | ||
{ | ||
maxBitrate: opts.audioBitrate, | ||
maxBitrate: opts.audioPreset?.maxBitrate ?? opts.audioBitrate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we avoid setting this field if left as undefined? I know we had issues with FF before with leaving FPS as undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opts gets merged with trackPublishDefaults in publishTrack
so it should always be defined!
just did some tests on chrome: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg!
In order to satisfy TS I had to update to v5.0.0 which makes this PR a bit unwieldy.
TS 5.0 changes are only to make type imports explicit (we had this setting before already, but 5.0 caught a lot more cases)
This PR adds support to construct video and audio presets with an additional
priority
option which (on supported browsers) tells the browser about how to distribute available resources (cpu + network) between different tracks.audioBitrate
setting onTrackPublishDefaults
in favor ofaudioPreset
that now includespriority
high
, screen share video tracksmedium
and camera video trackslow