From 31d82a18b1fc1ecc2ece588724b21e1d49676b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Ribeiro?= Date: Sun, 12 Oct 2014 16:23:34 -0300 Subject: [PATCH] main: report levels to playback_info --- src/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 775da38..ae80810 100644 --- a/src/main.js +++ b/src/main.js @@ -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) { @@ -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)) }