<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[237778] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/237778">237778</a></dd>
<dt>Author</dt> <dd>youenn@apple.com</dd>
<dt>Date</dt> <dd>2018-11-04 00:55:02 -0700 (Sun, 04 Nov 2018)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add support for RTCMuxPolicy
https://bugs.webkit.org/show_bug.cgi?id=191188

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt:
* web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:

Source/WebCore:

Add support for RTCMuxPolicy dictionary option for both constructor and setConfiguration.
Make sure setConfiguration throws if trying to change this policy.
Pipe this parameter up to libwebrtc.
Covered by rebased test.

* Modules/mediastream/RTCConfiguration.h:
* Modules/mediastream/RTCConfiguration.idl:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::iceServersFromConfiguration):
(WebCore::RTCPeerConnection::initializeConfiguration):
(WebCore::RTCPeerConnection::setConfiguration):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::rtcpMuxPolicyfromConfiguration):
(WebCore::configurationFromMediaEndpointConfiguration):
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/MediaEndpointConfiguration.cpp:
(WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
* platform/mediastream/MediaEndpointConfiguration.h:
* platform/mediastream/RTCPMuxPolicy.h: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCConfigurationrtcpMuxPolicyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcrtcpeerconnectionrtcpeerconnectionconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCConfigurationh">trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCConfigurationidl">trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectioncpp">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCPeerConnectionBackendcpp">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaEndpointConfigurationcpp">trunk/Source/WebCore/platform/mediastream/MediaEndpointConfiguration.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaEndpointConfigurationh">trunk/Source/WebCore/platform/mediastream/MediaEndpointConfiguration.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformmediastreamRTCPMuxPolicyh">trunk/Source/WebCore/platform/mediastream/RTCPMuxPolicy.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/LayoutTests/imported/w3c/ChangeLog    2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2018-11-04  Youenn Fablet  <youenn@apple.com>
+
+        Add support for RTCMuxPolicy
+        https://bugs.webkit.org/show_bug.cgi?id=191188
+
+        Reviewed by Eric Carlson.
+
+        * web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt:
+        * web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:
+
</ins><span class="cx"> 2018-11-03  Youenn Fablet  <youenn@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Refresh WPT webrtc tests
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCConfigurationrtcpMuxPolicyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt     2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt        2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -1,22 +1,15 @@
</span><span class="cx"> 
</span><del>-FAIL new RTCPeerConnection() should have default rtcpMuxPolicy require assert_equals: expected (string) "require" but got (undefined) undefined
-FAIL new RTCPeerConnection({ rtcpMuxPolicy: undefined }) should have default rtcpMuxPolicy require assert_equals: expected (string) "require" but got (undefined) undefined
-FAIL new RTCPeerConnection({ rtcpMuxPolicy: 'require' }) should succeed assert_equals: expected (string) "require" but got (undefined) undefined
-FAIL new RTCPeerConnection({ rtcpMuxPolicy: 'negotiate' }) may succeed or throw NotSupportedError assert_equals: expected (string) "negotiate" but got (undefined) undefined
-FAIL new RTCPeerConnection(config) - with { rtcpMuxPolicy: null } should throw TypeError assert_throws: function "() =>
-      makePc({ rtcpMuxPolicy: null })" did not throw
-FAIL setConfiguration(config) - with { rtcpMuxPolicy: null } should throw TypeError assert_throws: function "() =>
-      makePc({ rtcpMuxPolicy: null })" did not throw
-FAIL new RTCPeerConnection(config) - with { rtcpMuxPolicy: 'invalid' } should throw TypeError assert_throws: function "() =>
-      makePc({ rtcpMuxPolicy: 'invalid' })" did not throw
-FAIL setConfiguration(config) - with { rtcpMuxPolicy: 'invalid' } should throw TypeError assert_throws: function "() =>
-      makePc({ rtcpMuxPolicy: 'invalid' })" did not throw
-FAIL setConfiguration({ rtcpMuxPolicy: 'negotiate' }) with initial rtcpMuxPolicy require should throw InvalidModificationError assert_throws: function "() =>
-      pc.setConfiguration({ rtcpMuxPolicy: 'negotiate' })" did not throw
-FAIL setConfiguration({ rtcpMuxPolicy: 'require' }) with initial rtcpMuxPolicy negotiate should throw InvalidModificationError assert_throws: function "() =>
-      pc.setConfiguration({ rtcpMuxPolicy: 'require' })" did not throw
-FAIL setConfiguration({}) with initial rtcpMuxPolicy negotiate should throw InvalidModificationError assert_throws: function "() =>
-      pc.setConfiguration({})" did not throw
</del><ins>+PASS new RTCPeerConnection() should have default rtcpMuxPolicy require 
+PASS new RTCPeerConnection({ rtcpMuxPolicy: undefined }) should have default rtcpMuxPolicy require 
+PASS new RTCPeerConnection({ rtcpMuxPolicy: 'require' }) should succeed 
+PASS new RTCPeerConnection({ rtcpMuxPolicy: 'negotiate' }) may succeed or throw NotSupportedError 
+PASS new RTCPeerConnection(config) - with { rtcpMuxPolicy: null } should throw TypeError 
+PASS setConfiguration(config) - with { rtcpMuxPolicy: null } should throw TypeError 
+PASS new RTCPeerConnection(config) - with { rtcpMuxPolicy: 'invalid' } should throw TypeError 
+PASS setConfiguration(config) - with { rtcpMuxPolicy: 'invalid' } should throw TypeError 
+PASS setConfiguration({ rtcpMuxPolicy: 'negotiate' }) with initial rtcpMuxPolicy require should throw InvalidModificationError 
+PASS setConfiguration({ rtcpMuxPolicy: 'require' }) with initial rtcpMuxPolicy negotiate should throw InvalidModificationError 
+PASS setConfiguration({}) with initial rtcpMuxPolicy negotiate should throw InvalidModificationError 
</ins><span class="cx"> FAIL setRemoteDescription throws InvalidAccessError when called with an offer without rtcp-mux and rtcpMuxPolicy is set to require assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set remote offer sdp: The m= section:audio1 is invalid. RTCP-MUX is not enabled when it is required." that is not a DOMException InvalidAccessError: property "code" is equal to 0, expected 15
</span><span class="cx"> FAIL setRemoteDescription throws InvalidAccessError when called with an answer without rtcp-mux and rtcpMuxPolicy is set to require assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set remote answer sdp: The order of m-lines in answer doesn't match order in offer. Rejecting answer." that is not a DOMException InvalidAccessError: property "code" is equal to 0, expected 15
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcrtcpeerconnectionrtcpeerconnectionconstructorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt    2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt       2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -53,15 +53,11 @@
</span><span class="cx"> PASS new RTCPeerConnection({ bundlePolicy: "max-compat" }) 
</span><span class="cx"> PASS new RTCPeerConnection({ bundlePolicy: "max-bundle" }) 
</span><span class="cx"> PASS new RTCPeerConnection({ bundlePolicy: "invalid" }) 
</span><del>-FAIL new RTCPeerConnection({ rtcpMuxPolicy: null }) assert_throws: function "function () {
-        eval(expr);
-      }" did not throw
</del><ins>+PASS new RTCPeerConnection({ rtcpMuxPolicy: null }) 
</ins><span class="cx"> PASS new RTCPeerConnection({ rtcpMuxPolicy: undefined }) 
</span><span class="cx"> PASS new RTCPeerConnection({ rtcpMuxPolicy: "negotiate" }) 
</span><span class="cx"> PASS new RTCPeerConnection({ rtcpMuxPolicy: "require" }) 
</span><del>-FAIL new RTCPeerConnection({ rtcpMuxPolicy: "invalid" }) assert_throws: function "function () {
-        eval(expr);
-      }" did not throw
</del><ins>+PASS new RTCPeerConnection({ rtcpMuxPolicy: "invalid" }) 
</ins><span class="cx"> FAIL new RTCPeerConnection({ peerIdentity: toStringThrows }) assert_throws: function "function () {
</span><span class="cx">         eval(expr);
</span><span class="cx">       }" did not throw
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/Source/WebCore/ChangeLog      2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2018-11-04  Youenn Fablet  <youenn@apple.com>
+
+        Add support for RTCMuxPolicy
+        https://bugs.webkit.org/show_bug.cgi?id=191188
+
+        Reviewed by Eric Carlson.
+
+        Add support for RTCMuxPolicy dictionary option for both constructor and setConfiguration.
+        Make sure setConfiguration throws if trying to change this policy.
+        Pipe this parameter up to libwebrtc.
+        Covered by rebased test.
+
+        * Modules/mediastream/RTCConfiguration.h:
+        * Modules/mediastream/RTCConfiguration.idl:
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::iceServersFromConfiguration):
+        (WebCore::RTCPeerConnection::initializeConfiguration):
+        (WebCore::RTCPeerConnection::setConfiguration):
+        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
+        (WebCore::rtcpMuxPolicyfromConfiguration):
+        (WebCore::configurationFromMediaEndpointConfiguration):
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/mediastream/MediaEndpointConfiguration.cpp:
+        (WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
+        * platform/mediastream/MediaEndpointConfiguration.h:
+        * platform/mediastream/RTCPMuxPolicy.h: Added.
+
</ins><span class="cx"> 2018-11-03  Devin Rousso  <drousso@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Canvas: capture changes to <canvas> that would affect the recorded context
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.h (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.h      2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.h 2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include "RTCCertificate.h"
</span><span class="cx"> #include "RTCIceServer.h"
</span><span class="cx"> #include "RTCIceTransportPolicy.h"
</span><ins>+#include "RTCPMuxPolicy.h"
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -44,6 +45,7 @@
</span><span class="cx">     std::optional<Vector<RTCIceServer>> iceServers;
</span><span class="cx">     RTCIceTransportPolicy iceTransportPolicy;
</span><span class="cx">     RTCBundlePolicy bundlePolicy;
</span><ins>+    RTCPMuxPolicy rtcpMuxPolicy;
</ins><span class="cx">     unsigned short iceCandidatePoolSize;
</span><span class="cx">     Vector<RefPtr<RTCCertificate>> certificates;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCConfigurationidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.idl (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.idl    2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.idl       2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -45,12 +45,21 @@
</span><span class="cx"> [
</span><span class="cx">     Conditional=WEB_RTC,
</span><span class="cx">     EnabledAtRuntime=PeerConnection,
</span><ins>+    ImplementedAs=RTCPMuxPolicy
+] enum RTCPMuxPolicy {
+    "negotiate",
+    "require"
+};
+
+[
+    Conditional=WEB_RTC,
+    EnabledAtRuntime=PeerConnection,
</ins><span class="cx">     JSGenerateToJSObject,
</span><span class="cx"> ] dictionary RTCConfiguration {
</span><span class="cx">     sequence<RTCIceServer> iceServers;
</span><span class="cx">     RTCIceTransportPolicy iceTransportPolicy = "all";
</span><span class="cx">     RTCBundlePolicy bundlePolicy = "balanced";
</span><del>-    // FIXME 169662: missing rtcpMuxPolicy
</del><ins>+    RTCPMuxPolicy rtcpMuxPolicy = "require";
</ins><span class="cx">     // FIXME 169662: missing peerIdentity
</span><span class="cx">     sequence<RTCCertificate> certificates;
</span><span class="cx">     [EnforceRange] octet iceCandidatePoolSize = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp   2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp      2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -260,8 +260,11 @@
</span><span class="cx"> static inline ExceptionOr<Vector<MediaEndpointConfiguration::IceServerInfo>> iceServersFromConfiguration(RTCConfiguration& newConfiguration, const RTCConfiguration* existingConfiguration, bool isLocalDescriptionSet)
</span><span class="cx"> {
</span><span class="cx">     if (existingConfiguration && newConfiguration.bundlePolicy != existingConfiguration->bundlePolicy)
</span><del>-        return Exception { InvalidModificationError, "IceTransportPolicy does not match existing policy" };
</del><ins>+        return Exception { InvalidModificationError, "BundlePolicy does not match existing policy" };
</ins><span class="cx"> 
</span><ins>+    if (existingConfiguration && newConfiguration.rtcpMuxPolicy != existingConfiguration->rtcpMuxPolicy)
+        return Exception { InvalidModificationError, "RTCPMuxPolicy does not match existing policy" };
+
</ins><span class="cx">     if (existingConfiguration && newConfiguration.iceCandidatePoolSize != existingConfiguration->iceCandidatePoolSize && isLocalDescriptionSet)
</span><span class="cx">         return Exception { InvalidModificationError, "IceTransportPolicy pool size does not match existing pool size" };
</span><span class="cx"> 
</span><span class="lines">@@ -320,7 +323,7 @@
</span><span class="cx">     if (certificates.hasException())
</span><span class="cx">         return certificates.releaseException();
</span><span class="cx"> 
</span><del>-    if (!m_backend->setConfiguration({ servers.releaseReturnValue(), configuration.iceTransportPolicy, configuration.bundlePolicy, configuration.iceCandidatePoolSize, certificates.releaseReturnValue() }))
</del><ins>+    if (!m_backend->setConfiguration({ servers.releaseReturnValue(), configuration.iceTransportPolicy, configuration.bundlePolicy, configuration.rtcpMuxPolicy, configuration.iceCandidatePoolSize, certificates.releaseReturnValue() }))
</ins><span class="cx">         return Exception { InvalidAccessError, "Bad Configuration Parameters" };
</span><span class="cx"> 
</span><span class="cx">     m_configuration = WTFMove(configuration);
</span><span class="lines">@@ -351,7 +354,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!m_backend->setConfiguration({ servers.releaseReturnValue(), configuration.iceTransportPolicy, configuration.bundlePolicy, configuration.iceCandidatePoolSize, { } }))
</del><ins>+    if (!m_backend->setConfiguration({ servers.releaseReturnValue(), configuration.iceTransportPolicy, configuration.bundlePolicy, configuration.rtcpMuxPolicy, configuration.iceCandidatePoolSize, { } }))
</ins><span class="cx">         return Exception { InvalidAccessError, "Bad Configuration Parameters" };
</span><span class="cx"> 
</span><span class="cx">     m_configuration = WTFMove(configuration);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCPeerConnectionBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp    2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp       2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -88,6 +88,19 @@
</span><span class="cx">     return webrtc::PeerConnectionInterface::kBundlePolicyMaxCompat;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static inline webrtc::PeerConnectionInterface::RtcpMuxPolicy rtcpMuxPolicyfromConfiguration(const MediaEndpointConfiguration& configuration)
+{
+    switch (configuration.rtcpMuxPolicy) {
+    case RTCPMuxPolicy::Negotiate:
+        return webrtc::PeerConnectionInterface::kRtcpMuxPolicyNegotiate;
+    case RTCPMuxPolicy::Require:
+        return webrtc::PeerConnectionInterface::kRtcpMuxPolicyRequire;
+    }
+
+    ASSERT_NOT_REACHED();
+    return webrtc::PeerConnectionInterface::kRtcpMuxPolicyRequire;
+}
+
</ins><span class="cx"> static inline webrtc::PeerConnectionInterface::IceTransportsType iceTransportPolicyfromConfiguration(const MediaEndpointConfiguration& configuration)
</span><span class="cx"> {
</span><span class="cx">     switch (configuration.iceTransportPolicy) {
</span><span class="lines">@@ -107,6 +120,7 @@
</span><span class="cx"> 
</span><span class="cx">     rtcConfiguration.type = iceTransportPolicyfromConfiguration(configuration);
</span><span class="cx">     rtcConfiguration.bundle_policy = bundlePolicyfromConfiguration(configuration);
</span><ins>+    rtcConfiguration.rtcp_mux_policy = rtcpMuxPolicyfromConfiguration(configuration);
</ins><span class="cx"> 
</span><span class="cx">     for (auto& server : configuration.iceServers) {
</span><span class="cx">         webrtc::PeerConnectionInterface::IceServer iceServer;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -7261,6 +7261,7 @@
</span><span class="cx">          4129C9871F58662D009D7403 /* ReadableStreamSink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamSink.cpp; sourceTree = "<group>"; };
</span><span class="cx">          4129DF831BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamPrivateConstructors.cpp; sourceTree = "<group>"; };
</span><span class="cx">          4129DF841BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStreamPrivateConstructors.h; sourceTree = "<group>"; };
</span><ins>+               412BA5FE218C651800365474 /* RTCPMuxPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCPMuxPolicy.h; sourceTree = "<group>"; };
</ins><span class="cx">           413015D51C7B570400091C6E /* FetchResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FetchResponse.cpp; sourceTree = "<group>"; };
</span><span class="cx">          413015D51C7B570400091C6F /* FetchBodySource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FetchBodySource.cpp; sourceTree = "<group>"; };
</span><span class="cx">          413015D61C7B570400091C6E /* FetchResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FetchResponse.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -15570,6 +15571,7 @@
</span><span class="cx">                          313591011E7DDC6000F30630 /* RTCIceGatheringState.h */,
</span><span class="cx">                          313591021E7DDC6000F30630 /* RTCIceTransportPolicy.h */,
</span><span class="cx">                          313591031E7DDC6000F30630 /* RTCIceTransportState.h */,
</span><ins>+                               412BA5FE218C651800365474 /* RTCPMuxPolicy.h */,
</ins><span class="cx">                           07221BAA17CF0AD400848E51 /* RTCPeerConnectionHandlerClient.h */,
</span><span class="cx">                          41A48A9D1E8312EB00D2AC2D /* RTCPeerConnectionState.h */,
</span><span class="cx">                          31EB54DD1E7DC74400C1623B /* RTCRtpTransceiverDirection.h */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaEndpointConfigurationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaEndpointConfiguration.cpp (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaEndpointConfiguration.cpp 2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/Source/WebCore/platform/mediastream/MediaEndpointConfiguration.cpp    2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -36,10 +36,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-MediaEndpointConfiguration::MediaEndpointConfiguration(Vector<IceServerInfo>&& iceServers, RTCIceTransportPolicy iceTransportPolicy, RTCBundlePolicy bundlePolicy, unsigned short iceCandidatePoolSize, Vector<CertificatePEM>&& certificates)
</del><ins>+MediaEndpointConfiguration::MediaEndpointConfiguration(Vector<IceServerInfo>&& iceServers, RTCIceTransportPolicy iceTransportPolicy, RTCBundlePolicy bundlePolicy, RTCPMuxPolicy rtcpMuxPolicy, unsigned short iceCandidatePoolSize, Vector<CertificatePEM>&& certificates)
</ins><span class="cx">     : iceServers(WTFMove(iceServers))
</span><span class="cx">     , iceTransportPolicy(iceTransportPolicy)
</span><span class="cx">     , bundlePolicy(bundlePolicy)
</span><ins>+    , rtcpMuxPolicy(rtcpMuxPolicy)
</ins><span class="cx">     , iceCandidatePoolSize(iceCandidatePoolSize)
</span><span class="cx">     , certificates(WTFMove(certificates))
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaEndpointConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaEndpointConfiguration.h (237777 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaEndpointConfiguration.h   2018-11-03 23:24:35 UTC (rev 237777)
+++ trunk/Source/WebCore/platform/mediastream/MediaEndpointConfiguration.h      2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include "RTCBundlePolicy.h"
</span><span class="cx"> #include "RTCIceTransportPolicy.h"
</span><ins>+#include "RTCPMuxPolicy.h"
</ins><span class="cx"> #include "URL.h"
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="lines">@@ -55,11 +56,12 @@
</span><span class="cx">         String privateKey;
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    MediaEndpointConfiguration(Vector<IceServerInfo>&&, RTCIceTransportPolicy, RTCBundlePolicy, unsigned short, Vector<CertificatePEM>&&);
</del><ins>+    MediaEndpointConfiguration(Vector<IceServerInfo>&&, RTCIceTransportPolicy, RTCBundlePolicy, RTCPMuxPolicy, unsigned short, Vector<CertificatePEM>&&);
</ins><span class="cx"> 
</span><span class="cx">     Vector<IceServerInfo> iceServers;
</span><span class="cx">     RTCIceTransportPolicy iceTransportPolicy;
</span><span class="cx">     RTCBundlePolicy bundlePolicy;
</span><ins>+    RTCPMuxPolicy rtcpMuxPolicy;
</ins><span class="cx">     unsigned short iceCandidatePoolSize;
</span><span class="cx">     Vector<CertificatePEM> certificates;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamRTCPMuxPolicyh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mediastream/RTCPMuxPolicy.h (0 => 237778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/RTCPMuxPolicy.h                                (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/RTCPMuxPolicy.h   2018-11-04 07:55:02 UTC (rev 237778)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEB_RTC)
+
+namespace WebCore {
+
+enum class RTCPMuxPolicy {
+    Negotiate,
+    Require
+};
+
+}; // namespace WebCore
+
+#endif
</ins></span></pre>
</div>
</div>

</body>
</html>