• This repository has been archived on 28/Apr/2020
  • Stars
    star
    206
  • Rank 190,504 (Top 4 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 11 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Use chromecast with videojs html5 player

DEPRECATION WARNING: Unfortunately it's time for me to deprecate this library as I cannot give it the time it needs. If you're interested in maintaining this lib, send me message ([email protected]). I'd recommend using something like chromeless or puppeteer if possible. Thanks!

Build Status

Donate

Chromecast Plugin for video.js 5.*

Alt text

Installation

Install videojs-chromecast via npm (preferred):

$ npm install videojs-chromecast

Or Bower:

$ bower install videojs-chromecast

Inclusion

Include videojs-chromecast on your website using the tool(s) of your choice.

The simplest method of inclusion is a <script> tag after the video.js <script> tag:

<head data-cast-api-enabled="true"> <!-- allow chromecast extention -->
<script src="http://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script> <!-- add chromecast sdk -->
<script src="path/to/video.js/dist/video.js"></script><!-- add video.js sdk -->
<script src="path/to/videojs-chromecast/dist/videojs-chromecast.js"></script><!-- add plugin -->

When installed via npm, videojs-chromecast supports Browserify-based workflows out of the box.

Basic Usage

For full details on how to use chromecast in the API documentation.

var player = videojs('video',{
  chromecast:{
     appId:'APP-ID'
  }
});

Options

Chromecast sdk mediaInfo use poster image

options :{
  chromecast:{
     appId:'APP-ID',
     metadata:{
       title:'Title display on tech wrapper',
       subtitle:'Synopsis display on tech wrapper',
     }
  }
}

License

Apache-2.0. Copyright (c) Benjipott, Inc.