HuongNV13 / videojs-ogvjs

Ogv.js Tech plugin for Video.JS.
5 stars 1 forks source link

VideoJS-Ogvjs

Ogv.js Tech plugin for Video.JS.

With this Tech plugin, Video.JS can play OGG/WEBM file on the browsers that do not support it (Safari).

Many thanks to Brion Vibber for the great work.

Usage

To include videojs-ogvjs 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.

<script src="https://github.com/HuongNV13/videojs-ogvjs/raw/main/path/to/video.min.js"></script>
<script src="https://github.com/HuongNV13/videojs-ogvjs/raw/main/path/to/ogv-support.js"></script>
<script src="https://github.com/HuongNV13/videojs-ogvjs/raw/main/path/to/ogv.js"></script>
<script src="https://github.com/HuongNV13/videojs-ogvjs/raw/main/path/to/VideoJS-Ogvjs.min.js"></script>
<script>
  var player = videojs('my-video', {
    techOrder: ['OgvJS'],
    ogvjs: {
      base: '/node_modules/ogv/dist'
    }
  });
</script>

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:

require(['video.js', 'VideoJS-Ogvjs'], function(videojs) {
  var player = videojs('my-video', {
    techOrder: ['OgvJS'],
    ogvjs: {
      base: '/node_modules/ogv/dist'
    }
  });
});

License

MIT. Copyright (c) Huong Nguyen <huongnv13@gmail.com>