1.2.0 • Published 5 years ago
videojs-css v1.2.0
videojs-css
 
 

Installation
npm install --save videojs-cssUsage
To include videojs-css 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/videojs-css.min.js"></script>
<script>
  var player = videojs('my-video');
  player.css({
      controlBar:{
        borderRadius: "20px",
        marginBottom: "15px",
        width:"90%",
        marginLeft:"5%",
        fontSize:"1.5em",
        background:"#3F51B5"
      },
      bigPlayButton:{
        borderRadius: "10%",
        width:"150px",
        height:"150px",
        lineHeight:"150px",
        fontSize:"80px",
        border:"none",
        left:"50%",
        top:"50%",
        transform:"translate(-50%,-50%)",
        background:"#3F51B5"
      }
  });
</script>Browserify/CommonJS
When using with Browserify, install videojs-css via npm and require the plugin as you would any other module.
var videojs = require('video.js');
// The actual plugin function is exported by this module, but it is also
// attached to the `Player.prototype`; so, there is no need to assign it
// to a variable.
require('videojs-css');
var player = videojs('my-video');
player.css({
      controlBar:{
        borderRadius: "20px",
        marginBottom: "15px",
        width:"90%",
        marginLeft:"5%",
        fontSize:"1.5em",
        background:"#3F51B5"
      },
      bigPlayButton:{
        borderRadius: "10%",
        width:"150px",
        height:"150px",
        lineHeight:"150px",
        fontSize:"80px",
        border:"none",
        left:"50%",
        top:"50%",
        transform:"translate(-50%,-50%)",
        background:"#3F51B5"
      }
  });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-css'], function(videojs) {
  var player = videojs('my-video');
  player.css({
      controlBar:{
        borderRadius: "20px",
        marginBottom: "15px",
        width:"90%",
        marginLeft:"5%",
        fontSize:"1.5em",
        background:"#3F51B5"
      },
      bigPlayButton:{
        borderRadius: "10%",
        width:"150px",
        height:"150px",
        lineHeight:"150px",
        fontSize:"80px",
        border:"none",
        left:"50%",
        top:"50%",
        transform:"translate(-50%,-50%)",
        background:"#3F51B5"
      }
  });
});License
MIT. Copyright (c) Facundo Fernandez <ffernandez@edge-americas.com>
