Skip to content
Permalink
Browse files
[WK2] Support -[WebAVPlayerController setMuted:]
https://bugs.webkit.org/show_bug.cgi?id=173777

Reviewed by Eric Carlson.

Source/WebCore:

Have -[WebAVPlayerController setMuted:] pass the request to its delegate (the model)
rather than just storing the value.

* platform/cocoa/WebPlaybackSessionModel.h:
* platform/cocoa/WebPlaybackSessionModelMediaElement.h:
* platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
(WebCore::WebPlaybackSessionModelMediaElement::toggleMuted):
(WebCore::WebPlaybackSessionModelMediaElement::setMuted):
* platform/ios/WebAVPlayerController.h:
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController isMuted]):
(-[WebAVPlayerController setMuted:]):
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(WebVideoFullscreenControllerContext::setMuted):

Source/WebKit2:

Add a SetMuted message to WebPlaybackSessionManager.

Drive-by refactoring: Because the new setMuted() method conflicts with the existing setMuted()
notification, do a giant rename of the notificiation methods from set(Value) -> (value)Changed.

* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
(WebKit::WebPlaybackSessionModelContext::setMuted):
(WebKit::WebPlaybackSessionModelContext::playbackStartedTimeChanged):
(WebKit::WebPlaybackSessionModelContext::durationChanged):
(WebKit::WebPlaybackSessionModelContext::currentTimeChanged):
(WebKit::WebPlaybackSessionModelContext::bufferedTimeChanged):
(WebKit::WebPlaybackSessionModelContext::rateChanged):
(WebKit::WebPlaybackSessionModelContext::seekableRangesChanged):
(WebKit::WebPlaybackSessionModelContext::canPlayFastReverseChanged):
(WebKit::WebPlaybackSessionModelContext::audioMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionModelContext::legibleMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionModelContext::audioMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionModelContext::legibleMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionModelContext::externalPlaybackChanged):
(WebKit::WebPlaybackSessionModelContext::wirelessVideoPlaybackDisabledChanged):
(WebKit::WebPlaybackSessionModelContext::mutedChanged):
(WebKit::WebPlaybackSessionManagerProxy::currentTimeChanged):
(WebKit::WebPlaybackSessionManagerProxy::bufferedTimeChanged):
(WebKit::WebPlaybackSessionManagerProxy::seekableRangesVectorChanged):
(WebKit::WebPlaybackSessionManagerProxy::canPlayFastReverseChanged):
(WebKit::WebPlaybackSessionManagerProxy::audioMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionManagerProxy::legibleMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionManagerProxy::audioMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionManagerProxy::legibleMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionManagerProxy::externalPlaybackPropertiesChanged):
(WebKit::WebPlaybackSessionManagerProxy::wirelessVideoPlaybackDisabledChanged):
(WebKit::WebPlaybackSessionManagerProxy::mutedChanged):
(WebKit::WebPlaybackSessionManagerProxy::durationChanged):
(WebKit::WebPlaybackSessionManagerProxy::playbackStartedTimeChanged):
(WebKit::WebPlaybackSessionManagerProxy::rateChanged):
(WebKit::WebPlaybackSessionManagerProxy::setMuted):
(WebKit::WebPlaybackSessionManagerProxy::controlsManagerInterface):
(WebKit::WebPlaybackSessionModelContext::setPlaybackStartedTime): Deleted.
(WebKit::WebPlaybackSessionModelContext::setDuration): Deleted.
(WebKit::WebPlaybackSessionModelContext::setCurrentTime): Deleted.
(WebKit::WebPlaybackSessionModelContext::setBufferedTime): Deleted.
(WebKit::WebPlaybackSessionModelContext::setRate): Deleted.
(WebKit::WebPlaybackSessionModelContext::setSeekableRanges): Deleted.
(WebKit::WebPlaybackSessionModelContext::setCanPlayFastReverse): Deleted.
(WebKit::WebPlaybackSessionModelContext::setAudioMediaSelectionOptions): Deleted.
(WebKit::WebPlaybackSessionModelContext::setLegibleMediaSelectionOptions): Deleted.
(WebKit::WebPlaybackSessionModelContext::setAudioMediaSelectionIndex): Deleted.
(WebKit::WebPlaybackSessionModelContext::setLegibleMediaSelectionIndex): Deleted.
(WebKit::WebPlaybackSessionModelContext::setExternalPlayback): Deleted.
(WebKit::WebPlaybackSessionModelContext::setWirelessVideoPlaybackDisabled): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setCurrentTime): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setBufferedTime): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setCanPlayFastReverse): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionOptions): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionOptions): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionIndex): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionIndex): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setExternalPlaybackProperties): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setWirelessVideoPlaybackDisabled): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setDuration): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setPlaybackStartedTime): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setRate): Deleted.
* WebProcess/cocoa/WebPlaybackSessionManager.h:
* WebProcess/cocoa/WebPlaybackSessionManager.messages.in:
* WebProcess/cocoa/WebPlaybackSessionManager.mm:
(WebKit::WebPlaybackSessionManager::durationChanged):
(WebKit::WebPlaybackSessionManager::currentTimeChanged):
(WebKit::WebPlaybackSessionManager::bufferedTimeChanged):
(WebKit::WebPlaybackSessionManager::playbackStartedTimeChanged):
(WebKit::WebPlaybackSessionManager::rateChanged):
(WebKit::WebPlaybackSessionManager::seekableRangesChanged):
(WebKit::WebPlaybackSessionManager::canPlayFastReverseChanged):
(WebKit::WebPlaybackSessionManager::audioMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionManager::legibleMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionManager::externalPlaybackChanged):
(WebKit::WebPlaybackSessionManager::audioMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionManager::legibleMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionManager::wirelessVideoPlaybackDisabledChanged):
(WebKit::WebPlaybackSessionManager::mutedChanged):
(WebKit::WebPlaybackSessionManager::setMuted):


