[Webkit-unassigned] [Bug 173458] New: 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
Thu Jun 15 23:18:27 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=173458

            Bug ID: 173458
           Summary: The createOffer method don't generates a blob of SDP
                    wthitout the addStream method(Safari 11.0).
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: PC
                OS: macOS 10.13
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: wglu521 at 163.com

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)

-- 
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/20170616/74fd1ba9/attachment.html>


More information about the webkit-unassigned mailing list