Erik Thuning 3907d10755 FIX: multiple events triggering when using keyboard while focus is on a button
Keyboard events were triggering regardless of which element had focus, which
led to surprising behaviour: if the play button was focused and spacebar
got pressed, two playback toggle actions were triggered - one from the
keyboard listener and one from the default button activation.

This is fixed by ignoring spacebar presses in the custom listener if a
button has focus.

Also minor stylistic change break -> return
2025-02-06 15:10:01 +01:00
2022-08-10 17:13:26 +02:00

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).

Description
No description provided
Readme 824 KiB
Languages
JavaScript 100%