aboutsummaryrefslogtreecommitdiff
path: root/template/assemblies
diff options
context:
space:
mode:
Diffstat (limited to 'template/assemblies')
-rw-r--r--template/assemblies/player/dash.phtml29
1 files changed, 12 insertions, 17 deletions
diff --git a/template/assemblies/player/dash.phtml b/template/assemblies/player/dash.phtml
index 24a3df6..77ad7b5 100644
--- a/template/assemblies/player/dash.phtml
+++ b/template/assemblies/player/dash.phtml
@@ -60,23 +60,18 @@
}
},
levelSelectorConfig: {
- labels: {
- // HLS
- 0: 'Slides',
- 1: 'SD',
- 2: 'HD',
-
- // DASH
- 7: 'HD',
- 8: 'SD',
- 9: 'Slides',
- 10: 'HD',
- 11: 'SD',
- 12: 'Slides',
- 13: 'HD',
- 14: 'SD',
- 15: 'Slides',
- }
+ labelCallback: function(playbackLevel, customLabel) {
+ var bw=playbackLevel.videoBandwidth;
+ if(bw <= 100000) {
+ return 'Slides';
+ }
+ else if(bw <= 800000) {
+ return 'SD';
+ }
+ else {
+ return 'HD'
+ }
+ },
},
autoPlay: true,
parentId: '#player'