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:
Dominik Schilling
2021-04-10 12:38:04 +00:00
parent 87fc38e588
commit 808e2f886f

View File

@@ -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;