Diff
Modified: trunk/Source/WebCore/ChangeLog (216215 => 216216)
--- trunk/Source/WebCore/ChangeLog 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebCore/ChangeLog 2017-05-04 23:18:48 UTC (rev 216216)
@@ -1,3 +1,33 @@
+2017-05-04 Jeremy Jones <[email protected]>
+
+ Add muted to WebPlaybackSessionModel.
+ https://bugs.webkit.org/show_bug.cgi?id=171592
+ rdar://problem/31814074
+
+ Reviewed by Jer Noble.
+
+ No behavior change. This just adds the ability for UI to mute.
+
+ * platform/cocoa/WebPlaybackSessionModel.h:
+ (WebCore::WebPlaybackSessionModelClient::mutedChanged):
+ * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
+ * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
+ (WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):
+ (WebCore::WebPlaybackSessionModelMediaElement::toggleMuted):
+ (WebCore::WebPlaybackSessionModelMediaElement::observedEventNames):
+ (WebCore::WebPlaybackSessionModelMediaElement::isMuted):
+ * platform/ios/WebAVPlayerController.h:
+ * platform/ios/WebAVPlayerController.mm:
+ (-[WebAVPlayerController toggleMuted:]):
+ * platform/ios/WebPlaybackSessionInterfaceAVKit.h:
+ * platform/ios/WebPlaybackSessionInterfaceAVKit.mm:
+ (WebCore::WebPlaybackSessionInterfaceAVKit::mutedChanged):
+ * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+ (WebVideoFullscreenControllerContext::mutedChanged):
+ (WebVideoFullscreenControllerContext::isMuted):
+ (WebVideoFullscreenControllerContext::toggleMuted):
+ * platform/spi/ios/MediaPlayerSPI.h:
+
2017-05-04 Joseph Pecoraro <[email protected]>
REGRESSION(r216138): Web Inspector: ASSERT(!content.isNull()) when checking for source map url opening inspector
Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h (216215 => 216216)
--- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h 2017-05-04 23:18:48 UTC (rev 216216)
@@ -56,6 +56,7 @@
virtual void selectAudioMediaOption(uint64_t index) = 0;
virtual void selectLegibleMediaOption(uint64_t index) = 0;
virtual void togglePictureInPicture() = 0;
+ virtual void toggleMuted() = 0;
enum ExternalPlaybackTargetType { TargetTypeNone, TargetTypeAirPlay, TargetTypeTVOut };
@@ -76,6 +77,7 @@
virtual ExternalPlaybackTargetType externalPlaybackTargetType() const = 0;
virtual String externalPlaybackLocalizedDeviceName() const = 0;
virtual bool wirelessVideoPlaybackDisabled() const = 0;
+ virtual bool isMuted() const = 0;
};
class WebPlaybackSessionModelClient {
@@ -94,6 +96,7 @@
virtual void legibleMediaSelectionIndexChanged(uint64_t) { }
virtual void externalPlaybackChanged(bool /* enabled */, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& /* localizedDeviceName */) { }
virtual void wirelessVideoPlaybackDisabledChanged(bool) { }
+ virtual void mutedChanged(bool) { }
};
}
Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h (216215 => 216216)
--- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h 2017-05-04 23:18:48 UTC (rev 216216)
@@ -70,6 +70,7 @@
WEBCORE_EXPORT void selectAudioMediaOption(uint64_t index) final;
WEBCORE_EXPORT void selectLegibleMediaOption(uint64_t index) final;
WEBCORE_EXPORT void togglePictureInPicture() final;
+ WEBCORE_EXPORT void toggleMuted() final;
double duration() const final;
double currentTime() const final;
@@ -87,6 +88,7 @@
ExternalPlaybackTargetType externalPlaybackTargetType() const final;
String externalPlaybackLocalizedDeviceName() const final;
bool wirelessVideoPlaybackDisabled() const final;
+ bool isMuted() const final;
protected:
WEBCORE_EXPORT WebPlaybackSessionModelMediaElement();
Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm (216215 => 216216)
--- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm 2017-05-04 23:18:48 UTC (rev 216216)
@@ -165,6 +165,12 @@
// updateMediaSelectionOptions() will also update the selection indices.
if (eventName == eventNames().changeEvent)
updateMediaSelectionIndices();
+
+ if (all
+ || eventName == eventNames().volumechangeEvent) {
+ for (auto client : m_clients)
+ client->mutedChanged(isMuted());
+ }
}
void WebPlaybackSessionModelMediaElement::addClient(WebPlaybackSessionModelClient& client)
{
@@ -269,6 +275,12 @@
m_mediaElement->enterFullscreen(MediaPlayerEnums::VideoFullscreenModePictureInPicture);
}
+void WebPlaybackSessionModelMediaElement::toggleMuted()
+{
+ if (m_mediaElement)
+ m_mediaElement->setMuted(!m_mediaElement->muted());
+}
+
void WebPlaybackSessionModelMediaElement::updateMediaSelectionOptions()
{
if (!m_mediaElement)
@@ -331,6 +343,7 @@
eventNames().timeupdateEvent,
eventNames().addtrackEvent,
eventNames().removetrackEvent,
+ eventNames().volumechangeEvent,
eventNames().webkitcurrentplaybacktargetiswirelesschangedEvent,
});
return names.get();
@@ -489,6 +502,11 @@
return m_mediaElement && m_mediaElement->mediaSession().wirelessVideoPlaybackDisabled(*m_mediaElement);
}
+bool WebPlaybackSessionModelMediaElement::isMuted() const
+{
+ return m_mediaElement ? m_mediaElement->muted() : false;
}
+}
+
#endif
Modified: trunk/Source/WebCore/platform/ios/WebAVPlayerController.h (216215 => 216216)
--- trunk/Source/WebCore/platform/ios/WebAVPlayerController.h 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebCore/platform/ios/WebAVPlayerController.h 2017-05-04 23:18:48 UTC (rev 216216)
@@ -69,6 +69,7 @@
@property AVPlayerControllerStatus status;
@property (retain) AVValueTiming *timing;
@property (retain) NSArray *seekableTimeRanges;
+@property (getter=isMuted) BOOL muted;
@property (readonly) BOOL hasMediaSelectionOptions;
@property (readonly) BOOL hasAudioMediaSelectionOptions;
Modified: trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm (216215 => 216216)
--- trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm 2017-05-04 23:18:48 UTC (rev 216216)
@@ -424,6 +424,15 @@
[self setPlaying:NO];
}
}
+
+- (void)toggleMuted:(id)sender
+{
+ UNUSED_PARAM(sender);
+ if (!self.delegate)
+ return;
+ self.delegate->toggleMuted();
+}
+
@end
@implementation WebAVMediaSelectionOption
Modified: trunk/Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.h (216215 => 216216)
--- trunk/Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.h 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.h 2017-05-04 23:18:48 UTC (rev 216216)
@@ -82,6 +82,7 @@
WEBCORE_EXPORT void legibleMediaSelectionOptionsChanged(const Vector<MediaSelectionOption>& options, uint64_t selectedIndex) override;
WEBCORE_EXPORT void externalPlaybackChanged(bool enabled, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& localizedDeviceName) override;
WEBCORE_EXPORT void wirelessVideoPlaybackDisabledChanged(bool) override;
+ WEBCORE_EXPORT void mutedChanged(bool) override;
WEBCORE_EXPORT virtual void invalidate();
Modified: trunk/Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.mm (216215 => 216216)
--- trunk/Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.mm 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.mm 2017-05-04 23:18:48 UTC (rev 216216)
@@ -218,6 +218,11 @@
[m_playerController setAllowsExternalPlayback:!disabled];
}
+void WebPlaybackSessionInterfaceAVKit::mutedChanged(bool muted)
+{
+ [m_playerController setMuted:muted];
+}
+
void WebPlaybackSessionInterfaceAVKit::invalidate()
{
if (!m_playbackSessionModel)
Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm (216215 => 216216)
--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm 2017-05-04 23:18:48 UTC (rev 216216)
@@ -166,6 +166,7 @@
String externalPlaybackLocalizedDeviceName() const override;
bool wirelessVideoPlaybackDisabled() const override;
void togglePictureInPicture() override { }
+ void toggleMuted() override;
// WebPlaybackSessionModelClient
void durationChanged(double) override;
@@ -178,6 +179,7 @@
void legibleMediaSelectionOptionsChanged(const Vector<MediaSelectionOption>& options, uint64_t selectedIndex) override;
void externalPlaybackChanged(bool enabled, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& localizedDeviceName) override;
void wirelessVideoPlaybackDisabledChanged(bool) override;
+ void mutedChanged(bool) override;
// WebVideoFullscreenModel
void addClient(WebVideoFullscreenModelClient&) override;
@@ -189,6 +191,7 @@
bool isVisible() const override;
bool hasVideo() const override;
FloatSize videoDimensions() const override;
+ bool isMuted() const override;
HashSet<WebPlaybackSessionModelClient*> m_playbackClients;
HashSet<WebVideoFullscreenModelClient*> m_fullscreenClients;
@@ -442,6 +445,20 @@
client->wirelessVideoPlaybackDisabledChanged(disabled);
}
+void WebVideoFullscreenControllerContext::mutedChanged(bool muted)
+{
+ if (WebThreadIsCurrent()) {
+ RefPtr<WebVideoFullscreenControllerContext> protectedThis(this);
+ dispatch_async(dispatch_get_main_queue(), [protectedThis, muted] {
+ protectedThis->mutedChanged(muted);
+ });
+ return;
+ }
+
+ for (auto& client : m_playbackClients)
+ client->mutedChanged(muted);
+}
+
#pragma mark WebVideoFullscreenModel
void WebVideoFullscreenControllerContext::addClient(WebVideoFullscreenModelClient& client)
@@ -521,6 +538,12 @@
return m_fullscreenModel ? m_fullscreenModel->hasVideo() : false;
}
+bool WebVideoFullscreenControllerContext::isMuted() const
+{
+ ASSERT(isUIThread());
+ return m_playbackModel ? m_playbackModel->isMuted() : false;
+}
+
FloatSize WebVideoFullscreenControllerContext::videoDimensions() const
{
ASSERT(isUIThread());
@@ -571,6 +594,16 @@
});
}
+void WebVideoFullscreenControllerContext::toggleMuted()
+{
+ ASSERT(isUIThread());
+ RefPtr<WebVideoFullscreenControllerContext> protectedThis(this);
+ WebThreadRun([protectedThis, this] {
+ if (m_playbackModel)
+ m_playbackModel->toggleMuted();
+ });
+}
+
void WebVideoFullscreenControllerContext::beginScrubbing()
{
ASSERT(isUIThread());
Modified: trunk/Source/WebKit2/ChangeLog (216215 => 216216)
--- trunk/Source/WebKit2/ChangeLog 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebKit2/ChangeLog 2017-05-04 23:18:48 UTC (rev 216216)
@@ -1,3 +1,27 @@
+2017-05-04 Jeremy Jones <[email protected]>
+
+ Add mute to WebPlaybackSessionModel.
+ https://bugs.webkit.org/show_bug.cgi?id=171592
+ rdar://problem/31814074
+
+ Reviewed by Jer Noble.
+
+ Plumb through muted.
+
+ * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
+ * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
+ * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
+ (WebKit::WebPlaybackSessionModelContext::toggleMuted):
+ (WebKit::WebPlaybackSessionModelContext::setMuted):
+ (WebKit::WebPlaybackSessionManagerProxy::setMuted):
+ (WebKit::WebPlaybackSessionManagerProxy::toggleMuted):
+ * WebProcess/cocoa/WebPlaybackSessionManager.h:
+ * WebProcess/cocoa/WebPlaybackSessionManager.messages.in:
+ * WebProcess/cocoa/WebPlaybackSessionManager.mm:
+ (WebKit::WebPlaybackSessionInterfaceContext::mutedChanged):
+ (WebKit::WebPlaybackSessionManager::mutedChanged):
+ (WebKit::WebPlaybackSessionManager::toggleMuted):
+
2017-05-04 Wenson Hsieh <[email protected]>
[WK2] Image action sheets sometimes do not dismiss when beginning data interaction
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h (216215 => 216216)
--- trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h 2017-05-04 23:18:48 UTC (rev 216216)
@@ -83,6 +83,7 @@
void setLegibleMediaSelectionIndex(uint64_t selectedIndex);
void setExternalPlayback(bool, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String&);
void setWirelessVideoPlaybackDisabled(bool);
+ void setMuted(bool);
private:
friend class WebVideoFullscreenModelContext;
@@ -107,6 +108,7 @@
void selectAudioMediaOption(uint64_t) final;
void selectLegibleMediaOption(uint64_t) final;
void togglePictureInPicture() final;
+ void toggleMuted() final;
double playbackStartedTime() const final { return m_playbackStartedTime; }
double duration() const final { return m_duration; }
@@ -125,6 +127,7 @@
WebPlaybackSessionModel::ExternalPlaybackTargetType externalPlaybackTargetType() const final { return m_externalPlaybackTargetType; }
String externalPlaybackLocalizedDeviceName() const final { return m_externalPlaybackLocalizedDeviceName; }
bool wirelessVideoPlaybackDisabled() const final { return m_wirelessVideoPlaybackDisabled; }
+ bool isMuted() const final { return m_muted; }
WebPlaybackSessionManagerProxy* m_manager;
uint64_t m_contextId;
@@ -147,6 +150,7 @@
WebPlaybackSessionModel::ExternalPlaybackTargetType m_externalPlaybackTargetType { WebPlaybackSessionModel::TargetTypeNone };
String m_externalPlaybackLocalizedDeviceName;
bool m_wirelessVideoPlaybackDisabled { false };
+ bool m_muted { false };
};
class WebPlaybackSessionManagerProxy : public RefCounted<WebPlaybackSessionManagerProxy>, private IPC::MessageReceiver {
@@ -192,6 +196,7 @@
void setPlaybackStartedTime(uint64_t contextId, double playbackStartedTime);
void setRate(uint64_t contextId, bool isPlaying, double rate);
void handleControlledElementIDResponse(uint64_t, String) const;
+ void setMuted(uint64_t contextId, bool muted);
// Messages to WebPlaybackSessionManager
void play(uint64_t contextId);
@@ -207,6 +212,7 @@
void selectAudioMediaOption(uint64_t contextId, uint64_t index);
void selectLegibleMediaOption(uint64_t contextId, uint64_t index);
void togglePictureInPicture(uint64_t contextId);
+ void toggleMuted(uint64_t contextId);
WebPageProxy* m_page;
HashMap<uint64_t, ModelInterfaceTuple> m_contextMap;
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in (216215 => 216216)
--- trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in 2017-05-04 23:18:48 UTC (rev 216216)
@@ -36,6 +36,7 @@
SetDuration(uint64_t contextId, double duration)
SetPlaybackStartedTime(uint64_t contextId, double playbackStartedTime)
SetRate(uint64_t contextId, bool isPlaying, double rate)
+ SetMuted(uint64_t contextId, bool muted);
SetUpPlaybackControlsManagerWithID(uint64_t contextId)
ClearPlaybackControlsManager()
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm (216215 => 216216)
--- trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm 2017-05-04 23:18:48 UTC (rev 216216)
@@ -135,6 +135,12 @@
m_manager->togglePictureInPicture(m_contextId);
}
+void WebPlaybackSessionModelContext::toggleMuted()
+{
+ if (m_manager)
+ m_manager->toggleMuted(m_contextId);
+}
+
void WebPlaybackSessionModelContext::setPlaybackStartedTime(double playbackStartedTime)
{
m_playbackStartedTime = playbackStartedTime;
@@ -238,6 +244,13 @@
client->wirelessVideoPlaybackDisabledChanged(wirelessVideoPlaybackDisabled);
}
+void WebPlaybackSessionModelContext::setMuted(bool muted)
+{
+ m_muted = muted;
+ for (auto* client : m_clients)
+ client->mutedChanged(muted);
+}
+
#pragma mark - WebPlaybackSessionManagerProxy
RefPtr<WebPlaybackSessionManagerProxy> WebPlaybackSessionManagerProxy::create(WebPageProxy& page)
@@ -414,6 +427,11 @@
ensureModel(contextId).setWirelessVideoPlaybackDisabled(disabled);
}
+void WebPlaybackSessionManagerProxy::setMuted(uint64_t contextId, bool muted)
+{
+ ensureModel(contextId).setMuted(muted);
+}
+
void WebPlaybackSessionManagerProxy::setDuration(uint64_t contextId, double duration)
{
ensureModel(contextId).setDuration(duration);
@@ -509,6 +527,11 @@
m_page->send(Messages::WebPlaybackSessionManager::TogglePictureInPicture(contextId), m_page->pageID());
}
+void WebPlaybackSessionManagerProxy::toggleMuted(uint64_t contextId)
+{
+ m_page->send(Messages::WebPlaybackSessionManager::ToggleMuted(contextId), m_page->pageID());
+}
+
void WebPlaybackSessionManagerProxy::requestControlledElementID()
{
if (m_controlsManagerContextId)
Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.h (216215 => 216216)
--- trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.h 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.h 2017-05-04 23:18:48 UTC (rev 216216)
@@ -87,6 +87,7 @@
void legibleMediaSelectionIndexChanged(uint64_t) final;
void externalPlaybackChanged(bool enabled, WebCore::WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& localizedDeviceName) final;
void wirelessVideoPlaybackDisabledChanged(bool) final;
+ void mutedChanged(bool) final;
WebPlaybackSessionInterfaceContext(WebPlaybackSessionManager&, uint64_t contextId);
@@ -135,6 +136,7 @@
void legibleMediaSelectionIndexChanged(uint64_t contextId, uint64_t selectedIndex);
void externalPlaybackChanged(uint64_t contextId, bool enabled, WebCore::WebPlaybackSessionModel::ExternalPlaybackTargetType, String localizedDeviceName);
void wirelessVideoPlaybackDisabledChanged(uint64_t contextId, bool);
+ void mutedChanged(uint64_t contextId, bool);
// Messages from WebPlaybackSessionManagerProxy
void play(uint64_t contextId);
@@ -151,6 +153,7 @@
void selectLegibleMediaOption(uint64_t contextId, uint64_t index);
void handleControlledElementIDRequest(uint64_t contextId);
void togglePictureInPicture(uint64_t contextId);
+ void toggleMuted(uint64_t contextId);
WebPage* m_page;
HashMap<WebCore::HTMLMediaElement*, uint64_t> m_mediaElements;
Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.messages.in (216215 => 216216)
--- trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.messages.in 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.messages.in 2017-05-04 23:18:48 UTC (rev 216216)
@@ -37,5 +37,6 @@
SelectLegibleMediaOption(uint64_t contextId, uint64_t index)
HandleControlledElementIDRequest(uint64_t contextId)
TogglePictureInPicture(uint64_t contextId)
+ ToggleMuted(uint64_t contextId)
}
#endif
Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm (216215 => 216216)
--- trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm 2017-05-04 23:04:34 UTC (rev 216215)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm 2017-05-04 23:18:48 UTC (rev 216216)
@@ -149,6 +149,12 @@
m_manager->wirelessVideoPlaybackDisabledChanged(m_contextId, disabled);
}
+void WebPlaybackSessionInterfaceContext::mutedChanged(bool muted)
+{
+ if (m_manager)
+ m_manager->mutedChanged(m_contextId, muted);
+}
+
#pragma mark - WebPlaybackSessionManager
Ref<WebPlaybackSessionManager> WebPlaybackSessionManager::create(WebPage& page)
@@ -358,6 +364,11 @@
m_page->send(Messages::WebPlaybackSessionManagerProxy::SetWirelessVideoPlaybackDisabled(contextId, disabled));
}
+void WebPlaybackSessionManager::mutedChanged(uint64_t contextId, bool muted)
+{
+ m_page->send(Messages::WebPlaybackSessionManagerProxy::SetMuted(contextId, muted));
+}
+
#pragma mark Messages from WebPlaybackSessionManagerProxy:
void WebPlaybackSessionManager::play(uint64_t contextId)
@@ -445,6 +456,12 @@
ensureModel(contextId).togglePictureInPicture();
}
+void WebPlaybackSessionManager::toggleMuted(uint64_t contextId)
+{
+ UserGestureIndicator indicator(ProcessingUserGesture);
+ ensureModel(contextId).toggleMuted();
+}
+
} // namespace WebKit
#endif // PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))