mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Customize: Set playsinline attribute for custom header videos.
With the `playsinline` attribute the video can also autoplay on mobile browsers without asking the user to open it up fullscreen. Also, change all video element properties to use boolean values. Props klevyke, ocean90. Fixes #50111. git-svn-id: https://develop.svn.wordpress.org/trunk@50698 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -287,9 +287,10 @@
|
||||
video = document.createElement( 'video' );
|
||||
|
||||
video.id = 'wp-custom-header-video';
|
||||
video.autoplay = 'autoplay';
|
||||
video.loop = 'loop';
|
||||
video.muted = 'muted';
|
||||
video.autoplay = true;
|
||||
video.loop = true;
|
||||
video.muted = true;
|
||||
video.playsInline = true;
|
||||
video.width = this.settings.width;
|
||||
video.height = this.settings.height;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user