Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    @meisterplayer/plugin-hlspublic

    HLS.js plugin for Meister

    This plugin allows HLS playback in browsers that do not natively support it. This plugin uses hls.js internally for playback of the streams.
    NOTE The browser needs to implement the MediaSource API for this to work (which most modern browsers do).

    Config options

    autoRecoverMode [Boolean] (default: false)

    By setting the autoRecoverMode you can let the HLS plugin try to automatically recover from Media errors. For example if the player cannot decode the video that is currently playing.

    Example:

    var meisterPlayer = new Meister('#player', {
        Hls: {
            autoRecoverMode: true,
        }
    });
     
    meisterPlayer.setItem({
        src: 'INSERT_HLS_M3U8_URL_HERE'
        type: 'm3u8',
    });

    disabled [Boolean] (default: false)

    This disables the HLS.js plugin for the meister instance. This can be used if you use this in combination with a other plugin that can also play HLS (such as Safari or Edge natively).

    Example:

    var meisterPlayer = new Meister('#player', {
        Hls: {
            disabled: true,
        }
    });

    fineTuning [Object]

    Here you can set all the finetuning options that can be found here: https://github.com/video-dev/hls.js/blob/master/doc/API.md#fine-tuning. Options set here will be used as the default for all items. These can be overridden for specific items by passing updated configuration with the item.

    Example:

    var meisterPlayer = new Meister('#player', {
        Hls: {
            fineTuning: {
                debug: true,
                nudgeMaxRetry: 5,
            },
        }
    });

    dvrEnabled [Boolean] (default: true)

    This enables/disables DVR capabilities in HLS if it is supported by the stream.

    Example:

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

    dvrThreshold [Number] (default: 300)

    This value determines if a live stream is a DVR stream yes or no. If the live stream has added up more seconds then the dvrThreshold it is considered a DVR stream else not.

    Example:

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

    disableVisibilitySwitch [Boolean] (default: false)

    Disables the quality switching when the player is not in an active tab or is minimized. (Default behavior is when the user either selects a different tab or minimizes the tab the player will select the lowest video quality to save bandwidth)

    Example:

    var meisterPlayer = new Meister('#player', {
        Hls: {
            disableVisibilitySwitch: true,
        }
    });

    maxErrors [Boolean] (default: 5)

    Defines the maximum amount of errors that are allowed to be thrown. When the errors exceed this amount we throw a meister error.

    Example:

    var meisterPlayer = new Meister('#player', {
        Hls: {
            maxErrors: 6,
        }
    });

    Item config

    These settings can be set per item. These will be available using the Hls: {} namespace.

    fineTuning [Object]

    By providing fineTuning paramaters with the item they will only be applied for that specific item. A list of all the finetuning options can be found here: https://github.com/video-dev/hls.js/blob/master/doc/API.md#fine-tuning. Options set here will override any options given when intialising the plugin.

    Example:

    meister.setItem({
        src: 'M3U8_URL_HERE',
        type: 'm3u8',
        Hls: {
            fineTuning: {
                debug: true,
                nudgeMaxRetry: 5,
            }
        }
    });

    install

    npm i @meisterplayer/plugin-hls

    Downloadslast 7 days

    11

    version

    5.5.1

    license

    Apache-2.0

    repository

    github.com

    last publish

    collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar