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

Does RTCRtpSender's dtmf attribute return the same object every time? #1776

Closed
foolip opened this issue Feb 20, 2018 · 5 comments
Closed

Does RTCRtpSender's dtmf attribute return the same object every time? #1776

foolip opened this issue Feb 20, 2018 · 5 comments
Assignees

Comments

@foolip
Copy link
Member

foolip commented Feb 20, 2018

https://w3c.github.io/webrtc-pc/#rtcrtpsender-interface-extensions

If it does, then using [SameObject] would be good.

@annevk
Copy link
Member

annevk commented Feb 20, 2018

You cannot use it for nullable attributes: https://heycam.github.io/webidl/#SameObject. (Is there already an issue for this being unclear when it actually returns null?)

@foolip
Copy link
Member Author

foolip commented Feb 20, 2018

Oh, it's nullable, that's weird. It says "or null if unset" but it can't actually be set.

In what @alvestrand implemented in https://chromium-review.googlesource.com/c/chromium/src/+/926181 the getter could throw an exception, but never return null.

@jan-ivar, what does Gecko do?

@alvestrand
Copy link
Contributor

Since the DTMF sender has state that is preserved between calls (the ToneBuffer), it would be very silly to have a new object be created. [SameObject] is good documentation.

@alvestrand
Copy link
Contributor

It's supposed to be null when the track is not an audio track.

@foolip
Copy link
Member Author

foolip commented Feb 21, 2018

OK, so it should be nullable, and means we can't use [SameObject], as @annevk pointed out.

Maybe to make this clearer, create a slot for it and initialize it in https://w3c.github.io/webrtc-pc/#dfn-create-an-rtcrtpsender?

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

No branches or pull requests

5 participants