StandardCanPlayThrough.html does not work on iOS.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Mar 2017 20:27:21 +0000 (20:27 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Mar 2017 20:27:21 +0000 (20:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169207

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-03-06
Reviewed by Jer Noble.

On iOS only, add muted=true and autoplay=allowed. The loading policy on iOS requires these attributes to load enough
data to trigger canPlayThrough.

* Media/StandardCanPlayThrough.html:

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

PerformanceTests/ChangeLog
PerformanceTests/Media/StandardCanPlayThrough.html

index 7de9a53..1005d84 100644 (file)
@@ -1,3 +1,15 @@
+2017-03-06  Jeremy Jones  <jeremyj@apple.com>
+
+        StandardCanPlayThrough.html does not work on iOS.
+        https://bugs.webkit.org/show_bug.cgi?id=169207
+
+        Reviewed by Jer Noble.
+
+        On iOS only, add muted=true and autoplay=allowed. The loading policy on iOS requires these attributes to load enough
+        data to trigger canPlayThrough.
+
+        * Media/StandardCanPlayThrough.html:
+
 2017-02-13  Zalan Bujtas <zalan@apple.com>
 
         Simple line layout: Add performance test with text-rendering: optimizeSpeed
index 14618f5..5d8ce58 100644 (file)
@@ -39,7 +39,12 @@ function loadMediaData(url) {
 }
 
 function runTest() {   
-    video =  document.createElement('video');
+    video = document.createElement('video');
+
+    if (navigator.userAgent.match(/iPod|iPhone|iPad/) && !window.MSStream) {
+        video.setAttribute('muted', 'true');
+        video.setAttribute('autoplay', 'allowed');
+    }
 
     var startTime = PerfTestRunner.now();
     video.src = url;