Peer5 / videojs-contrib-hls.js

HLS library for video.js using Dailymotion's hls.js tech
Apache License 2.0
108 stars 55 forks source link

Broadcast level loaded event on tech. #11

Closed boushley closed 7 years ago

boushley commented 7 years ago

This allows consumers to get at custom metadata from the HLS manifest.

shacharz commented 7 years ago

Seems reasonable, let's make it more general:

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

Good point. I've gone ahead and updated this to broadcast all events.