Canonical link: https://commits.webkit.org/190640@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
jernoble committed Jun 23, 2017
1 parent da1d098 commit 1dfe52a4624db1abed61cb7bb398afcd4490e1c4
Show file tree
Hide file tree
Showing 14 changed files with 268 additions and 101 deletions.
@@ -1,3 +1,25 @@
2017-06-23 Jer Noble <jer.noble@apple.com>

[WK2] Support -[WebAVPlayerController setMuted:]
https://bugs.webkit.org/show_bug.cgi?id=173777

Reviewed by Eric Carlson.

Have -[WebAVPlayerController setMuted:] pass the request to its delegate (the model)
rather than just storing the value.

* platform/cocoa/WebPlaybackSessionModel.h:
* platform/cocoa/WebPlaybackSessionModelMediaElement.h:
* platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
(WebCore::WebPlaybackSessionModelMediaElement::toggleMuted):
(WebCore::WebPlaybackSessionModelMediaElement::setMuted):
* platform/ios/WebAVPlayerController.h:
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController isMuted]):
(-[WebAVPlayerController setMuted:]):
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(WebVideoFullscreenControllerContext::setMuted):

2017-06-23 Frederic Wang <fwang@igalia.com>

Make RenderLayer::handleTouchEvent use usesAcceleratedScrolling()
@@ -57,6 +57,7 @@ class WebPlaybackSessionModel {
virtual void selectLegibleMediaOption(uint64_t index) = 0;
virtual void togglePictureInPicture() = 0;
virtual void toggleMuted() = 0;
virtual void setMuted(bool) = 0;

enum ExternalPlaybackTargetType { TargetTypeNone, TargetTypeAirPlay, TargetTypeTVOut };

@@ -71,6 +71,7 @@ class WebPlaybackSessionModelMediaElement final : public WebPlaybackSessionModel
WEBCORE_EXPORT void selectLegibleMediaOption(uint64_t index) final;
WEBCORE_EXPORT void togglePictureInPicture() final;
WEBCORE_EXPORT void toggleMuted() final;
WEBCORE_EXPORT void setMuted(bool) final;

double duration() const final;
double currentTime() const final;
@@ -280,9 +280,14 @@
}

