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

Support setCodecPreferences #698

Open
tresnaa opened this issue Jul 3, 2020 · 3 comments
Open

Support setCodecPreferences #698

tresnaa opened this issue Jul 3, 2020 · 3 comments

Comments

@tresnaa
Copy link

tresnaa commented Jul 3, 2020

Hi, I want to implement set codecs before call.
Can I play with setCodecPreferences in simple-peer? or anything method to implement it.

Thank you.

@nazar-pc
Copy link
Collaborator

nazar-pc commented Jul 3, 2020

I do not think there is currently a public API to access transceivers created internally

@t-mullen
Copy link
Collaborator

t-mullen commented Aug 7, 2020

You can always access the private RTCPeerConnection. This isn't public API or supported at all, so here be dragons.

const transceivers = peer._pc.getTransceivers()
// select the desired transceiver
transceivers[0].setCodecPreferences(codecs)

I've changed this into a feature request in the meantime.

@t-mullen t-mullen changed the title Can I play with setCodecPreferences? Support setCodecPreferences Aug 7, 2020
@pragmatech
Copy link

Although I set audio constraint to: channelCount: 2, my otherwise robust little express/socket.io server doesn't seem to connect stereo audio. Is this setCodecPreferences area relevant? Any pointers appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants