WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
190831
JavaScript does not throw error when video tag has attributes `autoplay`, `muted`, and `controls` on all iOS 12 iPhone/iPad devices except iPhone X
https://bugs.webkit.org/show_bug.cgi?id=190831
Summary
JavaScript does not throw error when video tag has attributes `autoplay`, `mu...
zack.honig
Reported
2018-10-23 09:16:37 PDT
Autoplay does not require attributes `autoplay`, `muted`, and `controls` in video tag on all iOS 12 iPhone/iPad devices except iPhone X *On iPhone X iOS 12.0.1 in Safari* - Expected results: When the user loads page, the video should autoplay with no sound - Actual results: When the user loads page, the video does not autoplay. To play the video, the user has to click the play button The provided example below illustrates the issue: <video autoplay muted playsinline src="
https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
"></video> Example below does not work on iPhone X iOS 12.0.1. It works on all other iPhones and iPads with iOS 12.0.1:
https://www.w3schools.com/code/tryit.asp?filename=FWIM1IVFJ40D
Example below works on all iPhones and iPads with iOS 12.0.1:
https://www.w3schools.com/code/tryit.asp?filename=FWIM1WBOG7K7
Attachments
Add attachment
proposed patch, testcase, etc.
zack.honig
Comment 1
2018-10-23 10:31:01 PDT
Updated example below illustrates the issue: <video autoplay controls playsinline src="
https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
"></video> Example below does not work on iPhone X iOS 12.0.1. It works on all other iPhones and iPads with iOS 12.0.1:
https://www.w3schools.com/code/tryit.asp?filename=FWIO84TGHS8Y
zack.honig
Comment 2
2018-10-23 14:35:58 PDT
Example below illustrates that JavaScript will throw an error in the catch clause unless the video tag has attributes `autoplay`, `muted`, and `controls`:
https://www.w3schools.com/code/tryit.asp?filename=FWIV6SAKAGJ1
Radar WebKit Bug Importer
Comment 3
2018-10-23 22:44:01 PDT
<
rdar://problem/45510906
>
Jer Noble
Comment 4
2018-10-24 02:15:15 PDT
"autoplay" and "controls" are not relevant. We don't check that property in the play() promise. "playsinline" and "muted" are required. I can't reproduce this behavior on my own iPhone Xs; Zack, does the movie play properly when you press the play button in the native controls? That would help eliminate the possibility that your test case is hitting a networking error.
zack.honig
Comment 5
2018-10-24 09:51:03 PDT
@jer, if you click the "Run >>" button on
https://www.w3schools.com/code/tryit.asp?filename=FWIV6SAKAGJ1
on Safari browser, then the alert message "inner autoplay failed" pops up. Note that the video still plays via JavaScript even though the catch exception was thrown in this case. However, there could be another case where autoplay is aborted if the catch exception is thrown. The link is using required attributes "playsinline" and "muted" attributes.
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