Autoplay video on all browsers?

Melody Scott
Melody Scott used Ask the Experts™
on
Hi, please see http://dev.magickitchen.com/. User name: mel PW: mel   We added a video within the slide container. People can mute it, or advance to the next slide. If the browser doesn't allow autoplay, then after a couple of seconds a play button appears.

The site owners are very frustrated that it doesn't always autoplay, and my response has been that certain browsers simply don't allow it.

I want to check in here to make sure that I am not mistaken. It does autoplay on Microsoft Edge, but not on Chrome. I just realized that INternet explorer doesn't show the buttons at ALL.  Darn, should have checked that, will look into that.

This question is just about autoplay though. If you can help me autoplay on all browsers, the owners will be happier. Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fractional CTO
Distinguished Expert 2018
Commented:
Correct. There is no way to autoplay unmuted videos in current browsers. Old browsers work + autoplay stops as soon as browser updates occur.

1) All browsers currently allow autoplay, if video is muted.

2) There's current chatter in all browser dev chats about getting rid of autoplay altogether, so likely at some point in time all autoplay, even with muted videos, will be disabled.

Tip: Expect autoplay to be gone in the future + plan accordingly.
David S.Consultant & Challenge Subduer
Top Expert 2009

Commented:
Many users find auto-playing videos annoying (especially those with metered bandwidth or low data-caps), so browsers, especially mobile ones, have added more restrictions for the use of that feature.

I recommend you read these, which give details about the changes to browsers and much of the reasoning:
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
https://webkit.org/blog/6784/new-video-policies-for-ios/
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
Mobile browsers NEVER autoplay.  Youtube has also stopped autoplaying videos on their site.  You always have to click to start them now.
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
You need to look at what Autoplay is and why you don't want it enabled by default.

Autoplay is basically taking control away from the user - and as with many other ideas that seemed cool to begin with but were then over exploited - often for nefarious purposes, they became annoyances and / or security risks.

For this reason many conventions that had legitimate conventional uses have been redacted to protect users from unscrupulous operators.

Mobile brought in a new wave of concerns - as Dave has alluded to - autoplay on mobile means your (expensive) data starts disapearing on something you did not start and have no interest in.

So long story short - autoplay has valid uses but has been too often abused and so now it is being removed. Bottom line, don't rely on it.
Dr. KlahnPrincipal Software Engineer

Commented:
There's no video format that is both universal and guaranteed to automatically play -- and if there were, there would quickly be a user-written plugin to block it.  The site owners have sent you in search of hens' teeth.

Flash is nearly universal, but (a) it is so annoying that all browsers have plugins to block it and (b) Adobe breaks it regularly with security updates, causing older versions to not play.

HTML 5 video is supposed to be universal, but older browsers won't play it.

Any other format is a "maybe, on some systems."
Hi,

Make sure to have a poster this way if there is a compatibility issue the user will see at least an image
Use several format for browser / device compatibility

You will find all info on :
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Video

<!-- Using multiple sources as fallbacks for a video tag -->
<!-- 'Elephants Dream' by Orange Open Movie Project Studio, licensed under CC-3.0, hosted by archive.org -->
<!-- Poster hosted by Wikimedia -->
<video width="620" controls

  poster="https://upload.wikimedia.org/wikipedia/commons/e/e8/Elephants_Dream_s5_both.jpg" >

  <source
    src="https://archive.org/download/ElephantsDream/ed_1024_512kb.mp4"
    type="video/mp4">
  <source
    src="https://archive.org/download/ElephantsDream/ed_hd.ogv"
    type="video/ogg">
  <source
    src="https://archive.org/download/ElephantsDream/ed_hd.avi"
    type="video/avi">
  Your browser doesn't support HTML5 video tag.
</video>

Open in new window

David FavorFractional CTO
Distinguished Expert 2018

Commented:
@Melody, as you can judge from comments Autoplay is generally a thing of the past, so best to design sites around other elements.

Tip: You can always convert a video (no audio) to an animated PNG (.apng) file to recapture some of this functionality.

Problem is, these files can be massive compared to an equivalent video, so before someone talks you into switching from video to animated images, be sure to check the size of the animated image required.

Normally best to avoid all motion on Websites today.

Author

Commented:
Thanks to everyone, and believe me, you're preaching to the choir, I hated autoplay videos. But I thought I owed it to the owners to check it out. I'll accept the first response as the answer and mark everyone else helpful.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial