Title: [210347] branches/safari-603-branch

Diff

Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (210346 => 210347)


--- branches/safari-603-branch/Source/WebCore/ChangeLog	2017-01-05 17:09:12 UTC (rev 210346)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog	2017-01-05 17:09:15 UTC (rev 210347)
@@ -1,5 +1,21 @@
 2017-01-05  Matthew Hanson  <[email protected]>
 
+        Merge r210100. rdar://problem/28388000
+
+    2016-12-22  Jer Noble  <[email protected]>
+
+            Muted media element playback should not interrupt other audio playback
+            https://bugs.webkit.org/show_bug.cgi?id=166347
+
+            Reviewed by Eric Carlson.
+
+            Test: TestWebKitAPI/WebKit/ios/AudioSessionCategoryIOS.mm
+
+            * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
+            (PlatformMediaSessionManager::updateSessionState):
+
+2017-01-05  Matthew Hanson  <[email protected]>
+
         Merge r210083. rdar://problem/25391382
 
     2016-12-21  Jiewen Tan  <[email protected]>

Modified: branches/safari-603-branch/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.cpp (210346 => 210347)


--- branches/safari-603-branch/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.cpp	2017-01-05 17:09:12 UTC (rev 210346)
+++ branches/safari-603-branch/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.cpp	2017-01-05 17:09:15 UTC (rev 210347)
@@ -60,7 +60,7 @@
     if (!Settings::shouldManageAudioSessionCategory())
         return;
 
-    if (has(PlatformMediaSession::Video) || has(PlatformMediaSession::Audio)) {
+    if (has(PlatformMediaSession::VideoAudio) || has(PlatformMediaSession::Audio)) {
         if (canProduceAudio())
             AudioSession::sharedSession().setCategory(AudioSession::MediaPlayback);
         else

Modified: branches/safari-603-branch/Tools/ChangeLog (210346 => 210347)


--- branches/safari-603-branch/Tools/ChangeLog	2017-01-05 17:09:12 UTC (rev 210346)
+++ branches/safari-603-branch/Tools/ChangeLog	2017-01-05 17:09:15 UTC (rev 210347)
@@ -1,5 +1,21 @@
 2017-01-05  Matthew Hanson  <[email protected]>
 
+        Merge r210100. rdar://problem/28388000
+
+    2016-12-22  Jer Noble  <[email protected]>
+
+            Muted media element playback should not interrupt other audio playback
+            https://bugs.webkit.org/show_bug.cgi?id=166347
+
+            Reviewed by Eric Carlson.
+
+            * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+            * TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm:
+            (TestWebKitAPI::TEST):
+            * TestWebKitAPI/Tests/WebKit/ios/video-with-muted-audio.html: Added.
+
+2017-01-05  Matthew Hanson  <[email protected]>
+
         Merge r210093. rdar://problem/29758423
 
     2016-12-21  Alexey Proskuryakov  <[email protected]>

Modified: branches/safari-603-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (210346 => 210347)


--- branches/safari-603-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2017-01-05 17:09:12 UTC (rev 210346)
+++ branches/safari-603-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2017-01-05 17:09:15 UTC (rev 210347)
@@ -505,6 +505,7 @@
 		CD78E11D1DB7EA660014A2DE /* FullscreenDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD78E11A1DB7EA360014A2DE /* FullscreenDelegate.mm */; };
 		CD78E11E1DB7EE2A0014A2DE /* FullscreenDelegate.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD78E11B1DB7EA360014A2DE /* FullscreenDelegate.html */; };
 		CD9E292E1C90C33F000BB800 /* audio-only.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD9E292D1C90C1BA000BB800 /* audio-only.html */; };
+		CDB4115A1E0B00DB00EAD352 /* video-with-muted-audio.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CDB411591E09DA8E00EAD352 /* video-with-muted-audio.html */; };
 		CDBFCC451A9FF45300A7B691 /* FullscreenZoomInitialFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDBFCC431A9FF44800A7B691 /* FullscreenZoomInitialFrame.mm */; };
 		CDBFCC461A9FF49E00A7B691 /* FullscreenZoomInitialFrame.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CDBFCC421A9FF44800A7B691 /* FullscreenZoomInitialFrame.html */; };
 		CDC8E48D1BC5CB4500594FEC /* AudioSessionCategoryIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC8E4851BC5B19400594FEC /* AudioSessionCategoryIOS.mm */; };
