Skip to content

Video format plugins

Adds paella-core support for other video formats, and provides utilities related to these formats.

Step 1: Import the plugin context and add it to the Paella Player initialization parameters:

Usin plugin context API:

...
import {
webglPlugins, // All plugins
} from 'paella-webgl-plugins';
let paella = new Paella('player-container', {
plugins: [
...webglPlugins
]
});
...

You can also use the generic plugin array name to import all the plugins:

import { allPlugins as webglPlugins } from 'paella-webgl-plugins'
...

All the plugin libraries exports the allPlugins array. This is done in order to have a method to import all plugins using always the same name for all libraries.

Step 2: Configure the plugins you want to use in the paella player configuration.

{
"plugins": {
...
"es.upv.paella.hlsVideoFormat": {
"enabled": true,
"order": 0,
...
},
... other plugin settings
}
}

Allows you to select the subtitle track of an HLS stream. This plugin is not integrated with the paella-core subtitle system, but uses the APIs of the hls.js library that allow to display the subtitles of a m3u8 playlist printed over the video containing the subtitles. For that reason, the subtitles will only be seen on the HLS video. Also, the plugin implementation is restricted only to the video containing the audio track.

{
"es.upv.paella.hlsCaptionsSelectorPlugin": {
"enabled": true,
"side": "right",
"parentContainer": "playbackBar",
"menuTitle": "Available Captions",
"allowMultipleSelection": false
},
...
}

The allowMultipleSelection parameter allows you to select multiple subtitle tracks at once, provided that the HLS stream supports this functionality. If enabled, selecting subtitle tracks will not disable previously selected tracks. By default, this parameter is set to false.

Please note that for this option to work, the subtitle tracks in the M3U8 must have the GROUP-ID defined with different values.

Exported as HlsCaptionsSelectorButtonPlugin.

Icon customization data:

  • Plugin identifier: es.upv.paella.hlsCaptionsSelectorPlugin
  • Icon names:
    • captionsIcon