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

Firefox case when screen and camera offer together #2107

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Commits on Jan 31, 2022

  1. Firefox case when screen and camera offer together

    Firefox camera tracks do not fire onTrack when screen share
    and camera is negotiated in the same offer.
    
    There were two issues
    
    1. When updateRemoteDescription runs, only the first
    media description of a specific kind was considered.
    So, when screen was before camera, screen did not
    $ave RID in extmap. It is in the camera section as
    video is using simulcast. All the extra ones in the
    camera section were ignored.
    
    Parse all descriptions and collect extensions to fix it.
    
    2. This one sounds like a Firefox issue. When sending
    answer back, if the screen share section has the
    RID, Firefox seems to get stuck. It does not send
    screen or camera media and after 15 seconds, the
    peer connection fails.
    
    To address that, store extensions from SDP in
    transceiver and while constructing answer SDP,
    cross check against transceiver's negotiated
    extensions before adding it to the answer SDP.
    
    The reason I think this is a Firefox issue is
    because how it behaves before this change when
    camera is negotiated first and screen later in
    a separate offer. When screen is negotiated
    later, answer does send back RID and it works.
    Looks like Firefox has an issue seeing RID
    before it expects it.
    
    Testing
    --------
    Used LiveKit JS SDK sample to negotiate screen and
    camera together.
    
    This was not an issue with Chrome as I could not
    get Chrome to negotiate screen and camera in the
    same offer with screen ahead of camera.
    boks1971 committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    e5c9056 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9498a64 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2022

  1. Ignore explicit SSRCes in RID Simulcast processing

    If the SRTP Stream hasn't been opened yet we would attempt to process
    (and fail) RTP traffic. This change causes us to not even attempt to
    read.
    
    No behavior change from this, but will cause less useless logging.
    Sean-Der authored and boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    55de02b View commit details
    Browse the repository at this point in the history
  2. Don't close the SRTP Stream in handleIncomingSSRC

    `AcceptStream` will then be fired again for this SSRC. We depend on the
    behavior of AcceptStream only returning once for each SSRC.
    Sean-Der authored and boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    ad48d0d View commit details
    Browse the repository at this point in the history
  3. Update golang.org/x/net commit hash to cd36cc0

    Generated by renovateBot
    renovate-bot authored and boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    f400e1a View commit details
    Browse the repository at this point in the history
  4. Add test for 65b517

    Assert that Simulcast probe thread doesn't close the Tracks that have
    been emitted to the user.
    Sean-Der authored and boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    687d924 View commit details
    Browse the repository at this point in the history
  5. Use ICE role to set DTLS role in answer

    When creating answer, check ICE role while determining DTLS role.
    ORTC thread on how roles are set
    w3c/ortc#167 (comment)
    
    When remote is ice-lite and there is no answering role set,
    the answer uses the default which is DTLS client. So 'setup'
    is set as 'active' and answer sent.
    
    But, when DTLS transport is started, it checks the ICE role
    and sets itself as DTLS server (because remote is lite
    and hence local agent becomes controlling ICE agent).
    
    So, both sides end up being DTLS server and nobody sends
    client hello.
    boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    de26dbf View commit details
    Browse the repository at this point in the history
  6. Remove ICETransportStateNew check in DTLS Start

    DTLS should be able to be negotiated over an already established
    ICETransport
    
    Resolves #2113
    bryphe-coder authored and boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    5e99129 View commit details
    Browse the repository at this point in the history
  7. Update DTLS to v2.1.2

    DTLS v2.1.2 fixes a bug with long delay connections.
    https://github.com/pion/dtls/releases/tag/v2.1.2
    boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    9757a0e View commit details
    Browse the repository at this point in the history
  8. Update all examples with copySessionDescription

    copySessionDescription adds a button to all examples that copies the
    local Session Description. This makes it easier for users to copy the
    values.
    
    Resolves #2092
    Roman Romanenko authored and boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    0049913 View commit details
    Browse the repository at this point in the history
  9. Add StandardJS workflow

    Been running these locally only.
    Sean-Der authored and boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    1d3ab0f View commit details
    Browse the repository at this point in the history
  10. Update actions/setup-node action to v2

    Generated by renovateBot
    renovate-bot authored and boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    420fc85 View commit details
    Browse the repository at this point in the history
  11. DTLS retransmission interval setting

    Add SetDTLSRetranmissionInterval setting to SettingEngine.
    
    Add test for SetDTLSRetransmissionInterval
    boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    e0baf30 View commit details
    Browse the repository at this point in the history
  12. Update CI configs to v0.6.6

    Update lint scripts and CI configs.
    pionbot authored and boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    6a63f16 View commit details
    Browse the repository at this point in the history
  13. Add DTLS, ICE and SCTP Transport to WASM

    Only available in the browser, not in wrtc yet.
    
    Resolves #2099
    Sean-Der authored and boks1971 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    5a5c1ce View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    395cb28 View commit details
    Browse the repository at this point in the history