WebRTC: callback-based setRemoteDescription requires RTCSessionDescription argument
Reported by
fi...@appear.in,
May 16 2016
|
|||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/49.0.2623.108 Chrome/49.0.2623.108 Safari/537.36
Steps to reproduce the problem:
paste this into the console:
var pc = new webkitRTCPeerConnection(null);
pc.setRemoteDescription({type: 'offer', sdp: 'v=2\r\no=abc a d e f g\r\ns=foo\r\nt=bar\r\n'}, function() { console.log('yay'); }, function(err) { console.log(err); })
What is the expected behavior?
this is accepted. This was changed in the spec here: https://github.com/w3c/webrtc-pc/pull/302
What went wrong?
Uncaught (in promise) TypeError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': parameter 1 is not of type 'RTCSessionDescription'.
Did this work before? N/A
Chrome version: 52.0.2716.0 Channel: canary
OS Version:
Flash Version:
it works when using promises:
pc.setRemoteDescription({type: 'offer', sdp: 'v=2\r\no=abc a d e f g\r\ns=foo\r\nt=bar\r\n'}).then(function() { console.log('yaY'); }).catch(function(err) { console.log(err); })
which uses the native promises added in
https://bugs.chromium.org/p/chromium/issues/detail?id=499126
,
May 16 2016
[triage]
,
May 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a commit 93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a Author: guidou <guidou@chromium.org> Date: Fri May 27 12:46:29 2016 Use Init dictionaries in RTCPeerConnection legacy methods. In addition, correctly handle the conversion to WebRTCIceCandidate when given a valid RTCIceCandidateInit with null sdpMLineIndex. BUG= 612118 Review-Url: https://codereview.chromium.org/2007923003 Cr-Commit-Position: refs/heads/master@{#396449} [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-ice-expected.txt [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-ice.html [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/third_party/WebKit/Source/modules/mediastream/RTCIceCandidate.cpp [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/third_party/WebKit/Source/modules/mediastream/RTCIceCandidate.h [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/third_party/WebKit/Source/modules/mediastream/RTCIceCandidate.idl [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.idl [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/third_party/WebKit/public/platform/WebRTCICECandidate.h [modify] https://crrev.com/93ba0b84e5d94b8da6ddf025b62f0ac3c2f8c79a/tools/metrics/histograms/histograms.xml
,
May 31 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by hta@chromium.org
, May 16 2016Owner: guidou@chromium.org