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

dtmfsender 1.0 compability #714

Closed
fippo opened this issue Jun 21, 2017 · 4 comments
Closed

dtmfsender 1.0 compability #714

fippo opened this issue Jun 21, 2017 · 4 comments

Comments

@fippo
Copy link
Contributor

fippo commented Jun 21, 2017

http://w3c.github.io/webrtc-pc/#peer-to-peer-dtmf defines the dtmf sender a bit different than we do here.

It turned out to be fairly trivial to shim (in Edge):

Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {
    get: function() {
        if (this._dtmf === undefined) {
            if (this.track.kind === 'audio') {
                this._dtmf = new window.RTCDtmfSender(this);
            } else if (this.track.kind === 'video') {
                this._dtmf = null;
            }
        }
        return this._dtmf;
    }
});

Its a "how do I shim 1.0 ontop of ORTC issue", shall I make a PR for http://draft.ortc.org/#webrtc-compat* ?

@aboba
Copy link
Contributor

aboba commented Jul 25, 2017

Yes, please.

@aboba
Copy link
Contributor

aboba commented Sep 18, 2017

@fippo In the "tip of tree" WebRTC 1.0 spec, dtmf is now always defined if track.kind === 'audio', but is only usable if canInsertDTMF is true, as in ORTC. Can we now close this issue?

@aboba
Copy link
Contributor

aboba commented Sep 20, 2017

I am assuming that this issue has been fixed (in WebRTC 1.0) and can be closed. If not, feel free to re-open it.

@aboba aboba closed this as completed Sep 20, 2017
@fippo
Copy link
Contributor Author

fippo commented Sep 20, 2017

oh, i'll update my shim code then. We still need some text, i'll PR now before I forget again ;-)

fippo added a commit to fippo/ortc that referenced this issue Sep 20, 2017
hints how to shim the 1.0 behaviour using ORTC objects and a getter.

Fixes w3c#714
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

2 participants