multiplayer.js - A custom HTML element for multi-stream video playback
This is a video player that plays multiple video streams at once, keeping them in sync based on elapsed playback time. The player is tested with up to 4 simultaneous streams, but should in principle support an arbitrary number.
Usage
To use the player, load multiplayer.js on the relevant page and use the
<multi-player> tag to create a player. The player requires one of the
following attributes to be set in order to function:
play: Absolute or relative URL to a file containing a package definition.play-local: A string containing a package definition.
To activate playlist functionality, set one of the following attributes:
list: Absolute or relative URL to a file containing a playlist definition.list-local: A string containing a playlist definition.
An arbitrary number of players can be placed on the same page.
Internationalization
The player defaults to English as its UI language. If the containing HTML
document has a lang attribute, it is used to set the UI language in the
player. Currently only supports English (en) and Swedish (sv).
URL parameters
The player will act on two URL parameters if they are present at page load:
t: A timestamp in seconds to start playback ats: Subtitle activation
The s key can be used in two ways. It can simply be some truthy
value, in which case the first available subtitle track is activated.
The value can also be the name of a subtitle track, in which case that
track will be activated. When specifying a track name, all spaces must
be replaced with underscores.