/yoda-player

Experimental MPEG-DASH client implementation

Primary LanguageTypeScriptOtherNOASSERTION

Yoda Player

Yoda player (Yet anOther DASH player) is a TypeScript library that implements an MPEG-DASH client. It can be used for playback in web based environments that provide HTML5 and MediaSource Extensions APIs.

Furthermore, the library currently relies on DOMParser and Document to parse XML.

Design

An overview of of the player archicture and it's main component can be found here.

Disclaimer

This is an experimental project. Please, DO NOT use in any production environment! If you're looking for an open-source, production ready media player I recommend you consider following projects instead:

MPEG-DASH features

Supported:

  • VoD & Live (static and dynamic manifests)
  • timeShiftBufferDepth
  • suggestedPresentationDelay
  • Segment index:
    • SegmentTemplate (VoD only)
    • SegmentTemplate+Timeline

Not Supported:

  • Multi-period
  • Multi-codecs
  • SegmentBase & SegmentList
  • ContentProtection (DRM)
  • Text
  • and more...

Getting started

Make sure you have git and nodejs/npm installed on your machine.

  1. Checkout repository
  2. Install the dependencies
  3. build
git clone git@github.com:zangue/yoda-player.git
cd yoda-player
npm install
npm run build

Demo page:

npm run serve

Navigate to http://localhost:9000/ (currently only tested in Chrome browser)

Basic Usage

This is an example of how you can embed Yoda Player into your HTML page.

<!doctype html>

<html lang="en">
  <head>
    <meta charset="utf-8">
  </head>

  <body>
    <video id="video" controls="true" autoplay="true"></video>

    <script src="path/to/yoda-player.js"></script>
    <script>
      var mediaElement = document.getElementById('video');
      var streamUrl = 'https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd';

      var player = new yoda.Player(mediaElement);

      player.load(streamUrl);
    </script>
  </body>
</html>

License

This software is being made available under the terms of the MIT license. Please refer to the LICENSE.md file within this directory.

This software is greatly inspired by the Shaka Player architecture and borrow small code snippets from the project. The Shaka Player is subject to the terms of the Apache-2.0 license.