livestreams
v1.0.5
Published
React library for embedding a variety of livestreaming platforms into your application.
Downloads
5
Readme
livestreams
React library for embedding a variety of livestreaming platforms into your application.
Install
npm install --save livestreams
Usage
import React, { Component } from 'react'
import { Player, Chat } from 'livestreams';
import 'livestreams/dist/index.css'
class ExampleStream extends Component {
render() {
return <Player source="twitch" id="Anomaly" autoPlay />
}
}
class ExampleChat extends Component {
render() {
return <Chat source="twitch" id="Anomaly" />
}
}
Using SSR?
If you're using server-side rendering, you must manually set the origin before creating any elements.
import { setOrigin } from 'livestreams';
setOrigin('localhost');
License
MIT © insertish