Skip to content

Commit

Permalink
stream-controller: fragment type is now report through frag object
Browse files Browse the repository at this point in the history
  • Loading branch information
mangui committed Apr 28, 2016
1 parent a966a22 commit 44bc721
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo/index.html
Expand Up @@ -333,7 +333,7 @@ <h4> Stats Display </h4>
});
hls.on(Hls.Events.FRAG_BUFFERED,function(event,data) {
var event = {
type : data.type + " fragment",
type : data.frag.type + " fragment",
id : data.frag.level,
id2 : data.frag.sn,
time : data.stats.trequest - events.t0,
Expand Down
2 changes: 1 addition & 1 deletion src/controller/stream-controller.js
Expand Up @@ -914,7 +914,7 @@ class StreamController extends EventHandler {
this.fragPrevious = frag;
stats.tbuffered = performance.now();
this.fragLastKbps = Math.round(8 * stats.length / (stats.tbuffered - stats.tfirst));
this.hls.trigger(Event.FRAG_BUFFERED, {stats: stats, frag: frag, type : 'main', id : 0});
this.hls.trigger(Event.FRAG_BUFFERED, {stats: stats, frag: frag, id : 0});
logger.log(`media buffered : ${this.timeRangesToString(this.media.buffered)}`);
this.state = State.IDLE;
}
Expand Down

0 comments on commit 44bc721

Please sign in to comment.