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

@mycujoo/player-mls

v1.4.23-rc.0

Published

Based on video.js project

Downloads

456

Readme

MyCujoo MLS player

Based on video.js project

Dependencies

This project's advanced features and some of the core features will require this packages to be used in your project:

react
react-dom
immer
@emotion/react
lodash
@silvermine/videojs-chromecast

Usage

To use MyCujoo MLS Player in a React project all you need is to install this package:

yarn add @mycujoo/player-mls

And then use it in your code:

If you want to use advanced features of the player you will have to use the contexts provided by this project. In which case the minimal setup will look like this:

import Player, { PlayerStateContextProvider, AnnotationsContextProvider } from '@mycujoo/player-mls'

....
// render method of your component
  <PlayerStateContextProvider>
    <AnnotationsContextProvider>
      <Player source="path-to-m3u8-file" />
    </AnnotationsContextProvider>
  </PlayerStateContextProvider>

API

| Prop | Type | Description | | ------------------ | :------: | ----------------------------------------------------------------------------------------------- | | source | string | Path to m3u8 or mp4 video source, required | | autoplay | bool | html5 video tag autoplay attribute | | qualitySelector | bool | Determines if quality selector should be used or not | | scoreboard | bool | Determines if scoreboard should be used or not, reuires scoreboardConfig prop to work | | debug | bool | Toggles debug mode, if it is on video.js and youbora debug levels will be set to maximum output | | youboraOptions | object | If you want to send stats to youbora, see youboraOptions interface for more info | | googimaTag | string | If specified enables Google IMA integration | | scoreboardConfig | object | Required to show scoreboard component, see scoreboardConfig interface for more info | | midrolls | object | If specified enables midroll ads, see Midroll type for more info | | onError | function | Is triggered when video.js throws an error, see vjs errors documentation for more info | | onPlayerActive | function | Is triggered when video is playing every 5 seconds to report healthy playback | | onVideoPlay | function | Is triggered on html5 video tag play event | | onVideoPause | function | Is triggered on html5 video tag pause event | | onSeekStart | function | Is triggered on html5 video tag seeking event | | onSeekEnd | function | Is triggered on html5 video tag seeked event | | onBufferStart | function | Is triggered on html5 video tag waiting event | | onBufferEnd | function | Is triggered on html5 video tag playing event | | onAdsManager | function | Is triggered on when the ad manager is initialized; google ima AdManager is the only parameter | | onAdsBreakStart | function | Is triggered on AdsManager loaded event | | onAdSkip | function | Is triggered on AdsManager skip event | | onAdStart | function | Is triggered on AdsManager start event; AdEvent is the only parameter | | onAdComplete | function | Is triggered on AdsManager complete event | | onAdsBreakComplete | function | Is triggered on AdsManager skip or complete events | | onVideoStart | function | Is triggered on first occurence of html5 video tag play event | | onVideoEnd | function | Is triggered on html5 video tag end event | | onFullscreenChange | function | Is triggered when fullscreen status changes; should have a boolean parameter for the status |

Development

To set up development environment for this project you will need to link player package inside you project, but also link all peer dependencies from you project inside player.

So the steps are following:

  1. Run yarn link inside @mycujoo/player-mls repository
  2. Go to the project root and run yarn link @mycujoo/player-mls
  3. Go to each of the following dependency packages inside the project using the MLS player node_modules and run yarn link
  4. Go to @mycujoo/player-mls repository again and run yarn link immer react react-dom @emotion/react

To speed up the build, make sure that terser and visualizer are disabled in rollupConfig, development config would be created in the future.

To deploy new version to npm: Make sure you updated version in package.json, then create new tag with version format and push it to the repo:

git tag v1.0.50 -am 'version 50 message'
git push origin v1.0.50

This will trigger a build and automatically publish the updated version from package.json. Alternatively the package can be published by running npm publish.

Tests

Run yarn test to run tests. Right now tests are WIP.