1.0.1 • Published 5 years ago

react-jtv-redux-chromecast v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

react-jtv-redux-chromecast

Chromecast for web using redux

NPM JavaScript Style Guide

Install

npm install --save react-jtv-redux-chromecast

Usage

import React, { Component } from 'react'

import {JTVChromeCast, JTVCastUI} from 'react-jtv-redux-chromecast';
import './css/castvideo.css';

class Example extends Component {
  componentDidMount(){
    
    let mediaContent = [{
      title: "Title of the video",
      thumb: "thumb_url",
      sources: ["video_url"]
    }]
    JTVChromeCast.initializeCastPlayer('applicationId', function(jtvCast){
      
      jtvCast.mediaContents = mediaContent;
      jtvCast.setupLocalPlayer();
      jtvCast.initializeUI();
      
    })
  }
  render () {
    return (
          <JTVCastUI />
    )
  }
}

License

MIT © rcmahapatra