<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WebRTC: Implement MediaEndpointPeerConnection::createOffer()"
   href="https://bugs.webkit.org/show_bug.cgi?id=154867#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WebRTC: Implement MediaEndpointPeerConnection::createOffer()"
   href="https://bugs.webkit.org/show_bug.cgi?id=154867">bug 154867</a>
              from <span class="vcard"><a class="email" href="mailto:eric.carlson&#64;apple.com" title="Eric Carlson &lt;eric.carlson&#64;apple.com&gt;"> <span class="fn">Eric Carlson</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=154867#c5">comment #5</a>)
<span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=154867#c3">comment #3</a>)
&gt; &gt; Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=272580&amp;action=diff" name="attach_272580" title="Proposed patch">attachment 272580</a> <a href="attachment.cgi?id=272580&amp;action=edit" title="Proposed patch">[details]</a></span>
&gt; &gt; Proposed patch
&gt; 
&gt; Thanks for reviewing. Find answers inline.
&gt;  
&gt; &gt; View in context:
&gt; &gt; <a href="https://bugs.webkit.org/attachment.cgi?id=272580&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=272580&amp;action=review</a>
&gt; &gt; 
&gt; &gt; &gt; LayoutTests/fast/mediastream/RTCPeerConnection-inspect-offer.html:19
&gt; &gt; &gt; +                debug(&quot;This test can not be run without the testRunner&quot;);
&gt; &gt; &gt; +                finishJSTest();
&gt; &gt; 
&gt; &gt; Nit: add this might as well return to avoid a bunch of script errors
&gt; 
&gt; That's pretty much the behavior right now since the getUserMedia() request
&gt; will never resolve. We could wrap everything in a function and return as
&gt; well.
&gt; </span >

Indeed, I didn't look close enough!

<span class="quote">&gt; &gt; &gt; Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:158
&gt; &gt; &gt; +        mediaDescription-&gt;setMediaStreamId(sender-&gt;mediaStreamIds()[0]);
&gt; &gt; &gt; +        mediaDescription-&gt;setMediaStreamTrackId(track-&gt;id());
&gt; &gt; &gt; +        mediaDescription-&gt;setType(track-&gt;kind());
&gt; &gt; &gt; +        mediaDescription-&gt;setPort(9);
&gt; &gt; &gt; +        mediaDescription-&gt;setAddress(&quot;0.0.0.0&quot;);
&gt; &gt; &gt; +        mediaDescription-&gt;setMode(&quot;sendrecv&quot;);
&gt; &gt; &gt; +        mediaDescription-&gt;setPayloads(track-&gt;kind() == &quot;audio&quot; ? m_defaultAudioPayloads : m_defaultVideoPayloads);
&gt; &gt; &gt; +        mediaDescription-&gt;setRtcpMux(true);
&gt; &gt; &gt; +        mediaDescription-&gt;setDtlsSetup(&quot;actpass&quot;);
&gt; &gt; &gt; +        mediaDescription-&gt;setDtlsFingerprintHashFunction(m_dtlsFingerprintFunction);
&gt; &gt; &gt; +        mediaDescription-&gt;setDtlsFingerprint(m_dtlsFingerprint);
&gt; &gt; &gt; +        mediaDescription-&gt;setCname(m_cname);
&gt; &gt; &gt; +        mediaDescription-&gt;addSsrc(cryptographicallyRandomNumber());
&gt; &gt; &gt; +        mediaDescription-&gt;setIceUfrag(m_iceUfrag);
&gt; &gt; &gt; +        mediaDescription-&gt;setIcePassword(m_icePassword);
&gt; &gt; 
&gt; &gt; Nit: This is a lot of setup Might it make sense to add a
&gt; &gt; PeerMediaDescription constructor that takes a MediaStreamTrack (or maybe
&gt; &gt; RtpSender)? If &quot;0.0.0.0&quot; the default address, can you set it in the
&gt; &gt; constructor?
&gt; 
&gt; My intention with the setters was to avoid having expressions like
&gt; 'cryptographicallyRandomNumber()' in the middle of a long constructor
&gt; argument list since it's not obvious that it's an SSRC. But as it turned
&gt; out, most of the values set are stored in variables with fairly descriptive
&gt; names. :)
&gt; 
&gt; I made all constant initializations here defaults when a
&gt; PeerMediaDescription is constructed as you suggested with address. That got
&gt; rid of five setter-calls. Is that enough or should we go for a constructor?
&gt; </span >

This seems fine, thanks.

This seems fine to me, but this is a large &amp; complex patch so I have asked someone else to take a look as well.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>