项目作者: yangkghjh

项目描述 :
Video aspect ratio management for video.js.
高级语言: JavaScript
项目地址: git://github.com/yangkghjh/videojs-aspect-ratio-panel.git
创建时间: 2020-11-18T15:31:38Z
项目社区:https://github.com/yangkghjh/videojs-aspect-ratio-panel

开源协议:MIT License

下载


videojs-aspect-ratio-panel

Video aspect ratio management for video.js.

Table of Contents

Installation

  1. npm install --save @yangkghjh/videojs-aspect-ratio-panel

Usage

To include videojs-aspect-ratio-panel 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-aspect-ratio-panel.min.js"></script>
  3. <script>
  4. var player = videojs('my-video');
  5. player.aspectRatioPanel();
  6. </script>

Browserify/CommonJS

When using with Browserify, install videojs-aspect-ratio-panel 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('@yangkghjh/videojs-aspect-ratio-panel');
  6. var player = videojs('my-video');
  7. player.aspectRatioPanel();

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', '@yangkghjh/videojs-aspect-ratio-panel'], function(videojs) {
  2. var player = videojs('my-video');
  3. player.aspectRatioPanel();
  4. });

License

MIT. Copyright (c) Yang Bin yangkghjh@gmail.com