@@ -596,6 +597,7 @@
 			dstPath = TestWebKitAPI.resources;
 			dstSubfolderSpec = 7;
 			files = (
+				CDB4115A1E0B00DB00EAD352 /* video-with-muted-audio.html in Copy Resources */,
 				9BD4239C1E04C01C00200395 /* chinese-character-with-image.html in Copy Resources */,
 				A155022C1E050D0300A24C57 /* duplicate-completion-handler-calls.html in Copy Resources */,
 				5110FCF91E01CD8A006F8D0B /* IndexUpgrade.blob in Copy Resources */,
@@ -1261,6 +1263,7 @@
 		CD89D0381C4EDB2A00040A04 /* WebCoreNSURLSession.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreNSURLSession.mm; sourceTree = "<group>"; };
 		CD9E292B1C90A71F000BB800 /* RequiresUserActionForPlayback.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RequiresUserActionForPlayback.mm; sourceTree = "<group>"; };
 		CD9E292D1C90C1BA000BB800 /* audio-only.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "audio-only.html"; sourceTree = "<group>"; };
+		CDB411591E09DA8E00EAD352 /* video-with-muted-audio.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "video-with-muted-audio.html"; sourceTree = "<group>"; };
 		CDBFCC421A9FF44800A7B691 /* FullscreenZoomInitialFrame.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = FullscreenZoomInitialFrame.html; sourceTree = "<group>"; };
 		CDBFCC431A9FF44800A7B691 /* FullscreenZoomInitialFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FullscreenZoomInitialFrame.mm; sourceTree = "<group>"; };
 		CDC2C7141797089D00E627FB /* TimeRanges.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TimeRanges.cpp; sourceTree = "<group>"; };
@@ -2183,6 +2186,7 @@
 				CDC8E48A1BC5C96200594FEC /* video-with-audio.mp4 */,
 				CDC8E48B1BC5C96200594FEC /* video-without-audio.html */,
 				CDC8E48C1BC5C96200594FEC /* video-without-audio.mp4 */,
+				CDB411591E09DA8E00EAD352 /* video-with-muted-audio.html */,
 			);
 			name = Resources;
 			sourceTree = "<group>";

Modified: branches/safari-603-branch/Tools/TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm (210346 => 210347)


--- branches/safari-603-branch/Tools/TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm	2017-01-05 17:09:12 UTC (rev 210346)
+++ branches/safari-603-branch/Tools/TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm	2017-01-05 17:09:15 UTC (rev 210347)
@@ -89,6 +89,14 @@
     Util::run(&didBeginPlaying);
 
     EXPECT_WK_STREQ(getAVAudioSessionCategoryAmbient(), [[getAVAudioSessionClass() sharedInstance] category]);
+
+    didBeginPlaying = false;
+
+    [uiWebView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"video-with-muted-audio" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
+
+    Util::run(&didBeginPlaying);
+
+    EXPECT_WK_STREQ(getAVAudioSessionCategoryAmbient(), [[getAVAudioSessionClass() sharedInstance] category]);
 }
 
 }

Added: branches/safari-603-branch/Tools/TestWebKitAPI/Tests/WebKit/ios/video-with-muted-audio.html (0 => 210347)


--- branches/safari-603-branch/Tools/TestWebKitAPI/Tests/WebKit/ios/video-with-muted-audio.html	                        (rev 0)
+++ branches/safari-603-branch/Tools/TestWebKitAPI/Tests/WebKit/ios/video-with-muted-audio.html	2017-01-05 17:09:15 UTC (rev 210347)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <script>
+            function go() {
+                var video = document.getElementsByTagName('video')[0];
+                video.play().then(playing).catch(notPlaying);
+            }
+
+        function playing() {
+            try {
+                window.webkit.messageHandlers.testHandler.postMessage('playing');
+            } catch(e) {
+                window.location = 'callback:playing';
+            }
+        }
+
+        function notPlaying() {
+            try {
+                window.webkit.messageHandlers.testHandler.postMessage('not playing');
+            } catch(e) { }
+        }
+        </script>
+    </head>
+    <body _onload_="go()">
+        <video src="" muted webkit-playsinline></video>
+    </body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to