[Webkit-unassigned] [Bug 173458] The createOffer method don't generates a blob of SDP wthitout the addStream method(Safari 11.0).
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jun 24 00:16:01 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=173458
--- Comment #3 from lwu <wglu521 at 163.com> ---
(In reply to youenn fablet from comment #2)
> WebKit is not supporting offerToReceiveAudio: false and
> offerToReceiveVideo: true.
> Instead, one can use addTransceiver instead.
> Can you try that and see whether that works for you with the latest
> SafariTechPreview?
Thanks for your reply, I tyr it.
Steps to Reproduce:
Step 1 :
var pc1 = new RTCPeerConnection();
Step 2 :
pc1.onicecandidate = function(e) {
if (event.candidate) {
pc1.addIceCandidate(new RTCIceCandidate(event.candidate)
).then(
function() {
console.log('pc1 addIceCandidate success');
},
function(err) {
console.log('pc1 failed to add ICE Candidate: ' + error.toString() );
}
);
console.log('pc1 ICE candidate: \n' + event.candidate.candidate);
}
};
pc1.addTransceiver("video");
pc1.createOffer().then(
onCreateOfferSuccess,
onCreateSessionDescriptionError
);
Step 3 :
function onCreateOfferSuccess(desc) {
console.log('Offer from pc1\n' + desc.sdp);
... //omit following method
}
function onCreateSessionDescriptionError(desc) {
console.log('pc1 Failed to create session description: ' + error.toString());
... //omit following method
}
In step 3, onCreateOfferSuccess function prints:
Offer from pc1
v=0
o=- 1206206593124710074 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS
It doesn't seem to work as well when I do it.
So, I viewed the source code of Webkit.
I found that the Webkit does not provide the js API.
File path: webkit/Source/ThirdParty/libwebrtc/Source/webrtc/api/peerconnectioninterface.h
Line: 550
Notes:
// Creates a sender without a track. Can be used for "early media"/"warmup"
// use cases, where the application may want to negotiate video attributes
// before a track is available to send.
//
// The standard way to do this would be through "addTransceiver", but we
// don't support that API yet.
//
// |kind| must be "audio" or "video".
//
// |stream_id| is used to populate the msid attribute; if empty, one will
// be generated automatically.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170624/be3e4521/attachment-0001.html>
More information about the webkit-unassigned
mailing list