Make WordPress Core

Changeset 50698


Ignore:
Timestamp:
04/10/2021 12:38:04 PM (6 years ago)
Author:
ocean90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/custom-header.js

    r48650 r50698  
    288288
    289289                        video.id = 'wp-custom-header-video';
    290                         video.autoplay = 'autoplay';
    291                         video.loop = 'loop';
    292                         video.muted = 'muted';
     290                        video.autoplay = true;
     291                        video.loop = true;
     292                        video.muted = true;
     293                        video.playsInline = true;
    293294                        video.width = this.settings.width;
    294295                        video.height = this.settings.height;
Note: See TracChangeset for help on using the changeset viewer.