Git Product home page Git Product logo

hls-demo's Introduction

HLS.js Custom Controls

Working

  • Controls: Play/ Pause, Mute/Unmute, Video Quality Settings, Video Seek Bar Automatically hides controls if no mouse activity for a while, Display controls on mouse hover, Display controls on mouse movement only if pointer is on video.

  • Video Quality: Default quality is set to auto, Quality options created from hls levels manifest. On manual quality selection, quality changed to selected quality level.

  • Demo Url: http://abhisheksliam.github.io/hls-demo

(Supported Browsers: Latest Chrome / Firefox)

Source Code

(https://github.com/abhisheksliam/hls-demo)

Uses Gulp, LESS, Javascript

src/                          --> development source (html, less, js)
    js/                       --> folder to keep js files
        custom.controls.js    --> player configuration and custom controls event handling
        animate.controls.js   --> extra animation show/hide handling for controls
    less/                     --> folder to keep styles (.less)
        player.less           --> styles specific to controls and video player
        page.less             --> extra styles for placing player on page
        style.less            --> less imports
    index.html                --> base html file (video source to be provided in data-src)
dist/                         --> build output files (html, css, js) 

Installation - Build / Usage

$ git clone https://github.com/abhisheksliam/hls-demo.git .
$ npm install

$ gulp

Build all source code files and fire a livereload server which serves the files in dist/. (Build files: (https://github.com/abhisheksliam/hls-demo/tree/gh-pages))

  • less: Compile all *.less files in the less/ folder into dist/css/style.css
  • scripts: Concatenate and minify all *.js files in the js/ directory into dist/js/main.min.js
  • html: Copy all html files from src/ to dist/`

Deploy to gh-pages

Step 1 : Remove the dist directory from the project’s .gitignore file Remove gh-pages branch if already exists: git push origin --delete gh-pages

Step 2 : Make sure git knows about your subtree (the subfolder with your site). git add dist && git commit -m "Initial dist subtree commit"

Step 3: Use subtree push to send it to the gh-pages branch on GitHub. git subtree push --prefix dist origin gh-pages

hls-demo's People

Contributors

abhishekcompro avatar abhisheksliam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.