Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
main: report levels to playback_info
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioribeiro committed Oct 12, 2014
1 parent ddf770c commit 31d82a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class P2PHLS extends HLS {
this.playbackInfo.setMain(this)
this.el.playerSetminBufferLength(6)
this.el.playerSetlowBufferLength(Settings.lowBufferLength)
this.el.globoPlayerSetLevel(0)
}

setPlaybackState(state) {
Expand All @@ -67,7 +68,10 @@ class P2PHLS extends HLS {

requestResource(url) {
this.currentUrl = url
this.playbackInfo.addData({'segmentSize': this.getAverageSegmentSize()})
this.playbackInfo.addData({
'segmentSize': this.getAverageSegmentSize(),
'levels': this.getLevels(),
})
this.resourceRequester.requestResource(url, this.bufferLength, (chunk, method) => this.resourceLoaded(chunk, method))
}

Expand Down

0 comments on commit 31d82a1

Please sign in to comment.