1.4.23-rc.0 • Published 1 year ago

@mycujoo/player-mls v1.4.23-rc.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

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

PropTypeDescription
sourcestringPath to m3u8 or mp4 video source, required
autoplayboolhtml5 video tag autoplay attribute
qualitySelectorboolDetermines if quality selector should be used or not
scoreboardboolDetermines if scoreboard should be used or not, reuires scoreboardConfig prop to work
debugboolToggles debug mode, if it is on video.js and youbora debug levels will be set to maximum output
youboraOptionsobjectIf you want to send stats to youbora, see youboraOptions interface for more info
googimaTagstringIf specified enables Google IMA integration
scoreboardConfigobjectRequired to show scoreboard component, see scoreboardConfig interface for more info
midrollsobjectIf specified enables midroll ads, see Midroll type for more info
onErrorfunctionIs triggered when video.js throws an error, see vjs errors documentation for more info
onPlayerActivefunctionIs triggered when video is playing every 5 seconds to report healthy playback
onVideoPlayfunctionIs triggered on html5 video tag play event
onVideoPausefunctionIs triggered on html5 video tag pause event
onSeekStartfunctionIs triggered on html5 video tag seeking event
onSeekEndfunctionIs triggered on html5 video tag seeked event
onBufferStartfunctionIs triggered on html5 video tag waiting event
onBufferEndfunctionIs triggered on html5 video tag playing event
onAdsManagerfunctionIs triggered on when the ad manager is initialized; google ima AdManager is the only parameter
onAdsBreakStartfunctionIs triggered on AdsManager loaded event
onAdSkipfunctionIs triggered on AdsManager skip event
onAdStartfunctionIs triggered on AdsManager start event; AdEvent is the only parameter
onAdCompletefunctionIs triggered on AdsManager complete event
onAdsBreakCompletefunctionIs triggered on AdsManager skip or complete events
onVideoStartfunctionIs triggered on first occurence of html5 video tag play event
onVideoEndfunctionIs triggered on html5 video tag end event
onFullscreenChangefunctionIs 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.

1.4.20

1 year ago

1.4.22

1 year ago

1.4.21

1 year ago

1.4.17

1 year ago

1.4.16

1 year ago

1.4.19

1 year ago

1.4.23-rc.0

1 year ago

1.4.20-rc.0

1 year ago

1.4.15

1 year ago

1.4.13

1 year ago

1.4.14

1 year ago

1.4.13-rc.0

1 year ago

1.4.12-rc.0

2 years ago

1.4.11-rc.0

2 years ago

1.4.9-rc.1

2 years ago

1.4.9-rc.0

2 years ago

1.4.11

2 years ago

1.4.10

2 years ago

1.4.12

2 years ago

1.4.9

2 years ago

1.4.8

2 years ago

1.4.2-rc.9

2 years ago

1.4.2-rc.8

2 years ago

1.4.2-rc.7

2 years ago

1.4.2-rc.6

2 years ago

1.4.2-rc.5

2 years ago

1.4.2-rc.4

2 years ago

1.4.2-rc.3

2 years ago

1.4.2-rc.11

2 years ago

1.4.2-rc.10

2 years ago

1.4.7-rc.2

2 years ago

1.4.7-rc.1

2 years ago

1.4.7-rc.0

2 years ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.3-rc.3

2 years ago

1.4.3-rc.2

2 years ago

1.4.3-rc.1

2 years ago

1.4.7

2 years ago

1.4.3-rc.0

2 years ago

1.4.2-rc.2

2 years ago

1.4.2-rc.1

2 years ago

1.4.2-rc.0

2 years ago

1.3.12-rc.0

2 years ago

1.3.11-rc.9

2 years ago

1.3.11-rc.8

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.11-rc.1

2 years ago

1.3.11-rc.0

2 years ago

1.3.11

2 years ago

1.3.11-rc.3

2 years ago

1.3.11-rc.2

2 years ago

1.3.11-rc.5

2 years ago

1.3.11-rc.4

2 years ago

1.3.11-rc.6

2 years ago

1.4.0-rc.0

2 years ago

1.4.0-rc.2

2 years ago

1.4.0-rc.1

2 years ago

1.4.0-rc.3

2 years ago

1.4.1-rc.2

2 years ago

1.3.11-rc.10

2 years ago

1.3.11-rc.99

2 years ago

1.3.11-rc.11

2 years ago

1.3.11-rc.12

2 years ago

1.4.1-rc.0

2 years ago

1.3.11-rc.13

2 years ago

1.4.1-rc.1

2 years ago

1.3.10-rc.0

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.8-rc.4

2 years ago

1.3.8-rc.5

2 years ago

1.3.8-rc.6

2 years ago

1.3.8-rc.0

2 years ago

1.3.8-rc.1

2 years ago

1.3.8-rc.2

2 years ago

1.3.8-rc.3

2 years ago

1.3.9-rc.1

2 years ago

1.3.10

2 years ago

1.3.1-rc.0

2 years ago

1.3.0-rc.0

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.2-rc.1

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.36

2 years ago

1.2.37

2 years ago

1.2.31

2 years ago

1.2.34

2 years ago

1.2.35

2 years ago

1.2.32

2 years ago

1.2.33

2 years ago

1.2.30

2 years ago

1.2.29

2 years ago

1.2.28

2 years ago

1.2.28-rc.1

2 years ago

1.2.27

2 years ago

1.2.26

2 years ago

1.2.25

2 years ago

1.2.24-rc.13

2 years ago

1.2.24-rc.12

2 years ago

1.2.24-rc.11

2 years ago

1.2.24-rc.10

2 years ago

1.2.24-rc.0

2 years ago

1.2.24

2 years ago

1.2.23

2 years ago

1.2.22

2 years ago

1.2.21

2 years ago

1.2.20

2 years ago

1.2.19

2 years ago

1.2.18

2 years ago

1.2.17

2 years ago

1.2.16

2 years ago

1.2.15

2 years ago

1.2.14

2 years ago

1.2.13

2 years ago

1.2.12

2 years ago

1.2.11

2 years ago

1.2.10

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.55

3 years ago

1.1.54

3 years ago

1.1.53

3 years ago

1.1.52

3 years ago

1.1.51

3 years ago

1.1.50

3 years ago

1.1.48

3 years ago

1.1.47

3 years ago

1.1.46

3 years ago

1.1.45

3 years ago

1.1.44

3 years ago

1.1.43

3 years ago

1.1.42

3 years ago

1.1.41

3 years ago

1.1.40

3 years ago

1.1.39

3 years ago

1.1.38

3 years ago

1.1.37

3 years ago

1.1.36

3 years ago

1.1.35

3 years ago

1.1.34

3 years ago

1.1.32

3 years ago

1.1.31

3 years ago

1.1.30

3 years ago

1.1.29

3 years ago

1.1.28

3 years ago

1.1.27

3 years ago

1.1.26

3 years ago

1.1.25

3 years ago

1.1.24

3 years ago

1.1.23

3 years ago

1.1.22

4 years ago

1.1.21

4 years ago

1.1.20

4 years ago

1.1.19

4 years ago

1.1.18-rc.1

4 years ago

1.1.9-rc.5

4 years ago

1.1.9-rc.4

4 years ago

1.1.18

4 years ago

1.1.17

4 years ago

1.1.16

4 years ago

1.1.15

4 years ago

1.1.9-rc.3

4 years ago

1.1.9-rc.2

4 years ago

1.1.14

4 years ago

1.1.13

4 years ago

1.1.12

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.9-rc.1

4 years ago

1.1.9-rc.0

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6-rc.0

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago