Coder Social home page Coder Social logo

Comments (3)

jan-ivar avatar jan-ivar commented on July 22, 2024

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:

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.

alvestrand avatar alvestrand commented on July 22, 2024

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.

jan-ivar avatar jan-ivar commented on July 22, 2024
    • 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.