void WebPlaybackSessionModelMediaElement::toggleMuted()
{
setMuted(!isMuted());
}

void WebPlaybackSessionModelMediaElement::setMuted(bool muted)
{
if (m_mediaElement)
m_mediaElement->setMuted(!m_mediaElement->muted());
m_mediaElement->setMuted(muted);
}

void WebPlaybackSessionModelMediaElement::updateMediaSelectionOptions()
@@ -40,6 +40,7 @@ class WebPlaybackSessionInterfaceAVKit;
WebAVMediaSelectionOption *_currentAudioMediaSelectionOption;
WebAVMediaSelectionOption *_currentLegibleMediaSelectionOption;
BOOL _pictureInPictureInterrupted;
BOOL _muted;
}

@property (retain) AVPlayerController* playerControllerProxy;
@@ -465,6 +465,21 @@ - (void)setPictureInPictureInterrupted:(BOOL)pictureInPictureInterrupted
}
}

- (BOOL)isMuted
{
return _muted;
}

- (void)setMuted:(BOOL)muted
{
if (_muted == muted)
return;
_muted = muted;

if (self.delegate)
self.delegate->setMuted(muted);
}

- (void)toggleMuted:(id)sender
{
UNUSED_PARAM(sender);
@@ -168,6 +168,7 @@ void didEnterFullscreen() override { }
bool wirelessVideoPlaybackDisabled() const override;
void togglePictureInPicture() override { }
void toggleMuted() override;
void setMuted(bool) final;

// WebPlaybackSessionModelClient
void durationChanged(double) override;
@@ -605,6 +606,15 @@ void togglePictureInPicture() override { }
});
}

void WebVideoFullscreenControllerContext::setMuted(bool muted)
{
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, muted] {
if (m_playbackModel)
m_playbackModel->setMuted(muted);
});
}

