Summary: Highlights of Safari 11.0 Web conferencing: Implements peer to peer conferencing with the WebRTC standard. So, I test it in the 11.0(13604.1.21.7) version. I creates an RTCPeerConnection object, and don't call the addStream method. Then, I call the createOffer method, and it doesn't generates a blob of SDP. Steps to Reproduce: Step 1 : var pc1 = new RTCPeerConnection(); Step 2 : var offerOptions = { offerToReceiveAudio: false, offerToReceiveVideo: true }; 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.createOffer( offerOptions ).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 This is all it prints. On the other hand: In step 2, if I call the addStream method, like this. var localstream = undefined; navigator.mediaDevices.getUserMedia({ audio: false, video: { width: 1920, height: 1080 } } ) .then(gotStream) .catch(function(e) { alert('getUserMedia() error: ' + e.name); }); function gotStream(stream) { console.log('Have local stream'); localStream = stream; } pc1.addStream(localStream); pc1.createOffer( offerOptions ).then( onCreateOfferSuccess, onCreateSessionDescriptionError ); In step 3, onCreateOfferSuccess function prints Properly. Expected Results: I use the same steps in Chrome and Firefox. In step 3( Chrome), onCreateOfferSuccess function prints: Offer from pc1 v=0 o=- 5144877199436949312 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE video a=msid-semantic: WMS m=video 9 UDP/TLS/RTP/SAVPF 96 98 100 102 127 97 99 101 125 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 a=ice-ufrag:CLXs a=ice-pwd:/HxM44PpI+OcG0OWaaUy6dUM a=fingerprint:sha-256 8D:CD:D8:21:17:7B:CA:EC:5A:92:71:6C:89:F0:E7:0E:D6:CA:43:1A:1D:C5:15:E7:3A:82:A9:CE:8C:A7:28:9C a=setup:actpass a=mid:video a=extmap:2 urn:ietf:params:rtp-hdrext:toffset a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=extmap:4 urn:3gpp:video-orientation a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay a=recvonly a=rtcp-mux a=rtcp-rsize a=rtpmap:96 VP8/90000 a=rtcp-fb:96 ccm fir a=rtcp-fb:96 nack a=rtcp-fb:96 nack pli a=rtcp-fb:96 goog-remb a=rtcp-fb:96 transport-cc a=rtpmap:98 VP9/90000 a=rtcp-fb:98 ccm fir a=rtcp-fb:98 nack a=rtcp-fb:98 nack pli a=rtcp-fb:98 goog-remb a=rtcp-fb:98 transport-cc a=rtpmap:100 H264/90000 a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack pli a=rtcp-fb:100 goog-remb a=rtcp-fb:100 transport-cc a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 red/90000 a=rtpmap:127 ulpfec/90000 a=rtpmap:97 rtx/90000 a=fmtp:97 apt=96 a=rtpmap:99 rtx/90000 a=fmtp:99 apt=98 a=rtpmap:101 rtx/90000 a=fmtp:101 apt=100 a=rtpmap:125 rtx/90000 a=fmtp:125 apt=102 It Contains the codec/RTP/RTCP capabilities supported by this implementation, and parameters of the ICE agent and the DTLS connection. and doesn't include descriptions of the local MediaStreamTracks. Then, the onicecandidate callback will be triggered. I can establish a peer to peer conferencing with the WebRTC standard. There is the same resu in Firefox. I wish Safari has the same behavior, like Chrome and Firefox. Observed Results: The createOffer method don't generates a blob of SDP wthitout the addStream method . When I want to recv stream and don't send stream, I can't establish a peer to peer conferencing. Version: Version: Safari 11.0(13604.1.21.7)
<rdar://problem/32809646>
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?
(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.
http://trac.webkit.org/browser/trunk/LayoutTests/webrtc/video-addTransceiver.html is passing on latest WebKit and should probably cover your case. Maybe support of this feature is not yet in STP. You might want to try WebKit Nightly or wait for next STP.
lwu, can you retry with STP34? If it works, can I close the bug?
(In reply to youenn fablet from comment #5) > lwu, can you retry with STP34? > If it works, can I close the bug? I'm sorry for the late reply, it works; Thanks.