Giter VIP home page Giter VIP logo

video-player's Introduction

video-player

Master: Build Status Dev: Build Status

Getting Started

Make sure you have NPM installed.

  1. Clone the repository with git clone https://github.com/openHPI/video-player.
  2. Change the directory with cd video-player.
  3. Install dependencies by running npm install.
  4. Execute npm run serve and head to http://localhost:8080/components/video-player in your browser for a demo.

Usage for Production

The video player consists of multiple subcomponents, which can be bundled for production by running

$ npm run bundle

This creates two bundled versions of the video-player component, which can be found in the build directory. es6 contains the regular component written in ECMAScript 6, while the bundle located in es5 is transpiled to ECMAScript 5 to support older browser. To maximize the performance, it is recommended to serve the ES6 bundle to modern browsers and use the ES5 version only as fallback for older ones.

The component can then be used in any HTML site in the following way:

<html>
  <head>
    <!-- HTML Custom Elements Adapter is only needed when using the transpiled ES5 version of the component. -->
    <script src="custom-elements-es5-adapter.js"></script>

    <script src="webcomponents-bundle.js"></script>
    <script src="video-player.js"></script>
  </head>
  <body>
    <video-player configuration='{
      "streams": [{"hd": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"}]
    }'></video-player>
  </body>
</html>

The bundle is automatically created for each version tag and attached to the corresponding GitHub release.

API

See api.md

Configuration

See configuration.md

Features

See features.md

Extending the Framework

See extending.md

Tests

See tests.md

Notes

See notes.md

Linter

The framework comes with several linter configurations. All linters can by executed using npm run lint.

Releases

A new GitHub release can be created by merging in the master branch and executing npm version [major|minor|patch]. This creates a new version tag and pushes the branch.

The sources are bundled and the release is created afterwards by Travis, if the tests are passing.

Analytics

See analytics.md

Miscellaneous

User Preferences

Properties changed by the user are always automatically saved in the browser's LocalStorage. Possible for:

  • playbackRate
  • quality
  • volume

When using userPreferences in the configuration, it will override the preferences saved in LocalStorage.

iOS Support

Currently dual video playing is not fully supported on iOS, based on hardware rendering capabilities. Till there is an API to determince if some video will play, iOS will only be able to handle single stream. This will be handled by the player automaticly.

video-player's People

Contributors

soldag avatar hdinger avatar sebastiankliem avatar mmkonrad avatar richardebeling avatar mrserth avatar malcm avatar skliem avatar jgraichen avatar dependabot-preview[bot] avatar cwillems avatar janrenz avatar

Watchers

James Cloos 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.