0.2.4 • Published 2 years ago

@netless/app-plyr v0.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@netless/app-plyr

Netless App for playing video and audio.

Usage

manager.addApp({
  kind: "Plyr",
  options: {
    title: "YouTube",
  },
  attributes: {
    src: "https://www.youtube.com/embed/bTqVqk7FSmY",
    provider: "youtube",
  },
});

m3u8 support

HLS support is provided by video-dev/hls.js.

NOTES:

  • To reduce the package size, hls.js is loaded dynamically using script tag.

  • If you do not want to use cdn, you should load hls.js yourself before adding this app.

    1. Install hls.js via npm add hls.js.
    2. Import and assign Hls to window.Hls:

      import { Hls } from "hls.js";
      window.Hls = Hls;
  • If you do not need HLS, you can set window.Hls to false or null to disable this loading, in which case you will not be able to play HLS streaming unless the browser support it natively.

autoplay not working

Autoplay is generally not recommended as it is seen as a negative user experience. It is also disabled in many browsers. Before raising issues, do your homework. More info can be found here:

License

MIT @ netless

0.2.4

2 years ago

0.2.3

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.2.2

2 years ago

0.1.3

2 years ago