Player techs

Selecting a playback technology

When creating a new player, it's important to be aware of the fact that some systems do not support the latest technology.
The techOrder option of the player solves this problem. It can take an ordered array of technologies and test each for playback until a compatible player is found. You can supply only one entry in the array but this will force the playback technology and, consequently, that technology may not work on the respective system. Therefore, it is highly recommended to create an array with several technologies.
Available options are:

  • EmpShaka (Shaka Player)
  • EmpHLS-MSE (hls.js Player)
  • EmpHLS (Native hls player, Safari and MS Edge)
  • Html5 (Videojs default player for mp4)

When not set, the default techOrder, for all browsers, except Safari is:

  1. EmpShaka
  2. EmpHLS-MSE
  3. EmpHLS
  4. Html5

The the default techOrder for Safari is:

  1. EmpHLS
  2. EmpShaka
  3. Html5

Fallback

If an error occurs or if the media is not available, the player can automatically fallbak to other tech.
The player will not fallback with ecrypted streams, It's no point to fallback because EMP only support Fairplay DRM for HLS and that can only be played in Safari and Safari can't play Widevine DRM ecrypted DASH streams.

The player support fallback

  • Chome -> EmpShaka, fallback to EmpHLS-MSE, if stream is unecrypted.
  • Chromecast -> EmpShaka, No fallback
  • Firefox -> EmpShaka, fallback to EmpHLS-MSE, if stream is unecrypted.
  • IE11 -> EmpShaka, fallback to EmpHLS-MSE, if stream is unecrypted.
  • Edge -> EmpShaka, fallback to EmpHLS-MSE, EmpHLS, if stream is unecrypted.
  • Safari -> EmpHLS, fallback to EmpShaka, if stream is unecrypted.

Example:

options['techOrder'] = ['EmpShaka', 'EmpHLS'];
new empPlayer('player', options);

emp-shaka.js, emp-hls.js, emp-hls-mse.js,and emp-cast-sender.js are bundled in emp-player-all.js

<script src="js/emp-player-all.min.js"></script>

If you only use the player module emp-player.js, you have to add the tech modules you need:

<script src="video-js/video.js"></script>
<script src="js/emp-player.js"></script>
<!-- Techs -->
<script src="emp/js/emp-shaka.js"></script>
<script src="emp/js/emp-hls.js"></script>
<script src="emp/js/emp-cast-sender.js"></script>

EmpCast tech is a special tech that the player will use if Chromecast is available. It should not be used in techOrder.