Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 1.6 KB

README.md

File metadata and controls

59 lines (43 loc) · 1.6 KB

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="/path/to/video.min.js"></script>
<script src="/path/to/ogv-support.js"></script>
<script src="/path/to/ogv.js"></script>
<script src="/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 <[email protected]>