This repository was archived by the owner on Sep 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
How to make Default Level?Β #109
Copy link
Copy link
Open
Description
End goal: Set Default Level of Video, Not 360p. (or choose the highest Level available)
my code so far:
var player = new Clappr.Player({
source: "1.m3u8",
parentId: "#player",
plugins: [
LevelSelector,
HlsjsPlayback
],
levelSelectorConfig: {
title: 'Quality',
labels: {
// the labels are ment to be blank
3: '',
2: '', // 500kbps
1: '', // 240kbps
0: '', // 120kbps
},
labelCallback: function(playbackLevel, customLabel) {
return customLabel + playbackLevel.level.height+'p'; // High 720p
}
},
///HLS CONFIG
{removed}
});m3u8 file:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=1251328,RESOLUTION=426x240,NAME="240"
part_240p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1563648,RESOLUTION=640x360,NAME="360"
part_360p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2084864,RESOLUTION=1280x720,NAME="720"
part_720p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3128320,RESOLUTION=1920x1080,NAME="1080"
part_1080p.m3u8
Extra info if needed:
possible resolutions:
- 4k
- 2k
- 1080p
- 720p
- 360p
- 240p
- 144p
If possible, i want the Top default to be dynamic (as every video wont be 1080p, or 240p, just choose the highest available)
unilogica
Metadata
Metadata
Assignees
Labels
No labels