Giter VIP home page Giter VIP logo

react-hls's Introduction

react-hls

HLS player for react applications. Demo here.

Installation

npm install --save react-hls

cd node_modules/hls.js

npm install

Hls.js library imports from original sources (src folder), that's why you need to install hls.js dependencies and add folder to babel-loader config as "include" argument in your webpack configuration. For more info see babel-loader

/node_modules\/hls\.js/

Usage example

import React, { Component } from 'react';
import HLSPlayer from 'react-hls';
import 'react-hls/src/style.css'; // need to import basic styles
import 'react-hls/src/icons.css'; // need to import basic icons

class HLSPage extends Component {
 render() {
   const source = 'http://www.streambox.fr/playlists/test_001/stream.m3u8';

   return (
     <div>
       <HLSPlayer source={source} />
     </div>
   );
 }
}

export default HLSPage;

Run example


npm run example

Notes

Duration & volume controls made with rc-slider, see docs - https://github.com/react-component/slider

react-hls's People

Contributors

pidginenemy avatar

Watchers

James Cloos avatar Joey Chen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.