Skip to content

JavaScript player library / DASH client / MSE-EME player

License

Notifications You must be signed in to change notification settings

vigneshvg/shaka-player

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shaka Player

The Shaka Player is a JavaScript library which implements a DASH client. It relies on HTML5 video, MediaSource Extensions, and Encrypted Media Extensions for playback.

A generic DASH client can be difficult to implement, and the DASH standard does not always align well with the new browser APIs that DASH clients are built on. Our goal is to reduce this friction and make it easier to adopt these emerging web standards for streaming, without falling back to plugins.

We support both ISO BMFF (MP4) and WebM files (even in the same manifest), WebVTT for subtitles and captions, both clear and encrypted content, and multiple audio and subtitle languages (even in the same manifest). And best of all, it's free!

Dependencies

Most of the tools you need to work on the Shaka Player are included in the sources, including the Closure Compiler, gjslint, JSDoc, and Jasmine.

Mailing list

We have a public mailing list for discussion and announcements. To receive notifications about new versions, please join the list. You can also use the list to ask questions or discuss Shaka Player development.

Documentation

We have detailed documentation which is generated from the sources using JSDoc. A pre-rendered version of this documentation is available on the web at http://shaka-player-demo.appspot.com/docs/index.html . This will be updated with each release, but you can generate the same docs yourself at any time:

./build/docs.sh

If you are new to the project, we recommend you start by browsing the docs, in particular the tutorials. This landing page is very brief, and only covers the most basic information about the project.

Getting Sources

Up-to-date sources can be obtained from http://github.com/google/shaka-player .

Building

The development process is documented in more detail in our generated docs, but in short, you can build the library by running:

./build/all.sh

Running

The library comes with a test app that can be used to tinker with all of the library's basic functionality. The test app (index.html and app.js in the sources) is meant to be used by making the source folder available to a local web server and pointing your browser at it.

A hosted version of the test app is also available at http://shaka-player-demo.appspot.com/ for your convenience.

Updating

Simply pull new sources from github and enjoy!

git pull --rebase

Design Overview

The main entities you care about are shaka.player.Player, shaka.player.DashVideoSource, and shaka.player.DrmSchemeInfo. In short, you construct a player and give it a <video> tag, then you construct a DASH video source and give it a manifest URL and an optional DRM callback. Your DRM callback returns DrmSchemeInfo objects to describe your DRM setup. You load this video source into the player to begin playback.

The player handles high-level playback and DRM, while the video source deals with streaming and all of the low-level parts of adaptive playback. The DRM scheme info is an explicit set of parameters for DRM, and contains everything the library can't glean from a DASH manifest.

More detailed information and walkthroughs with fully-functional sample code can be found in the tutorials.

Contributing

If you have improvements or fixes, we would love to have your contributions. Please read CONTRIBUTIONS.md for more information on the process we would like contributors to follow.

About

JavaScript player library / DASH client / MSE-EME player

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 88.7%
  • HTML 9.1%
  • Shell 1.2%
  • Other 1.0%