Nonstop Pet Mewing

    videojs-css

    1.2.0 • Public • Published

    videojs-css

    NPM

    alt text alt text alt text

    Installation

    npm install --save videojs-css

    Usage

    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>

    Install

    npm i videojs-css

    DownloadsWeekly Downloads

    237

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    34.3 kB

    Total Files

    18

    Last publish

    Collaborators

    • facundofernandez