Comments (3)
Concern was raised in yesterday's meeting over the web compatibility of introducing this change in behavior now.
Let's examine cases where existing websites might feature-detect and call setCodecPreferences
in Chromium and Safari and their possibility of breakage.
No breakage:
- calling it in "stable" alongside other methods like addTrack/addTransceiver/setStreams/direction/createDataChannel
- calling it in "have-remote-offer" as part of answering
- not using a
negotiationneeded
event listener to negotiate - using sLD() without arguments to negotiate
Breakage of intent:
- calling it with the intent for it to take effect in a much later negotiation, or not at all
- breakage = updates too soon (seems mild), or updates when it shouldn't (seems esoteric/rare)
Negotiation completes but logs an error:
- calling it in "stable" without any other methods (using sLD(offerFromCreateOffer) to negotiate)
- calling it in "have-remote-offer" after answering
Negotiation breaks:
- I can't think of any cases, though it would require custom code in
negotiationneeded
event handler (or double code) that requires tight control of when it can be called (which seems unlikely to me) - Maybe some SFU cases I haven't thought about?
- Applications explicitly written to terminate on any unexpected error logged (doctor it hurts when I do this)
Happy to field questions on any of these.
from webrtc-pc.
It's a stretch of the imagination, but one can imagine a setup like this (equivalent to your "breakage of intent" setup):
- Negotiate an initial connection (DC only, for instance)
- set up a negotiationneeded handler that does an immediate O/A
- start preparing for the "real" negotiation
-
- call SetCodecPreferences
-
- ask for camera/microphone permission
-
- add tracks when permission is given
- based on the onnegotiationneeded from addTracks, negotiate the final config based on the negotiationneeded in "add tracks"
The change will then cause an extra negotiation without the media tracks, which may or may not have any bad effects.
The fix would be "move the handler setup to just before the addTrack". But it is a change in behavior.
from webrtc-pc.
- call SetCodecPreferences
- ask for camera/microphone permission
- add tracks when permission is given
This order seems unlikely, since there's no transceiver to call setCodecPreferences on ahead of addTrack.
from webrtc-pc.
Related Issues (20)
- Update the accessibility section 14 to include RFC 8865 for real-time text in WebRTC data channel HOT 43
- Clarify a=rtpmap codec mappings should be offered even if the codec is not a preferred one HOT 20
- Existing setCodecPreferences NOTE is wrong and should be deleted HOT 8
- Specify what should happen if filtering [[PreferredCodecs]]Β on direction results in empty list HOT 7
- setCodecPreferences, sendonly codecs and dummy codecs HOT 21
- If a preferred codec is filtered out, does it still get assigned a PT? HOT 16
- Proposing setCodecPreferences to deal with both send and recv codecs HOT 6
- RTCSessionDescriptionInit vs "local" RTCLocalSessionDescriptionInit HOT 2
- Review mute/unmute/ended and constraints on RTCRtpReceiver's track. HOT 2
- Alternative storage for RTCCertificates needed HOT 6
- simple webrtc connection and manual signaling (QR, JSON, Carrier pigeon) - consent time out prevents connection HOT 3
- RTCIceCandidate's relayProtocol and url members can be null but not absent
- Missing tests for candidate amendments
- Incorporate jitterBufferTarget
- Confusion over duplicates in setCodecPreferences? Why allow them? HOT 10
- receiver.getParameters().codecs is broken (regression) HOT 4
- setCodecPreferences should take sequence<RTCRtpCodec>
- Implementations only update getParameters().codecs when negotiation has finished HOT 3
- Comparison rules for RTCRtpCodec needs clarification on how mimeType is compared HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webrtc-pc.