Autostarting on Page Load

This article explains how to automatically start playback of your media on page load. Here is an example:


Since autostarting with audio can be a jarring experience for viewers, we've also configured the above player to mute the media by default.

Note that autostarting does not work on mobile phones(Android, iOS). This is a system configuration that JW Player does not have control over.

Embed code

As always, ensure you have uploaded a copy of JW Player and included the script in the <head> of your page, together with your player key. See an embedding guide like Basic Video Embed for more info. Next, place the following embed code at the location you want the player to appear:

<div id="myElement"></div>

var playerInstance = jwplayer("myElement");
      file: "/uploads/myVideo.mp4",
      width: 640,
      height: 270,
      autostart: true,
      mute: true //optional, but recommended

Did you find this article helpful?

Please log in to rate this article.