Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including videojs-audio-tracks with all npm packages installed. Try it out:

videojs-audio-tracks lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("videojs-audio-tracks/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

videojs-audio-tracks v0.2.1

Access multiple audio tracks in Video.js

VideoJS Audio Tracks

A Videojs plugin to use with video files that contain multiple audio tracks. Useful for audio descriptions, director commentary, and additional languages.

Note

As this plugin uses the Audio Tracks API, it is only available in IE 11+ & Safari 8+. Also, it will not work in the Videojs Flash fallback.

Usage

Include:

  • videojs-audio-tracks.min.css
  • videojs-audio-tracks.min.js
  var player = videojs('example-video');
  player.AudioTracks({
    default: 0,
    descriptive: 1
  });

Example

Example using Video.js 5

Support

Browser testing for this project has been graciously donated by BrowserStack.

License

Licesned Apache 2. See LICENSE file.

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free