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

Commit 31d82a1

Browse files
committed
main: report levels to playback_info
1 parent ddf770c commit 31d82a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class P2PHLS extends HLS {
5656
this.playbackInfo.setMain(this)
5757
this.el.playerSetminBufferLength(6)
5858
this.el.playerSetlowBufferLength(Settings.lowBufferLength)
59+
this.el.globoPlayerSetLevel(0)
5960
}
6061

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

6869
requestResource(url) {
6970
this.currentUrl = url
70-
this.playbackInfo.addData({'segmentSize': this.getAverageSegmentSize()})
71+
this.playbackInfo.addData({
72+
'segmentSize': this.getAverageSegmentSize(),
73+
'levels': this.getLevels(),
74+
})
7175
this.resourceRequester.requestResource(url, this.bufferLength, (chunk, method) => this.resourceLoaded(chunk, method))
7276
}
7377

0 commit comments

Comments
 (0)