Responsive videojs not chromecast working

React is not trying to implement the chromjs chromecast plugin.

I link to this site: https://github.com/benjipott/video.js-chromecast

Thank.

- my code is -

import React, { Component } from 'react';
import './App.css';
import videojs from 'videojs-chromecast';

class App extends Component {
  constructor() {
    super();
    
  }
  componentDidMount() {
    videojs('test',{
      chromecast:{
         appId:'APP-ID'
      }
    });
  }
  render() {
    return (
      <div className="App" >
        <video id="test" autoplay="autoplay" width="640" height="360" controls="controls">
          <source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/ED_1280.mp4"
            
          />
        </video>
      </div>
    );
  }
}

export default App;
Run codeHide result

- error massage - enter image description here

+4
source share

Source: https://habr.com/ru/post/1695842/


All Articles