WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
175748
Autoplay Muted Videos Don't Play When Outside Viewport
https://bugs.webkit.org/show_bug.cgi?id=175748
Summary
Autoplay Muted Videos Don't Play When Outside Viewport
Neil Daniels
Reported
2017-08-18 17:45:38 PDT
Created
attachment 318565
[details]
Webarchive of mentioned test case. I have various <video autoplay loop muted playsinline> on a single page, on iOS 11 (15A5354b, iPhone and iPad) only the videos that are within the viewport automatically play. A test case exists at this page:
https://www.fomopop.com/html5-video-test/
(a webarchive is attached as well, for posterity). If you view on an iPhone running iOS 10.x, all 5 of the videos will play. On an iPhone running iOS 11 (15A5354b), only the first 2 videos will play. This might be related to
https://bugs.webkit.org/show_bug.cgi?id=170610
, but I'm not sure if that's in a public iOS build yet.
Attachments
Webarchive of mentioned test case.
(354.91 KB, application/x-webarchive)
2017-08-18 17:45 PDT
,
Neil Daniels
no flags
Details
Patch
(6.13 KB, patch)
2017-08-21 12:09 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-elcapitan
(1.20 MB, application/zip)
2017-08-21 13:05 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
(1.38 MB, application/zip)
2017-08-21 13:33 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews113 for mac-elcapitan
(2.15 MB, application/zip)
2017-08-21 13:40 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews125 for ios-simulator-wk2
(10.63 MB, application/zip)
2017-08-21 13:56 PDT
,
Build Bot
no flags
Details
Patch
(8.88 KB, patch)
2017-08-21 16:57 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2017-08-18 17:49:25 PDT
It's actually more likely related to <
https://bugs.webkit.org/show_bug.cgi?id=168268
>, as it seems to only happen with <video><source /></video> elements, and not <video src=""></video> elements.
Jer Noble
Comment 2
2017-08-18 17:50:35 PDT
It looks like we're not calling prepareForLoad() in the <source /> selection case; prepareForLoad() is what sets the state PlatformSessionManager state to Autoplaying, thus breaking restoring that state to Autoplaying when becoming visible again.
Jer Noble
Comment 3
2017-08-18 18:02:29 PDT
Aha, we set the PlatformMediaSession's state to Autoplaying inside prepareForLoad(), which also sets the m_autoplaying flag to true (as specified in the "media element load algorithm" section of the HTML spec. But the autoplaying flag is initially true (as specified in just before same), so we should probably notify the client that we're autoplaying on HTMLMediaElement creation.
Radar WebKit Bug Importer
Comment 4
2017-08-18 18:16:41 PDT
<
rdar://problem/33974383
>
Jer Noble
Comment 5
2017-08-21 12:09:03 PDT
Created
attachment 318657
[details]
Patch
Build Bot
Comment 6
2017-08-21 13:05:00 PDT
Comment hidden (obsolete)
Comment on
attachment 318657
[details]
Patch
Attachment 318657
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/4355274
New failing tests: media/video-restricted-invisible-autoplay-not-allowed.html media/video-restricted-invisible-autoplay-allowed-if-audible.html
Build Bot
Comment 7
2017-08-21 13:05:01 PDT
Comment hidden (obsolete)
Created
attachment 318664
[details]
Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 8
2017-08-21 13:33:31 PDT
Comment hidden (obsolete)
Comment on
attachment 318657
[details]
Patch
Attachment 318657
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/4355342
New failing tests: media/video-restricted-invisible-autoplay-not-allowed.html media/video-restricted-invisible-autoplay-allowed-if-audible.html
Build Bot
Comment 9
2017-08-21 13:33:32 PDT
Comment hidden (obsolete)
Created
attachment 318666
[details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 10
2017-08-21 13:40:43 PDT
Comment hidden (obsolete)
Comment on
attachment 318657
[details]
Patch
Attachment 318657
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/4355333
New failing tests: media/video-concurrent-visible-playback.html media/video-restricted-invisible-autoplay-not-allowed.html media/video-restricted-invisible-autoplay-allowed-if-audible.html
Build Bot
Comment 11
2017-08-21 13:40:44 PDT
Comment hidden (obsolete)
Created
attachment 318668
[details]
Archive of layout-test-results from ews113 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 12
2017-08-21 13:56:30 PDT
Comment hidden (obsolete)
Comment on
attachment 318657
[details]
Patch
Attachment 318657
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/4355381
New failing tests: media/video-restricted-invisible-autoplay-not-allowed.html media/video-restricted-invisible-autoplay-allowed-if-audible.html
Build Bot
Comment 13
2017-08-21 13:56:33 PDT
Comment hidden (obsolete)
Created
attachment 318669
[details]
Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Jer Noble
Comment 14
2017-08-21 16:57:51 PDT
Created
attachment 318699
[details]
Patch
WebKit Commit Bot
Comment 15
2017-08-22 09:13:26 PDT
Comment on
attachment 318699
[details]
Patch Clearing flags on attachment: 318699 Committed
r221016
: <
http://trac.webkit.org/changeset/221016
>
WebKit Commit Bot
Comment 16
2017-08-22 09:13:27 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug