项目作者: tapioca24

项目描述 :
A video.js plugin to leave the last frame video at the end of playback.
高级语言: JavaScript
项目地址: git://github.com/tapioca24/videojs-remnant.git
创建时间: 2019-11-07T09:42:48Z
项目社区:https://github.com/tapioca24/videojs-remnant

开源协议:MIT License

下载


videojs-remnant

A video.js plugin to leave the last frame video at the end of playback.
This is useful when playing a video that has been split into multiple files.

Table of Contents

Installation

  1. npm install --save videojs-remnant

Usage

To include videojs-remnant on your website or web application, use any of the following methods.

<script> Tag

This is the simplest case. Get the script in whatever way you prefer and include the plugin after you include video.js, so that the videojs global is available.

  1. <script src="//path/to/video.min.js"></script>
  2. <script src="//path/to/videojs-remnant.min.js"></script>
  3. <script>
  4. var player = videojs("my-video");
  5. player.remnant();
  6. </script>

Browserify/CommonJS

When using with Browserify, install videojs-remnant via npm and require the plugin as you would any other module.

  1. var videojs = require("video.js");
  2. // The actual plugin function is exported by this module, but it is also
  3. // attached to the `Player.prototype`; so, there is no need to assign it
  4. // to a variable.
  5. require("videojs-remnant");
  6. var player = videojs("my-video");
  7. player.remnant();

Browserify/ES6

When using with Browserify, install videojs-remnant via npm and import the plugin as you would any other module.

  1. import videojs from "video.js";
  2. // The actual plugin function is exported by this module, but it is also
  3. // attached to the `Player.prototype`; so, there is no need to assign it
  4. // to a variable.
  5. import "videojs-remnant";
  6. const player = videojs("my-video");
  7. player.remnant();

RequireJS/AMD

When using with RequireJS (or another AMD library), get the script in whatever way you prefer and require the plugin as you normally would:

  1. require(["video.js", "videojs-remnant"], function(videojs) {
  2. var player = videojs("my-video");
  3. player.remnant();
  4. });

TypeScript

When using with TypeScript, install videojs-remnant via npm and import the plugin as you would any other module.
You can use the VideoJsRemnant namespace.

  1. import videojs, { VideoJsRemnant } from "video.js";
  2. import "videojs-remnant";
  3. const player = videojs("my-video");
  4. const options: VideoJsRemnant.Options = {
  5. disableColorCorrection: true
  6. };
  7. player.remnant(options);

Configuration

Property Attributes Type Default value Description
disableColorCorrection Optional Boolean false Disable canvas color correction.

License

MIT. Copyright (c) tapioca24