<!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>[208778] 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/208778">208778</a></dd>
<dt>Author</dt> <dd>jonlee@apple.com</dd>
<dt>Date</dt> <dd>2016-11-15 18:55:22 -0800 (Tue, 15 Nov 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Report active video and audio capture devices separately
https://bugs.webkit.org/show_bug.cgi?id=164769
Reviewed by Eric Carlson.
Source/WebCore:
For UI purposes, separate the notion of any active capture device to
an active audio and video capture device.
* page/MediaProducer.h: Replace HasActiveMediaCaptureDevice with
HasActiveAudioCaptureDevice and HasActiveVideoCaptureDevice.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::mediaState): Update the logic for mediaState().
Since it is possible to arbitrarily add tracks from various sources,
check specifically for a local AV source (meaning a capture device) that
is producing data.
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::hasLocalVideoSource): Iterate over the tracks
and look for video sources that are not remote.
(WebCore::MediaStreamPrivate::hasLocalAudioSource): Ditto for audio.
* platform/mediastream/MediaStreamPrivate.h:
* testing/Internals.cpp:
(WebCore::Internals::pageMediaState): Update internals reporting.
Source/WebKit2:
Replace kWKMediaHasActiveCaptureDevice with kWKMediaHasActiveAudioCaptureDevice and
kWKMediaHasActiveVideoCaptureDevice
* UIProcess/API/C/WKPage.cpp:
(WKPageGetMediaState):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange): Update the mask to include the two
bits.
LayoutTests:
* fast/mediastream/MediaStream-page-muted-expected.txt: Update test.
* fast/mediastream/MediaStream-page-muted.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastmediastreamMediaStreampagemutedexpectedtxt">trunk/LayoutTests/fast/mediastream/MediaStream-page-muted-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediastreamMediaStreampagemutedhtml">trunk/LayoutTests/fast/mediastream/MediaStream-page-muted.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamcpp">trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp</a></li>
<li><a href="#trunkSourceWebCorepageMediaProducerh">trunk/Source/WebCore/page/MediaProducer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaStreamPrivatecpp">trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaStreamPrivateh">trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagePrivateh">trunk/Source/WebKit2/UIProcess/API/C/WKPagePrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/LayoutTests/ChangeLog        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-11-15 Jon Lee <jonlee@apple.com>
+
+ Report active video and audio capture devices separately
+ https://bugs.webkit.org/show_bug.cgi?id=164769
+
+ Reviewed by Eric Carlson.
+
+ * fast/mediastream/MediaStream-page-muted-expected.txt: Update test.
+ * fast/mediastream/MediaStream-page-muted.html:
+
</ins><span class="cx"> 2016-11-15 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Marking js/regress-141098.html as flaky on ios-simulator.
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediastreamMediaStreampagemutedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/mediastream/MediaStream-page-muted-expected.txt (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediastream/MediaStream-page-muted-expected.txt        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/LayoutTests/fast/mediastream/MediaStream-page-muted-expected.txt        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> *** Mock capture devices should be enabled by default
</span><span class="cx"> PASS mediaStream is an instance of Object
</span><span class="cx"> PASS mediaStream.getTracks().length is 2
</span><del>-PASS window.internals.pageMediaState().includes('HasActiveMediaCaptureDevice') became true
</del><ins>+PASS window.internals.pageMediaState().includes('HasActiveAudioCaptureDevice') && window.internals.pageMediaState().includes('HasActiveVideoCaptureDevice') became true
</ins><span class="cx">
</span><span class="cx"> *** Muting capture devices
</span><span class="cx"> EVENT: mute
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> EVENT: mute
</span><span class="cx"> PASS muteChangedEvent.target.muted is true
</span><span class="cx">
</span><del>-PASS window.internals.pageMediaState().includes('HasActiveMediaCaptureDevice') became false
</del><ins>+PASS window.internals.pageMediaState().includes('HasActiveAudioCaptureDevice') && window.internals.pageMediaState().includes('HasActiveVideoCaptureDevice') became false
</ins><span class="cx">
</span><span class="cx"> *** Unmuting capture devices
</span><span class="cx"> EVENT: unmute
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> EVENT: unmute
</span><span class="cx"> PASS muteChangedEvent.target.muted is false
</span><span class="cx">
</span><del>-PASS window.internals.pageMediaState().includes('HasActiveMediaCaptureDevice') became true
</del><ins>+PASS window.internals.pageMediaState().includes('HasActiveAudioCaptureDevice') && window.internals.pageMediaState().includes('HasActiveVideoCaptureDevice') became true
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediastreamMediaStreampagemutedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/mediastream/MediaStream-page-muted.html (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediastream/MediaStream-page-muted.html        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/LayoutTests/fast/mediastream/MediaStream-page-muted.html        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> if (++eventCount == 2) {
</span><span class="cx"> debug("");
</span><span class="cx"> let shouldBeActive = muteChangedEvent.type == "mute" ? "false" : "true";
</span><del>- shouldBecomeEqual("window.internals.pageMediaState().includes('HasActiveMediaCaptureDevice')", shouldBeActive, nextStep);
</del><ins>+ shouldBecomeEqual("window.internals.pageMediaState().includes('HasActiveAudioCaptureDevice') && window.internals.pageMediaState().includes('HasActiveVideoCaptureDevice')", shouldBeActive, nextStep);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> tracks[i].onunmute = muteChanged;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- shouldBecomeEqual("window.internals.pageMediaState().includes('HasActiveMediaCaptureDevice')", "true", muteCaptureDevices);
</del><ins>+ shouldBecomeEqual("window.internals.pageMediaState().includes('HasActiveAudioCaptureDevice') && window.internals.pageMediaState().includes('HasActiveVideoCaptureDevice')", "true", muteCaptureDevices);
</ins><span class="cx"> })
</span><span class="cx"> .catch((err) => {
</span><span class="cx"> testFailed(`mediaDevices.getUserMedia() failed with ${err.name}`);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/Source/WebCore/ChangeLog        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2016-11-15 Jon Lee <jonlee@apple.com>
+
+ Report active video and audio capture devices separately
+ https://bugs.webkit.org/show_bug.cgi?id=164769
+
+ Reviewed by Eric Carlson.
+
+ For UI purposes, separate the notion of any active capture device to
+ an active audio and video capture device.
+
+ * page/MediaProducer.h: Replace HasActiveMediaCaptureDevice with
+ HasActiveAudioCaptureDevice and HasActiveVideoCaptureDevice.
+
+ * Modules/mediastream/MediaStream.cpp:
+ (WebCore::MediaStream::mediaState): Update the logic for mediaState().
+ Since it is possible to arbitrarily add tracks from various sources,
+ check specifically for a local AV source (meaning a capture device) that
+ is producing data.
+ * platform/mediastream/MediaStreamPrivate.cpp:
+ (WebCore::MediaStreamPrivate::hasLocalVideoSource): Iterate over the tracks
+ and look for video sources that are not remote.
+ (WebCore::MediaStreamPrivate::hasLocalAudioSource): Ditto for audio.
+ * platform/mediastream/MediaStreamPrivate.h:
+ * testing/Internals.cpp:
+ (WebCore::Internals::pageMediaState): Update internals reporting.
+
</ins><span class="cx"> 2016-11-15 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Avoid copying vector of attributes as much as possible in the HTML parser
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -312,11 +312,17 @@
</span><span class="cx"> if (!m_isActive)
</span><span class="cx"> return state;
</span><span class="cx">
</span><del>- if (m_private->isProducingData())
- state |= HasActiveMediaCaptureDevice;
</del><ins>+ if (m_private->hasAudio()) {
+ state |= HasAudioOrVideo;
+ if (m_private->hasLocalAudioSource() && m_private->isProducingData())
+ state |= HasActiveAudioCaptureDevice;
+ }
</ins><span class="cx">
</span><del>- if (m_private->hasAudio() || m_private->hasVideo())
</del><ins>+ if (m_private->hasVideo()) {
</ins><span class="cx"> state |= HasAudioOrVideo;
</span><ins>+ if (m_private->hasLocalVideoSource() && m_private->isProducingData())
+ state |= HasActiveVideoCaptureDevice;
+ }
</ins><span class="cx">
</span><span class="cx"> return state;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageMediaProducerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/MediaProducer.h (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/MediaProducer.h        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/Source/WebCore/page/MediaProducer.h        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -42,7 +42,8 @@
</span><span class="cx"> IsPreviousTrackControlEnabled = 1 << 8,
</span><span class="cx"> HasPlaybackTargetAvailabilityListener = 1 << 9,
</span><span class="cx"> HasAudioOrVideo = 1 << 10,
</span><del>- HasActiveMediaCaptureDevice = 1 << 11,
</del><ins>+ HasActiveAudioCaptureDevice = 1 << 11,
+ HasActiveVideoCaptureDevice = 1 << 12,
</ins><span class="cx"> };
</span><span class="cx"> typedef unsigned MediaStateFlags;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaStreamPrivatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -199,6 +199,24 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool MediaStreamPrivate::hasLocalVideoSource() const
+{
+ for (auto& track : m_trackSet.values()) {
+ if (track->type() == RealtimeMediaSource::Type::Video && !track->remote())
+ return true;
+ }
+ return false;
+}
+
+bool MediaStreamPrivate::hasLocalAudioSource() const
+{
+ for (auto& track : m_trackSet.values()) {
+ if (track->type() == RealtimeMediaSource::Type::Audio && !track->remote())
+ return true;
+ }
+ return false;
+}
+
</ins><span class="cx"> bool MediaStreamPrivate::muted() const
</span><span class="cx"> {
</span><span class="cx"> for (auto& track : m_trackSet.values()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaStreamPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -101,6 +101,9 @@
</span><span class="cx"> bool hasAudio() const;
</span><span class="cx"> bool muted() const;
</span><span class="cx">
</span><ins>+ bool hasLocalVideoSource() const;
+ bool hasLocalAudioSource() const;
+
</ins><span class="cx"> FloatSize intrinsicSize() const;
</span><span class="cx">
</span><span class="cx"> WeakPtr<MediaStreamPrivate> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); }
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/Source/WebCore/testing/Internals.cpp        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -3010,8 +3010,10 @@
</span><span class="cx"> string.append("HasPlaybackTargetAvailabilityListener,");
</span><span class="cx"> if (state & MediaProducer::HasAudioOrVideo)
</span><span class="cx"> string.append("HasAudioOrVideo,");
</span><del>- if (state & MediaProducer::HasActiveMediaCaptureDevice)
- string.append("HasActiveMediaCaptureDevice,");
</del><ins>+ if (state & MediaProducer::HasActiveAudioCaptureDevice)
+ string.append("HasActiveAudioCaptureDevice,");
+ if (state & MediaProducer::HasActiveVideoCaptureDevice)
+ string.append("HasActiveVideoCaptureDevice,");
</ins><span class="cx">
</span><span class="cx"> if (string.isEmpty())
</span><span class="cx"> string.append("IsNotPlaying");
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/Source/WebKit2/ChangeLog        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-11-15 Jon Lee <jonlee@apple.com>
+
+ Report active video and audio capture devices separately
+ https://bugs.webkit.org/show_bug.cgi?id=164769
+
+ Reviewed by Eric Carlson.
+
+ Replace kWKMediaHasActiveCaptureDevice with kWKMediaHasActiveAudioCaptureDevice and
+ kWKMediaHasActiveVideoCaptureDevice
+
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageGetMediaState):
+ * UIProcess/API/C/WKPagePrivate.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::isPlayingMediaDidChange): Update the mask to include the two
+ bits.
+
</ins><span class="cx"> 2016-11-14 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS WK2] Implement support for visual viewports
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -2748,8 +2748,10 @@
</span><span class="cx"> state |= kWKMediaIsPlayingAudio;
</span><span class="cx"> if (coreState & WebCore::MediaProducer::IsPlayingVideo)
</span><span class="cx"> state |= kWKMediaIsPlayingVideo;
</span><del>- if (coreState & WebCore::MediaProducer::HasActiveMediaCaptureDevice)
- state |= kWKMediaHasActiveCaptureDevice;
</del><ins>+ if (coreState & WebCore::MediaProducer::HasActiveAudioCaptureDevice)
+ state |= kWKMediaHasActiveAudioCaptureDevice;
+ if (coreState & WebCore::MediaProducer::HasActiveVideoCaptureDevice)
+ state |= kWKMediaHasActiveVideoCaptureDevice;
</ins><span class="cx">
</span><span class="cx"> return state;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagePrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPagePrivate.h (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPagePrivate.h        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPagePrivate.h        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -133,7 +133,8 @@
</span><span class="cx"> kWKMediaIsNotPlaying = 0,
</span><span class="cx"> kWKMediaIsPlayingAudio = 1 << 0,
</span><span class="cx"> kWKMediaIsPlayingVideo = 1 << 1,
</span><del>- kWKMediaHasActiveCaptureDevice = 1 << 2,
</del><ins>+ kWKMediaHasActiveAudioCaptureDevice = 1 << 2,
+ kWKMediaHasActiveVideoCaptureDevice = 1 << 3,
</ins><span class="cx"> };
</span><span class="cx"> typedef uint32_t WKMediaState;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (208777 => 208778)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-11-16 01:35:09 UTC (rev 208777)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-11-16 02:55:22 UTC (rev 208778)
</span><span class="lines">@@ -6388,7 +6388,7 @@
</span><span class="cx">
</span><span class="cx"> activityStateDidChange(ActivityState::IsAudible);
</span><span class="cx">
</span><del>- playingMediaMask |= MediaProducer::HasActiveMediaCaptureDevice;
</del><ins>+ playingMediaMask |= MediaProducer::HasActiveAudioCaptureDevice | MediaProducer::HasActiveVideoCaptureDevice;
</ins><span class="cx"> if ((oldState & playingMediaMask) != (m_mediaState & playingMediaMask))
</span><span class="cx"> m_uiClient->isPlayingAudioDidChange(*this);
</span><span class="cx"> #if PLATFORM(MAC)
</span></span></pre>
</div>
</div>
</body>
</html>