Fallback sources


Alternative sources can be used for the player to switch in case of errors. Such sources are added via or

var player = new Playerjs({
  "id":"player",
  "file":"//site.com/video.m3u8 or //site.com/video.mp4",
});

If the first file does not load, or is not supported by the user platform, the player will switch to the second one.

Balancing sources are added via and, the player will select the URL randomly.

var player = new Playerjs({
  "id":"player",
  "file":"//site1.com/video.mp4 and //site2.com/video.mp4",
});

Operators can be combined (first works or, then and)

//site1.com/video.m3u8 and //site1.com/video.mp4 or //site2.com/video.m3u8 and //site2.com/video.mp4

If you want to specify quality options, operators are specified internally.

var player = new Playerjs({
  "id":"player",
  "file":"[480p]//site.com/video480_1.mp4 or //site.com/video480_2.mp4,[720p]//site.com/video720_1.mp4 or //site.com/video720_2.mp4"
});

19.9.102024 © PlayerJS

Sign up free

Sign up
By signing up, you agree to Terms of Service
Login if you have an account

Restore password

Restore
Forgot email? Contact us