void WebVideoFullscreenControllerContext::beginScrubbing()
{
ASSERT(isUIThread());
@@ -1,3 +1,94 @@
2017-06-23 Jer Noble <jer.noble@apple.com>

[WK2] Support -[WebAVPlayerController setMuted:]
https://bugs.webkit.org/show_bug.cgi?id=173777

Reviewed by Eric Carlson.

Add a SetMuted message to WebPlaybackSessionManager.

Drive-by refactoring: Because the new setMuted() method conflicts with the existing setMuted()
notification, do a giant rename of the notificiation methods from set(Value) -> (value)Changed.

* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
(WebKit::WebPlaybackSessionModelContext::setMuted):
(WebKit::WebPlaybackSessionModelContext::playbackStartedTimeChanged):
(WebKit::WebPlaybackSessionModelContext::durationChanged):
(WebKit::WebPlaybackSessionModelContext::currentTimeChanged):
(WebKit::WebPlaybackSessionModelContext::bufferedTimeChanged):
(WebKit::WebPlaybackSessionModelContext::rateChanged):
(WebKit::WebPlaybackSessionModelContext::seekableRangesChanged):
(WebKit::WebPlaybackSessionModelContext::canPlayFastReverseChanged):
(WebKit::WebPlaybackSessionModelContext::audioMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionModelContext::legibleMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionModelContext::audioMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionModelContext::legibleMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionModelContext::externalPlaybackChanged):
(WebKit::WebPlaybackSessionModelContext::wirelessVideoPlaybackDisabledChanged):
(WebKit::WebPlaybackSessionModelContext::mutedChanged):
(WebKit::WebPlaybackSessionManagerProxy::currentTimeChanged):
(WebKit::WebPlaybackSessionManagerProxy::bufferedTimeChanged):
(WebKit::WebPlaybackSessionManagerProxy::seekableRangesVectorChanged):
(WebKit::WebPlaybackSessionManagerProxy::canPlayFastReverseChanged):
(WebKit::WebPlaybackSessionManagerProxy::audioMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionManagerProxy::legibleMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionManagerProxy::audioMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionManagerProxy::legibleMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionManagerProxy::externalPlaybackPropertiesChanged):
(WebKit::WebPlaybackSessionManagerProxy::wirelessVideoPlaybackDisabledChanged):
(WebKit::WebPlaybackSessionManagerProxy::mutedChanged):
(WebKit::WebPlaybackSessionManagerProxy::durationChanged):
(WebKit::WebPlaybackSessionManagerProxy::playbackStartedTimeChanged):
(WebKit::WebPlaybackSessionManagerProxy::rateChanged):
(WebKit::WebPlaybackSessionManagerProxy::setMuted):
(WebKit::WebPlaybackSessionManagerProxy::controlsManagerInterface):
(WebKit::WebPlaybackSessionModelContext::setPlaybackStartedTime): Deleted.
(WebKit::WebPlaybackSessionModelContext::setDuration): Deleted.
(WebKit::WebPlaybackSessionModelContext::setCurrentTime): Deleted.
(WebKit::WebPlaybackSessionModelContext::setBufferedTime): Deleted.
(WebKit::WebPlaybackSessionModelContext::setRate): Deleted.
(WebKit::WebPlaybackSessionModelContext::setSeekableRanges): Deleted.
(WebKit::WebPlaybackSessionModelContext::setCanPlayFastReverse): Deleted.
(WebKit::WebPlaybackSessionModelContext::setAudioMediaSelectionOptions): Deleted.
(WebKit::WebPlaybackSessionModelContext::setLegibleMediaSelectionOptions): Deleted.
(WebKit::WebPlaybackSessionModelContext::setAudioMediaSelectionIndex): Deleted.
(WebKit::WebPlaybackSessionModelContext::setLegibleMediaSelectionIndex): Deleted.
(WebKit::WebPlaybackSessionModelContext::setExternalPlayback): Deleted.
(WebKit::WebPlaybackSessionModelContext::setWirelessVideoPlaybackDisabled): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setCurrentTime): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setBufferedTime): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setCanPlayFastReverse): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionOptions): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionOptions): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionIndex): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionIndex): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setExternalPlaybackProperties): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setWirelessVideoPlaybackDisabled): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setDuration): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setPlaybackStartedTime): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setRate): Deleted.
* WebProcess/cocoa/WebPlaybackSessionManager.h:
* WebProcess/cocoa/WebPlaybackSessionManager.messages.in:
* WebProcess/cocoa/WebPlaybackSessionManager.mm:
(WebKit::WebPlaybackSessionManager::durationChanged):
(WebKit::WebPlaybackSessionManager::currentTimeChanged):
(WebKit::WebPlaybackSessionManager::bufferedTimeChanged):
(WebKit::WebPlaybackSessionManager::playbackStartedTimeChanged):
(WebKit::WebPlaybackSessionManager::rateChanged):
(WebKit::WebPlaybackSessionManager::seekableRangesChanged):
(WebKit::WebPlaybackSessionManager::canPlayFastReverseChanged):
(WebKit::WebPlaybackSessionManager::audioMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionManager::legibleMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionManager::externalPlaybackChanged):
(WebKit::WebPlaybackSessionManager::audioMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionManager::legibleMediaSelectionIndexChanged):
(WebKit::WebPlaybackSessionManager::wirelessVideoPlaybackDisabledChanged):
(WebKit::WebPlaybackSessionManager::mutedChanged):
(WebKit::WebPlaybackSessionManager::setMuted):

2017-06-23 Frederic Wang <fwang@igalia.com>

Use window.internals instead of overridePreference to set WebCore settings in tests
@@ -70,20 +70,20 @@ class WebPlaybackSessionModelContext final: public RefCounted<WebPlaybackSession
void addClient(WebCore::WebPlaybackSessionModelClient&) final;
void removeClient(WebCore::WebPlaybackSessionModelClient&)final;

