Use autoplay with Wowza Player

Autoplay allows you to enable live streams or VOD assets in Wowza™ Player to play automatically without user interaction. In this article, learn about browser autoplay policies and how to use the Wowza Player autoplay feature.

Notes:
  • Autoplay is available in Wowza Player version 1.1.14 and later. The feature was temporarily disabled in October 2017 with the release of version 1.1.06 due to changing browser autoplay policies.
  • Wowza Player autoplay functionality does not currently work with Flash playback.

About autoplay in Wowza Player


When autoplay is enabled, Wowza Player checks to see whether a browser permits autoplay functionality. If autoplay is allowed, the content will play automatically. If autoplay isn't allowed, Wowza Player falls back to manual playback controls, allowing a user to start playback by clicking or tapping the play button. The feature has built-in flexibility and responds to a range of browser behavior based on different policies and user setting selections. Autoplay policies differ across browsers, and users of certain browsers can choose to block or enable autoplay for individual websites or all websites.

Certain browsers allow muted autoplay—meaning muted videos will play automatically, but videos with sound won't. For browsers that allow muted autoplay according to current policy or user selection, a video with audio enabled will fall back to manual playback controls in Wowza Player. If you want a video to play automatically as expected on most browsers, we recommend that you mute the video.

Browser autoplay policies


Browser policies for autoplay functionality tend to shift over time, so this article provides a high-level description of autoplay policy and links to browser-specific resources. Autoplay functionality in Wowza Player is not limited to the list below, however autoplay on older browsers or browsers not listed here is not ensured.

Check out this table for a quick overview of autoplay policies per browser and platform. The ✕ symbol means that a platform does not support a browser.

Windows Mac Android iOS
Chrome (v66 and later) Muted autoplay Muted autoplay Muted autoplay Muted autoplay
Safari (v11 and later) Muted autoplay Muted autoplay
Firefox Autoplay with audio* Autoplay with audio* Autoplay with audio* Autoplay with audio*
Microsoft Edge Autoplay with audio No autoplay No autoplay
Internet Explorer
(v11.95 and later on Windows 10)
Autoplay with audio

* As of the general release of Firefox version 66 targeted for March 2019, Firefox will no longer allow autoplay with audio by default. See Firefox for more details.

Chrome

As of version 66 released in April 2018, Google Chrome autoplay policy states that:

  • Muted autoplay is always allowed.
  • Autoplay with sound is allowed under certain circumstances.
    • If a user has interacted with the domain through a user gesture like a click or tap
    • If a user has played video with sound on a website repeatedly — measured through a user's Media Engagement Index (MEI) value
    • If a user has added a site to their home screen on mobile

See the Autoplay Policy Changes initial announcement and the Web Audio, Autoplay Policy and Games update for planned tweaks to the MEI algorithm in Chrome version 71 and later.

Safari

As of version 11 released in September 2017, Safari autoplay policy states that:

  • Muted autoplay is allowed as long as users haven't blocked all autoplay in their settings.
  • Autoplay with sound is only allowed if users configure it in their settings.

See Auto-Play Policy Changes for macOS or for more information.

Safari users can set their preferences for autoplay for individual sites or all websites. See Stop autoplay videos in Safari on Mac.

Firefox

Firefox currently allows autoplay with sound in versions 65 and earlier, however autoplay updates in the version 66 general release planned for March 2019 will change that policy. At the version 66 release, the autoplay policy will be:

  • Muted autoplay is allowed.
  • Autoplay with sound is only allowed if users configure it in their preferences or notifications.

Firefox users will be able to set global or per-site autoplay preferences. See Allow or block media autoplay in Firefox for more information.

Microsoft Edge

Microsoft Edge allows autoplay with sound by default. However, Edge users can set global and per-site preferences for autoplay controls as of the October 2018 Windows 10 update with Edge version 44. Edge also now suppresses autoplay of media in background tabs automatically. See Autoplay Policies for more information.

Internet Explorer

Internet Explorer version 11.95 and later allows autoplay with sound by default on Windows 10, as it uses HTML5 video playback. Internet Explorer version 11 on Windows 7 falls back to Flash for playback and doesn't allow autoplay.

Enable autoplay with Wowza Player


The autoplay feature is available for HLS playback and ultra low latency playback. To generate an embed code, use Wowza Player Builder or Wowza Player Builder for Ultra Low Latency. Alternatively, configure your code manually.

Configure Wowza Player Builder

  1. In Wowza Player Builder or Wowza Player Builder for Ultra Low Latency, navigate to the Player Options tab.
  2. Click Autoplay.
  3. (Optional) Click Start muted.

For general instructions on generating an embed code, see Create a custom Wowza Player with Wowza Player Builder or Configure Wowza Player for ultra low latency streams.

Configure manual code

  1. Add the following to the ConfigJSON parameter of the WowzaPlayer.create method.
    "autoPlay": true
  2. (Optional) Add an additional parameter to mute the video.
    "mute": true

See Wowza Player configuration properties for more information.

Example embed code

An embed code with autoplay enabled should look something like this:

<html>
<head>
	<title>My Wowza Player Video with Autoplay</title>
	<script type="text/javascript" src="//player.wowza.com/player/latest/wowzaplayer.min.js"></script>
</head>

<body>

	<div id="playerElement" style="width:100%; height:0; padding:0 0 56.25% 0"></div>

	<script type="text/javascript">
	WowzaPlayer.create('playerElement',
		{
		"license":"[wowza-player-license-key]",
		"title":"My Wowza Player Autoplay Test",
		"description":"This is my Wowza Player Video description.",
		"sourceURL":"http://[wowza-ip-address]:1935/vod/sample.mp4/playlist.m3u8",
		"autoPlay":true,
		"mute":true,
		"loop":false,
		"audioOnly":false,
		"uiShowQuickRewind":true,
		"uiQuickRewindSeconds":"30"
		}
	);
	</script>
<body>
</html>