video.currentTime is not being updated in iOS 13.4 Beta
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Feb 2020 21:14:44 +0000 (21:14 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Feb 2020 21:14:44 +0000 (21:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=207489
<rdar://problem/59322640>

Reviewed by Youenn Fablet.

Source/WebKit:

Allow the Web process and the GPU process to communicate with
'com.apple.coremedia.audiodeviceclock.xpc' because it is necessary to use a
CMTimeBase, which is used by MediaPlayerPrivateMediaStreamAVFObjC for currentTime.

Test: fast/mediastream/media-element-current-time.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:

* fast/mediastream/media-element-current-time.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256346 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/mediastream/media-element-current-time-expected.txt [new file with mode: 0644]
LayoutTests/fast/mediastream/media-element-current-time.html [new file with mode: 0644]
Source/WebKit/ChangeLog
Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb
Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb

index 7b47682..0c3f604 100644 (file)
@@ -1,3 +1,13 @@
+2020-02-11  Eric Carlson  <eric.carlson@apple.com>
+
+        video.currentTime is not being updated in iOS 13.4 Beta
+        https://bugs.webkit.org/show_bug.cgi?id=207489
+        <rdar://problem/59322640>
+
+        Reviewed by Youenn Fablet.
+
+        * fast/mediastream/media-element-current-time.html: Added.
+
 2020-02-11  Jason Lawrence  <lawrence.j@apple.com>
 
         [ Mac wk2 ] http/tests/ssl/applepay/ApplePayBillingAddress.html is flaky failing.
diff --git a/LayoutTests/fast/mediastream/media-element-current-time-expected.txt b/LayoutTests/fast/mediastream/media-element-current-time-expected.txt
new file mode 100644 (file)
index 0000000..fe9f59e
--- /dev/null
@@ -0,0 +1,4 @@
+
+
+PASS Check video.currentTime behavior 
+
diff --git a/LayoutTests/fast/mediastream/media-element-current-time.html b/LayoutTests/fast/mediastream/media-element-current-time.html
new file mode 100644 (file)
index 0000000..3db74dc
--- /dev/null
@@ -0,0 +1,31 @@
+<body>
+<video id="video" autoplay playsInline></video>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+
+promise_test(async() => {
+
+    let stream = await navigator.mediaDevices.getUserMedia({video : true});
+
+    video.srcObject = stream;
+    assert_equals(video.currentTime, 0);
+
+    await video.play();
+    let currentTime = video.currentTime;
+    assert_not_equals(currentTime, 0, "Playback has started, currentTime must not be zero");
+
+    await new Promise(resolve => setTimeout(resolve, 10));
+    assert_greater_than(video.currentTime, currentTime, "video is playing, time should advance");
+
+    video.pause();
+    currentTime = video.currentTime;
+    await new Promise(resolve => setTimeout(resolve, 10));
+    assert_equals(video.currentTime, currentTime, "video is paused, currentTime must not advance");
+
+    await video.play();
+    assert_greater_than(video.currentTime, currentTime, "Playback has started, currentTime should advance");
+
+}, "Check video.currentTime behavior");
+</script>
+</body>
index 69b3da0..27de599 100644 (file)
@@ -1,3 +1,20 @@
+2020-02-11  Eric Carlson  <eric.carlson@apple.com>
+
+        video.currentTime is not being updated in iOS 13.4 Beta
+        https://bugs.webkit.org/show_bug.cgi?id=207489
+        <rdar://problem/59322640>
+
+        Reviewed by Youenn Fablet.
+
+        Allow the Web process and the GPU process to communicate with
+        'com.apple.coremedia.audiodeviceclock.xpc' because it is necessary to use a 
+        CMTimeBase, which is used by MediaPlayerPrivateMediaStreamAVFObjC for currentTime.
+
+        Test: fast/mediastream/media-element-current-time.html
+
+        * Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
+        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-02-11  Alex Christensen  <achristensen@webkit.org>
 
         Deprecate _WKUserContentWorld replaced by WKContentWorld
index 43d1d86..1bafa8d 100644 (file)
            (global-name "com.apple.coremedia.admin")
            (global-name "com.apple.coremedia.asset.xpc")
            (global-name "com.apple.coremedia.assetimagegenerator.xpc")
+           (global-name "com.apple.coremedia.audiodeviceclock.xpc") ; Needed for CMTimeBase
            (global-name "com.apple.coremedia.audioprocessingtap.xpc")
            (global-name "com.apple.coremedia.capturesession")      ; Actually for video capture
            (global-name "com.apple.coremedia.capturesource")       ; Also for video capture (<rdar://problem/15794291>).
index a5698c4..5535bfd 100644 (file)
            (global-name "com.apple.coremedia.admin")
            (global-name "com.apple.coremedia.asset.xpc")
            (global-name "com.apple.coremedia.assetimagegenerator.xpc")
+           (global-name "com.apple.coremedia.audiodeviceclock.xpc") ; Needed for CMTimeBase
            (global-name "com.apple.coremedia.audioprocessingtap.xpc")
            (global-name "com.apple.coremedia.capturesession")      ; Actually for video capture
            (global-name "com.apple.coremedia.capturesource")       ; Also for video capture (<rdar://problem/15794291>).