5.6.4 • Published 5 years ago

@meisterplayer/plugin-nativehls v5.6.4

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
5 years ago

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.

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-boolean-default-false)
  • optional(#dvrenabled-boolean-default-true)
  • optional(#dvrthreshold-number-default-300)
  • optional(#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:

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:

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:

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:

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

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

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'
});
5.6.4

5 years ago

5.6.3

5 years ago

5.6.2

5 years ago

5.6.1

6 years ago

5.6.0

6 years ago

5.5.1

7 years ago

5.5.0

7 years ago

5.4.0

7 years ago

5.3.0

7 years ago

5.2.0

7 years ago

5.1.0

7 years ago

5.0.2

7 years ago

5.0.1

7 years ago