Skip to content
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

move codec selection to the receiver for more samples #1642

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

fippo
Copy link
Collaborator

@fippo fippo commented Nov 25, 2023

follow-up to #1640 which got copy-pasted quite a bit.

follow-up to webrtc#1640 which got copy-pasted quite a bit.
@fippo fippo force-pushed the setcodecpreferences-woes branch from f3bed9a to 00bdcc3 Compare November 25, 2023 10:27
@fippo fippo requested a review from alvestrand November 25, 2023 10:29
Copy link
Contributor

@alvestrand alvestrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks straightforward. Only comment is on a broken abstraction that was already present in the previoius version.

transceiver.setCodecPreferences(codecs);
if ('setCodecPreferences' in window.RTCRtpTransceiver.prototype) {
this.pc2.ontrack = (e) => {
if (e.track.kind === 'audio' && preferredAudioCodecMimeType ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. From surrounding text, it looks as if this should be a handler function, not an innate property of VideoPipe.
But that's a different refactoring from this one, so not a showstopper.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The good news is that we can now actually move it to the outside ontrack handler

@fippo fippo merged commit 16be3b1 into webrtc:gh-pages Nov 25, 2023
3 checks passed
@fippo fippo deleted the setcodecpreferences-woes branch November 25, 2023 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants