open-index/open-npm huggingface dataset:
npm package: @meisterplayer/plugin-basemedia
Description: Meister plugin for playback of basic media types (mp4, mp3, etc).
Author: Triple
Latest version: 5.2.0

BaseMedia plugin for meister
===========

This plugin allows basic media types to be played. They are directly put in the video element.

Installation
-----

You can install this plugin through npm:

```
npm install meister-plugin-basemedia
```

and importing it

``` JavaScript
import Meister from 'meisterplayer';
import BaseMedia from 'meister-plugin-basemedia'
```

or using a script tag:

``` html
<script src="Meister.js"></script>
<script src="BaseMedia.js"></script>
```


Getting started
-----------

Load the plugin by adding a `BaseMedia` configuration object to the Meister initialisation options. As of yet there are no configuration options for BaseMedia so an empty object is enough.

Example:

``` JavaScript
var meisterPlayer = new Meister('#player', {
    BaseMedia: {}
});

meisterPlayer.setItem({
    src: 'INSERT_URL_TO_MP4_HERE',
    type: 'mp4',
});

meisterPlayer.load();

```

Supported types
---------

Currently the following types are supported:

- *mp4* - For MP4 playback.
- *mp3* - For MP3 playback.
- *icecast* - For Icecast streams.
- *mov* - for MOV-files.
- *m3u8* - **NOTE**: Only for Samsung android devices that do not support the MediaSource API. For a HLS plugin please visit [HLS plugin for Meister](https://github.com/meisterplayer/media-hls)
npm package: @meisterplayer/plugin-debugoverlay
Description: Debug overlay plugin for Meister
Author: Triple
Latest version: 5.2.0

Debug overlay plugin for Meister Player
====

![Debug overlay](http://meisterplayer.triple-it.nl/demo/res/debugoverlay.png)

This plugin allows debugging of a stream inside the video player.

Getting started
----

Simply add ```DebugOverlay``` to the config options and use the keyboard to type this in order (not combination) ```ctrl -> m -> j -> s```. This will activate the DebugOverlay.

``` JavaScript
var meisterPlayer = new Meister('#player', {
    DebugOverlay: {},
});

...
```
npm package: @meisterplayer/plugin-message
Description: Message overlay plugin for Meister
Author: Triple
Latest version: 5.3.0

Message plugin for meister
=========

This plugin displays an error message to the user when the player could not recover from the error. It works using the meisterPlayer.error() method.

Getting started
---------

``` JavaScript
var meisterPlayer = new Meister('#player', {
    Message: {}
});

// Continue meister configuration
meisterPlayer.setItem(...);
```

Config options
---------

### defaultHeadTitle [String] (default: 'Whoops, something went wrong...') ###

The default head title. This will be the default title for each error message.

``` JavaScript
var meisterPlayer = new Meister('#player', {
    Message: {
        defaultHeadTitle: 'Something went wrong',
    }
});

// Continue meister configuration
meisterPlayer.setItem(...);

// Throw an error
meisterPlayer.error('An error message.');

```

### Error options ###

You can give options with the Meister error function. This allow for modifications with error messages (Such as title and headTitle)

You can do that with the following snippet:

``` JavaScript
var meisterPlayer = new Meister('#player', {
    Message: {
        defaultHeadTitle: 'Something went wrong',
    }
});

// Continue meister configuration
meisterPlayer.setItem(...);

// Throw an error
meisterPlayer.error('An error message.', 'ERR-9001', {
    title: 'An error occurred',
    headTitle: 'Woops something went wrong',
});

```
npm package: @meisterplayer/plugin-multisource
Description: Meister plugin for having multiple sources in one item
Author: Triple
Latest version: 5.3.0

MultiSource plugin for Meister
==========

This plugin allows you to set multiple media types as one item. MultiSource automaticly choses the correct media type to play. It will start at the first item in the array and work it's way through the list until it finds an item that it can play.

MultiSource supports the standard item format so you can use any media item plugin with this plugin.

Getting started
----------

Simply configure the plugin and use it in the setItem

Example:

``` JavaScript
var meisterPlayer = new Meister('#player', {
    MultiSource: {},
});

meisterPlayer.setItem({
    sources: [
        // We first want to try playing the Dash stream
        {
            src: 'INSERT_MPD_LINK_HERE',
            type: 'mpd',
        },

        // If that doesn't work on the current browser try HLS
        {
            src: 'INSERT_HLS_LINK_HERE',
            type: 'm3u8',
        },

        // Our last resort is to give the user a mp4 stream
        {
            src: 'INSERT_MP4_LINK_HERE',
            type: 'mp4',
        },
    ],
    type: 'multi-source'
});

meisterPlayer.load();
```

Item options
---------

The following options are available for per item configuration.

### drmConfig *[Object]* (default: undefined) ###

This plugin apply's the drm config on every item in ```sources``` so you don't have to configure each item stand alone. This plugin depend on the [Drm plugin for Meister](https://github.com/meisterplayer/utility-drm) to work. Also see the [README](https://github.com/meisterplayer/utility-drm/blob/develop/README.md) there for config options.

Example:

``` JavaScript
var meisterPlayer = new Meister('#player', {
    MultiSource: {},
});

meisterPlayer.setItem({
    sources: [
        // We first want to try playing the Dash stream
        {
            src: 'INSERT_MPD_LINK_HERE',
            type: 'mpd',
        },

        // If that doesn't work on the current browser try HLS
        {
            src: 'INSERT_HLS_LINK_HERE',
            type: 'm3u8',
        },
    ],
    drmConfig: {
        widevine: { ... }
        playready: { ... }
        fairplay: { ... }
    },
    type: 'multi-source'
});

meisterPlayer.load();
```

### switchItemOnError *[Boolean]* (default: true) ###

Goes to the next item in the 'sources' array when the current item has thrown an error. (NOT_FOUND, CODEC_ERRORS, etc) 
This can be usefull for codecs that cannot be determined if it can play on the current device.
Multisource will switch out the item with a new item so playback can continue.

Example:

``` JavaScript
meisterPlayer.setItem({
    sources: [ ... ],
    type: 'multi-source',
    switchItemOnError: false, // Will stop playback after an fatal error occured.
});
```
npm package: @meisterplayer/plugin-nativehls
Description: Meister plugin for playback of HLS in browsers that support it natively (ex. Safari)
Author: Triple
Latest version: 5.6.4

# Native HLS Plugin #

A wrapper for browsers that supports natively HLS that adds additional control and configuration over default native playback.

### How do I get set up? ###

When initializing the player add `NativeHls` with it's own configuration to the configuration object.

``` JavaScript
var meisterPlayer = new Meister("#player", {
    NativeHls: {
        filterAudioOnly: true,
    },
});

meisterPlayer.setItem({
    src: 'INSERT_HLS_M3U8_HERE',
    type: 'm3u8',
});
```

### Configuration ###

Options are required unless marked as [optional].

* [optional] [**filterAudioOnly**](#filteraudioonly-boolean-default-false)
* [optional] [**dvrEnabled**](#dvrenabled-boolean-default-true)
* [optional] [**dvrThreshold**](#dvrthreshold-number-default-300)
* [optional] [**safariDesktopDisabled**](#safaridesktopdisabled-boolean-default-false)

Config options
-------

#### filterAudioOnly *[Boolean]* (default: false) ####

When set to true the player will filter out stream that only contain audio. This means they will not be visible in the ui to select.

Example:

``` JavaScript
var meisterPlayer = new Meister('#player', {
    NativeHls: {
        filterAudioOnly: true,
    }
});
```

#### dvrEnabled *[Boolean]* (default: true) ####

Setting this flag to true will treat a HLS stream with DVR window as a livestream.

Example:

``` JavaScript
var meisterPlayer = new Meister('#player', {
    NativeHls: {
        dvrEnabled: false,
    }
});
```

#### dvrThreshold *[Number]* (default: 300) ####

This value in seconds is used to determine whether a HLS stream is considered to have a DVR window or not. By default streams that have a window of less than 5 minutes are considered 'just' live.

Example:

``` JavaScript
var meisterPlayer = new Meister('#player', {
    NativeHls: {
        dvrThreshold: 50,
    }
});
```

#### safariDesktopDisabled *[Boolean]* (default: false) ####

This flag can be used to disable the plugin in Safari on macOS. This can be useful when you do want to use it for mobile playback, but have a more feature rich HLS plugin for macOS.

Example:

``` JavaScript
var meisterPlayer = new Meister('#player', {
    NativeHls: {
        safariDesktopDisabled: true,
    }
});
```

### startFromBeginning *[Boolean]* (default: false) ###

Start from the beginning of the live stream. (VOD streams will always begin from the beginning).

``` JavaScript
meisterPlayer.setItem({
    src: 'https://example.com/secure/stream/manifest.m3u8',
    startFromBeginning: true,
    type: 'm3u8'
});
```

Or you can give an object with an offset to start from a offset

``` JavaScript
meisterPlayer.setItem({
    src: 'https://example.com/secure/stream/manifest.m3u8',
    startFromBeginning: {
        offset: 10, // Start from the "beginning" with an offset of 10 seconds
    },
    type: 'm3u8'
});
```
npm package: @meisterplayer/plugin-smooth
Description: Smooth plugin for Meister
Author: Triple
Latest version: 5.3.1

Smooth plugin for Meister player
====

Allows playback of Smooth streams using the [HasPlayer](https://github.com/Orange-OpenSource/hasplayer.js) library.

Getting started
----

To start using smooth simply add the ```Smooth``` object in your Meister configuration and configure the item to have the type ```mss```.

``` JavaScript
var meisterPlayer = new Meister('#player', {
    Smooth: {}
});

meisterPlayer.setItem({
    src: 'INSERT_SMOOTH_STREAM_URL_HERE',
    type: 'mss',
});
```
npm package: @meisterplayer/plugin-watermark
Description: Watermark plugin for Meister
Author: Triple
Latest version: 5.1.3

Watermark plugin for Meister
=======

This plugin adds a watermark to the video in order to brand the video more.

Config options
-------

#### iconUrl *[String]* (required) ####

This is the url to the watermark that will be placed on the video.

``` JavaScript
var meisterPlayer = new Meister('#player', {
    Watermark: {
        iconUrl: 'URL_TO_WATERMARK',
    }
});
```

#### position *[String]* (default: 'top-left') ####

The position of the watermark. Can be anything of the following types:

- top-left
- top-right
- bottom-left
- bottom-right

``` JavaScript
var meisterPlayer = new Meister('#player', {
    Watermark: {
        iconUrl: 'URL_TO_WATERMARK',
        position: 'bottom-right',
    }
});
```


#### autoHide *[Boolean]* ####

Set autoHiding on/off. When autoHiding is used the watermark will slowly fade out (8 seconds)

``` JavaScript
var meisterPlayer = new Meister('#player', {
    Watermark: {
        iconUrl: 'URL_TO_WATERMARK',
        autoHide : true,
    }
});
```

#### style *[Object]* ####

This allows you to style the wrapper via javascript. 
The style propertie maps to HTMLElement.prototype.style so any style property can be used.


``` JavaScript
var meisterPlayer = new Meister('#player', {
    Watermark: {
        iconUrl: 'URL_TO_WATERMARK',
        style: {
            margin: '2%',
        }
    }
});
```
npm package: @meisterplayer/plugin-webvtt
Description: Meister plugin for subtitles with webvtt
Author: Triple
Latest version: 5.1.3

WebVTT Plugin for Meister
====

This plugin allows WebVTT subtitles in the Meister player. It uses the HTML5 ```<track>``` element to play the subtitles.

Getting started
----

Simply add ```WebVtt``` to the Meister config and set an item to use subtitles:

``` JavaScript
var meisterPlayer = new Meister('#player', {
    WebVtt: {}
});

meisterPlayer.setItem({
    captions: [
        {
            lang: 'nl', // Language short
            src: 'URL_TO_WEBVTT_HERE',
            title: 'Dutch', // Title shown in captions selector
            type: 'webvtt',
        }
    ],
    src: 'MP4_URL_HERE',
    type: 'mp4'
});

```
npm package: @meisterplayer/plugin-youtube
Description: Meister plugin for playing Youtube videos
Author: Triple
Latest version: 5.2.3

Youtube plugin for Meister
=========

This plugins allows youtube videos to be embedded in the meister player. 

Getting started
-----

To get started simply add the ```Youtube: {}``` and ```YoutubePlayer: {}``` to the meister configuration object:

``` JavaScript
var meisterPlayer = new Meister('#player', {
    Youtube: {},
    YoutubePlayer: {},
});

meisterPlayer.setItem({
    src: '_FVgD5KJPyE', //Only youtube ID's are supported
    type: 'youtube'
});
```