void setDuration(double);
void setCurrentTime(double);
void setBufferedTime(double);
void setPlaybackStartedTime(double);
void setRate(bool isPlaying, float playbackRate);
void setSeekableRanges(WebCore::TimeRanges&, double lastModifiedTime, double liveUpdateInterval);
void setCanPlayFastReverse(bool);
void setAudioMediaSelectionOptions(const Vector<WebCore::MediaSelectionOption>& options, uint64_t index);
void setLegibleMediaSelectionOptions(const Vector<WebCore::MediaSelectionOption>& options, uint64_t index);
void setAudioMediaSelectionIndex(uint64_t selectedIndex);
void setLegibleMediaSelectionIndex(uint64_t selectedIndex);
void setExternalPlayback(bool, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String&);
void setWirelessVideoPlaybackDisabled(bool);
void setMuted(bool);
void durationChanged(double);
void currentTimeChanged(double);
void bufferedTimeChanged(double);
void playbackStartedTimeChanged(double);
void rateChanged(bool isPlaying, float playbackRate);
void seekableRangesChanged(WebCore::TimeRanges&, double lastModifiedTime, double liveUpdateInterval);
void canPlayFastReverseChanged(bool);
void audioMediaSelectionOptionsChanged(const Vector<WebCore::MediaSelectionOption>& options, uint64_t index);
void legibleMediaSelectionOptionsChanged(const Vector<WebCore::MediaSelectionOption>& options, uint64_t index);
void audioMediaSelectionIndexChanged(uint64_t selectedIndex);
void legibleMediaSelectionIndexChanged(uint64_t selectedIndex);
void externalPlaybackChanged(bool, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String&);
void wirelessVideoPlaybackDisabledChanged(bool);
void mutedChanged(bool);

private:
friend class WebVideoFullscreenModelContext;
@@ -109,6 +109,7 @@ class WebPlaybackSessionModelContext final: public RefCounted<WebPlaybackSession
void selectLegibleMediaOption(uint64_t) final;
void togglePictureInPicture() final;
void toggleMuted() final;
void setMuted(bool) final;

double playbackStartedTime() const final { return m_playbackStartedTime; }
double duration() const final { return m_duration; }
@@ -186,21 +187,21 @@ class WebPlaybackSessionManagerProxy : public RefCounted<WebPlaybackSessionManag
void setUpPlaybackControlsManagerWithID(uint64_t contextId);
void clearPlaybackControlsManager();
void resetMediaState(uint64_t contextId);
void setCurrentTime(uint64_t contextId, double currentTime, double hostTime);
void setBufferedTime(uint64_t contextId, double bufferedTime);
void setSeekableRangesVector(uint64_t contextId, Vector<std::pair<double, double>> ranges, double lastModifiedTime, double liveUpdateInterval);
void setCanPlayFastReverse(uint64_t contextId, bool value);
void setAudioMediaSelectionOptions(uint64_t contextId, Vector<WebCore::MediaSelectionOption> options, uint64_t selectedIndex);
void setLegibleMediaSelectionOptions(uint64_t contextId, Vector<WebCore::MediaSelectionOption> options, uint64_t selectedIndex);
void setAudioMediaSelectionIndex(uint64_t contextId, uint64_t selectedIndex);
void setLegibleMediaSelectionIndex(uint64_t contextId, uint64_t selectedIndex);
void setExternalPlaybackProperties(uint64_t contextId, bool enabled, uint32_t targetType, String localizedDeviceName);
void setWirelessVideoPlaybackDisabled(uint64_t contextId, bool);
void setDuration(uint64_t contextId, double duration);
void setPlaybackStartedTime(uint64_t contextId, double playbackStartedTime);
void setRate(uint64_t contextId, bool isPlaying, double rate);
void currentTimeChanged(uint64_t contextId, double currentTime, double hostTime);
void bufferedTimeChanged(uint64_t contextId, double bufferedTime);
void seekableRangesVectorChanged(uint64_t contextId, Vector<std::pair<double, double>> ranges, double lastModifiedTime, double liveUpdateInterval);
void canPlayFastReverseChanged(uint64_t contextId, bool value);
void audioMediaSelectionOptionsChanged(uint64_t contextId, Vector<WebCore::MediaSelectionOption> options, uint64_t selectedIndex);
void legibleMediaSelectionOptionsChanged(uint64_t contextId, Vector<WebCore::MediaSelectionOption> options, uint64_t selectedIndex);
void audioMediaSelectionIndexChanged(uint64_t contextId, uint64_t selectedIndex);
void legibleMediaSelectionIndexChanged(uint64_t contextId, uint64_t selectedIndex);
void externalPlaybackPropertiesChanged(uint64_t contextId, bool enabled, uint32_t targetType, String localizedDeviceName);
void wirelessVideoPlaybackDisabledChanged(uint64_t contextId, bool);
void durationChanged(uint64_t contextId, double duration);
void playbackStartedTimeChanged(uint64_t contextId, double playbackStartedTime);
void rateChanged(uint64_t contextId, bool isPlaying, double rate);
void handleControlledElementIDResponse(uint64_t, String) const;
void setMuted(uint64_t contextId, bool muted);
void mutedChanged(uint64_t contextId, bool muted);

// Messages to WebPlaybackSessionManager
void play(uint64_t contextId);
@@ -217,6 +218,7 @@ class WebPlaybackSessionManagerProxy : public RefCounted<WebPlaybackSessionManag
void selectLegibleMediaOption(uint64_t contextId, uint64_t index);
void togglePictureInPicture(uint64_t contextId);
void toggleMuted(uint64_t contextId);
void setMuted(uint64_t contextId, bool);

WebPageProxy* m_page;
HashMap<uint64_t, ModelInterfaceTuple> m_contextMap;
@@ -23,20 +23,20 @@
#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
messages -> WebPlaybackSessionManagerProxy {
ResetMediaState(uint64_t contextId)
SetCurrentTime(uint64_t contextId, double currentTime, double hostTime)
SetBufferedTime(uint64_t contextId, double bufferedTime)
SetSeekableRangesVector(uint64_t contextId, Vector<std::pair<double, double>> ranges, double lastModifiedTime, double liveUpdateInterval)
SetCanPlayFastReverse(uint64_t contextId, bool value)
SetAudioMediaSelectionOptions(uint64_t contextId, Vector<WebCore::MediaSelectionOption> options, uint64_t selectedIndex)
SetLegibleMediaSelectionOptions(uint64_t contextId, Vector<WebCore::MediaSelectionOption> options, uint64_t selectedIndex)
SetAudioMediaSelectionIndex(uint64_t contextId, uint64_t selectedIndex)
SetLegibleMediaSelectionIndex(uint64_t contextId, uint64_t selectedIndex)
SetExternalPlaybackProperties(uint64_t contextId, bool enabled, uint32_t targetType, String localizedDeviceName)
SetWirelessVideoPlaybackDisabled(uint64_t contextId, bool disabled)
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);
CurrentTimeChanged(uint64_t contextId, double currentTime, double hostTime)
BufferedTimeChanged(uint64_t contextId, double bufferedTime)
SeekableRangesVectorChanged(uint64_t contextId, Vector<std::pair<double, double>> ranges, double lastModifiedTime, double liveUpdateInterval)
CanPlayFastReverseChanged(uint64_t contextId, bool value)
AudioMediaSelectionOptionsChanged(uint64_t contextId, Vector<WebCore::MediaSelectionOption> options, uint64_t selectedIndex)
LegibleMediaSelectionOptionsChanged(uint64_t contextId, Vector<WebCore::MediaSelectionOption> options, uint64_t selectedIndex)
AudioMediaSelectionIndexChanged(uint64_t contextId, uint64_t selectedIndex)
LegibleMediaSelectionIndexChanged(uint64_t contextId, uint64_t selectedIndex)
ExternalPlaybackPropertiesChanged(uint64_t contextId, bool enabled, uint32_t targetType, String localizedDeviceName)
WirelessVideoPlaybackDisabledChanged(uint64_t contextId, bool disabled)
DurationChanged(uint64_t contextId, double duration)
PlaybackStartedTimeChanged(uint64_t contextId, double playbackStartedTime)
RateChanged(uint64_t contextId, bool isPlaying, double rate)
MutedChanged(uint64_t contextId, bool muted);
SetUpPlaybackControlsManagerWithID(uint64_t contextId)
ClearPlaybackControlsManager()

0 comments on commit 1dfe52a

Please sign in to comment.