openHPI/video-player

Name: video-player

Owner: HPI Knowledge Tech Group

Description: The new universal tele-TASK and openHPI Player

Created: 2017-04-18 09:18:11.0

Updated: 2017-12-14 01:31:52.0

Pushed: 2018-02-13 22:05:02.0

Homepage:

Size: 13179

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

video-player

Master: Build Status Dev: Build Status

Getting Started

Make sure you have NPM, Bower and the Polymer CLI 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

m 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:

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

<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="video-player.html">
head>
ody>
<video-player configuration='{
  "streams": [{"hd": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"}]
}'></video-player>
body>
ml>

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

Configuration

See configuration.md

Features

See features.md

Extending the Framework

See extending.md

Tests

See tests.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:

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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.