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

Spec says to send black frames for ended tracks #3014

Open
jan-ivar opened this issue Oct 30, 2024 · 3 comments
Open

Spec says to send black frames for ended tracks #3014

jan-ivar opened this issue Oct 30, 2024 · 3 comments

Comments

@jan-ivar
Copy link
Member

The spec says: "If track is ended, or if the track's output is disabled, i.e. the track is disabled and/or muted, the RTCRtpSender MUST send black frames (video) and MUST NOT send (audio). In the case of video, the RTCRtpSender SHOULD send one black frame per second. If track is null then the RTCRtpSender does not send."

This seems unequivocal: sender.track.stop() = send black frames!

Pity no browser is doing this. Try it (local video on the left, remote video on the right):

  • Chrome:
    image
  • Safari:
    image
  • Firefox:
    image

Ignoring the variance on the left (different issue), none of the browsers send black frames on ended.

Do we:

  1. File bugs on implementations?
  2. Or align the spec with implementations?
@jan-ivar
Copy link
Member Author

image

Two observations:

  • since the video on the left is the source of the video on the right, I'd expect stopping it to affect them the same
  • remote participants seeing a still of the user while the user's self-view is blacked out seems surprising in a bad way

@youennf
Copy link
Contributor

youennf commented Oct 31, 2024

  • since the video on the left is the source of the video on the right, I'd expect stopping it to affect them the same

I tend to agree, Firefox at least is consistent.

  • File bugs on implementations?
  • Or align the spec with implementations?

I am a bit reluctant to change what peer connection implementations are doing given they are all consistent.
We should try to get browser interop for the local preview.

@eladalon1983
Copy link
Member

Transmitted frames are not guaranteed to be received and decoded. Quality Web applications should robustly treat that edge case where the black frame does not arrive, and such treatment would likely obviate the black frame. Could we consider dropping this requirement altogether?

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

No branches or pull requests

3 participants