Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't WordPress video play also without autoplay?

On my webpage there is only a video. It is playing well on Edge but not on Mobile Device and Chrome.

  • the video is .mp4
  • autoplay is disabled
  • I am using OceanWP theme but I tried also Astra theme without any success
  • I am using Elementor to edit the page

There are many questions on this topic but none of them has a solution that fixes my problem.

enter image description here

EDIT

enter image description here

like image 819
Stefano Avatar asked Jan 11 '20 17:01

Stefano


People also ask

Why is my video not playing on WordPress?

You must go to the 'dashboard', – go to 'settings', – go to 'media' (in the settings group), on the media settings page, look for these words: “Only display videos in free software formats“. UN-check the box next to this phrase. Make sure this box is NOT checked. Refresh everything.

What format do videos need to be in for WordPress?

The WordPress video feature allows you to embed video files and play them back using a simple shortcode [video]. Supported file types are mp4, m4v, webm, ogv, wmv and flv.

Can a video autoplay on WordPress?

How to Autoplay a Video in the WordPress Block Editor. Once the video is embedded in the WordPress block editor, you can simply select the block and enable Autoplay under Video settings.


1 Answers

From the official Apple WebKit documentation (iOS):

Starting in iOS 10, WebKit relaxes its inline and autoplay policies to make these presentations possible, but still keeps in mind sites’ bandwidth and users’ batteries.

By default, WebKit will have the following policies:

  • video elements will be allowed to autoplay without a user gesture if their source media contains no audio tracks.
  • video muted elements will also be allowed to autoplay without a user gesture. If a element gains an audio track or becomes un-muted without a user gesture, playback will pause.

https://webkit.org/blog/6784/new-video-policies-for-ios/

As for Mobile Chrome (Android):

Muted autoplay for video is supported by Chrome for Android as of version 53. Playback will start automatically for a video element once it comes into view if both autoplay and muted are set, and playback of muted videos can be initiated progamatically with play(). Previously, playback on mobile had to be initiated by a user gesture, regardless of the muted state.

https://developers.google.com/web/updates/2016/07/autoplay

Example:

 <video id="myVideo"muted defaultMuted autoplay playsinline controls>
     <source src="myVideo.mp4" type="video/mp4">
 </video>
like image 184
morsecodemedia Avatar answered Nov 15 '22 09:11

morsecodemedia