RtpSender.send() fails with InvalidStateError just if other RtpReceivers share the same DtlsTransport

Confirmed Issue #12459320 • Assigned to Shijun S.

Details

Author
Iñaki B.
Created
Jun 23, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Windows 10 Insider Preview 16226.1000

Having a connected RTCDtlsTransport:

  • Get a local audio+video stream via getUserMedia().
  • Create a RtpSender() with the audio track and the already connected DtlsTransport.
  • Same for webcam video.
  • Call send() on them with proper parameters (opus and VP8).
  • Call stop() on the video RtpSender.
  • Call again getUserMedia (just video) and create another RtpSender with the new video track and the same DtlsTransport.
  • Call send() on the new video RtpSender with proper parameters (VP8 with a different encodings[0].ssrc).
  • It will fail with InvalidStateError.

Now, if you repeat the same scenario without any RtpReceiver, it won’t fail.

To reproduce it, just open https://demo.mediasoup.org/#room-id=edge with Edge and:

  • Open the devtool console (in order to be easier to check what happens, filter just “errors” and “warnings”).
  • Remove the local webcam video by clicking on the webcam icon within the selfview (the video RtpSender was stopped and also its track).
  • Now click again to add it again (a new video RtpSender is created with a new local video track).
  • It works.

Now open the same link with Chrome/Firefox/Edge in other computer and so both computers join the same room. Then, again in Edge:

  • Remove the webcam video (it works).
  • Add webcam video again.

So, again, a new video RtpSender is created with a newly obtained local video track, but when calling send() on it, it fails with InvalidStateError.

NOTE: I’ve seen very similar issues also in RtpReceiver.receive() (specially when a remote peer reloads the page).

According to the spec, both send() and receive() should just fail with InvalidStateError if stop() was called on them or the DtlsTransport is “closed” or "failed", but this is not the case here (for sure).

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Shijun S.”

      Changed Status to “Confirmed”

    You need to sign in to your Microsoft account to add a comment.

    Sign in