Skip to content

Instantly share code, notes, and snippets.

@dmlap
Created July 26, 2017 23:23
Show Gist options
  • Save dmlap/c5349073990bc7a20fb4cd14a118e0f4 to your computer and use it in GitHub Desktop.
Save dmlap/c5349073990bc7a20fb4cd14a118e0f4 to your computer and use it in GitHub Desktop.
Retrieve the active DASH representation.
// make sure your player has DASH support:
if (player.dash) {
// print the enabled representation
// this will include a `bandwidth` property if one was specified in the MPD
console.log(player.dash.representations()
.find(function(representation) { return representation.enabled; }));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment