Skip to content

Commit

Permalink
Merge pull request #1101 from bbcrddave/ReaddStreamTeardownCompleteEvent
Browse files Browse the repository at this point in the history
Re-add STREAM_TEARDOWN_COMPLETE event needed for metrics reset
  • Loading branch information
Dan Sparacio authored and Dan Sparacio committed Feb 1, 2016
2 parents 6abdf75 + e8a9365 commit 4fa5884
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/streaming/controllers/StreamController.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,8 @@ function StreamController() {
eventBus.trigger(Events.PROTECTION_DESTROYED, {data: manifestModel.getValue().url});
}
}

eventBus.trigger(Events.STREAM_TEARDOWN_COMPLETE);
}

instance = {
Expand Down
2 changes: 1 addition & 1 deletion src/streaming/rules/abr/ThroughputRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function ThroughputRule(config) {

}

if (lastRequest.trace.length) {
if (lastRequest.trace && lastRequest.trace.length) {
downloadTime = (lastRequest._tfinish.getTime() - lastRequest.tresponse.getTime()) / 1000;

bytes = lastRequest.trace.reduce(function (a, b) {
Expand Down

0 comments on commit 4fa5884

Please sign in to comment.