npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@meisterplayer/plugin-html5player

v5.9.3

Published

Meister plugin for playing video with the html5player

Downloads

38

Readme

HMTL5 Player plugin for Meister

This plugin allows playback using the HTML5 player. This is only a player plugin so it cannot play media on it's own, it needs a media plugin to play. For example the plugin BaseMedia

Getting started

Load the plugin by adding the Html5Player configuration object to the Meister initialisation options.

var meisterPlayer = new Meister('#player', {
    Html5Player: {}
});

// Continue Meister configuration
Meister.setItem({ ... });
Meister.load();

Config options

The following options can be set in the Html5Player: {} config.

checkInterval [Number] (default: 200)

The interval checks (in ms) if the player is buffering. The player decides if it's buffering if the player is not paused and the currentTime hasn't moved compared to the last position. Higher numbers result in a longer time before the player decides whether or not the player is buffering.

Example:

var meisterPlayer = new Meister('#player', {
    Html5Player: {
        checkInterval: 300,
    }
});

playerSeekDebounce [Number] (default: 500)

Due to differences in how browsers handle seeking through video it is necessary to debounce the trigger for the 'playerSeekComplete' event. Higher values reduce the number of duplicate events at the cost of losing some accuracy. By default this trigger is debounced for 500 milliseconds.

Example:

var meisterPlayer = new Meister('#player', {
    Html5Player: {
        playerSeekDebounce: 700,
    }
});

audioOnly [Boolean] (default: false)

Set the player in audio only mode. This results in using only the <audio> tag for playback instead of using the <video> tag. If you want this option only to set per item you can use the mediaType property on setItem();

Example:

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

defaultAudioImage [String] (default: '')

Sets the image for audioOnly streams. This way you can create a visual indicating the stream is audio only.

Example:

var meisterPlayer = new Meister('#player', {
    Html5Player: {
        audioOnly: true,
        defaultAudioImage: 'https://example.com/images/audio.png',
    }
});

iosPlaysInline [Boolean] (default: false)

Adds the attribute playsinline to the <video> or <audio> element. This way you can play the video inline on iOS devices.

Example:

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

startMuted [Boolean] (default: false)

Options to start the player in muted mode.

Example:

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

posterImage [String] (default: undefined)

A URL indicating a poster frame to show until the user plays or seeks. If this attribute isn't specified, nothing is displayed until the first frame is available; then the first frame is shown as the poster frame.

Example:

var meisterPlayer = new Meister('#player', {
    Html5Player: {
        posterImage: 'http://example.com/poster.png'
    }
});

enableKeyBoardShortcuts [Boolean] (default: true)

Enables the keyboard shorcuts on meister

Example:

var meisterPlayer = new Meister('#player', {
    Html5Player: {
        enableKeyBoardShortcuts: false // Disables the keyboard shorcuts
    }
});

Item options

The following options are available for per item configuration.

mediaType [String] (default: undefined)

The same as the config option audioOnly only this can be set per item.

Example:

var meisterPlayer = new Meister('#player', {
    Html5Player: {}
});

meisterPlayer.setItem({
    src: 'INSERT_SRC_HERE',
    mediaType: 'audio',
    type: 'mp4'
});

crossorigin [String] (default: undefined)

Sets the crossorigin attribute on the <video> or <audio> element. For more information on this attribute and what properties can be set, you can visit the MDN Documentation

Example:

var meisterPlayer = new Meister('#player', {
    Html5Player: {}
});

meisterPlayer.setItem({
    src: 'INSERT_SRC_HERE',
    crossorigin: 'anonymous',
    type: 'mp4'
});