Support » Requests and Feedback » ‘Mute’ attribute for native video player?

  • Resolved beandrew

    (@beandrew)



    According to the Codex entry on [video] there are attributes for autoplay, loop, poster, etc. but not for muting the video.

    I’ve used autoplaying videos in a couple sites recently and found that Chrome blocks the video from playing unless it’s muted. “Mute” is a core attribute of the HTML <video> element so it seems strange that the WordPress shortcode is missing this, unless I’m missing something…

    One workaround I’ve found is to hardcode decorative videos into the theme files and use the native HTML video element set to “muted” — but that’s not ideal.

    I think some plugins may be able to produce <video> elements that are muted, but I feel like this should be added to the core WordPress functionality.

    • This topic was modified 2 months, 1 week ago by  beandrew.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Support Volunteer

    That makes sense. I added it as a ticket. You may want to watch it to see what happens.

    https://core.trac.wordpress.org/ticket/44572#ticket

    beandrew

    (@beandrew)

    Thanks! For anyone else struggling with autoplaying videos, I just started using the Code Embed plugin to manually enter <video> elements into post content. If you just enter the HTML into the editor it converts the meta attributes like muted to the WP syntax of muted="", which doesn’t do anything.

    This lets you add whatever HTML meta properties you need. In addition to muted I’ve found that Safari in iOS stops autoplaying videos without the playsinline attribute (more info), so that might also be a good attribute to add to the WP shortcode.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.