Skip to content

Commit

Permalink
Broadcast level loaded event on tech.
Browse files Browse the repository at this point in the history
This allows consumers to get at custom metadata from the HLS manifest.
  • Loading branch information
boushley committed Nov 22, 2016
1 parent 982a978 commit 6d4ed21
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/videojs5.hlsjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@
}
});

Object.keys(Hls.Events).forEach(function(key) {
var eventName = Hls.Events[key];
hls.on(eventName, function(event, data) {
tech.trigger(eventName, data);
});
});

// attach hlsjs to videotag
hls.attachMedia(el);
hls.loadSource(source.src);
Expand Down

0 comments on commit 6d4ed21

Please sign in to comment.