Title: [246415] trunk/Source/WebCore
- Revision
- 246415
- Author
- [email protected]
- Date
- 2019-06-13 14:26:33 -0700 (Thu, 13 Jun 2019)
Log Message
AVKit play button bypasses MediaElementSession playbackPermitted() checks.
https://bugs.webkit.org/show_bug.cgi?id=198813
Reviewed by Eric Carlson.
HTMLMediaElement::togglePlayState() is an internal-only method that doesn't
run playbackPermitted() checks. For our imitation AVPlayerController, translate
requests to -togglePlayback: into calls to play() and pause() depending on
playback state.
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController togglePlayback:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (246414 => 246415)
--- trunk/Source/WebCore/ChangeLog 2019-06-13 21:22:21 UTC (rev 246414)
+++ trunk/Source/WebCore/ChangeLog 2019-06-13 21:26:33 UTC (rev 246415)
@@ -1,3 +1,18 @@
+2019-06-13 Jer Noble <[email protected]>
+
+ AVKit play button bypasses MediaElementSession playbackPermitted() checks.
+ https://bugs.webkit.org/show_bug.cgi?id=198813
+
+ Reviewed by Eric Carlson.
+
+ HTMLMediaElement::togglePlayState() is an internal-only method that doesn't
+ run playbackPermitted() checks. For our imitation AVPlayerController, translate
+ requests to -togglePlayback: into calls to play() and pause() depending on
+ playback state.
+
+ * platform/ios/WebAVPlayerController.mm:
+ (-[WebAVPlayerController togglePlayback:]):
+
2019-06-13 Commit Queue <[email protected]>
Unreviewed, rolling out r246396 and r246397.
Modified: trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm (246414 => 246415)
--- trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm 2019-06-13 21:22:21 UTC (rev 246414)
+++ trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm 2019-06-13 21:26:33 UTC (rev 246415)
@@ -126,8 +126,13 @@
- (void)togglePlayback:(id)sender
{
UNUSED_PARAM(sender);
- if (self.delegate)
- self.delegate->togglePlayState();
+ if (!self.delegate)
+ return;
+
+ if (self.delegate->isPlaying())
+ self.delegate->pause();
+ else
+ self.delegate->play();
}
- (void)togglePlaybackEvenWhenInBackground:(id)sender
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes