clappr / clappr-level-selector-plugin

Clappr Level Selector Plugin
MIT License
76 stars 56 forks source link

Does clappr selector still working ? #63

Closed Tilkeii closed 6 years ago

Tilkeii commented 6 years ago

I'm using clappr with m3u8 playlist and clappr-level-selector-plugin doesn't work. I have the same code as the exemple. There is no error in console and clappr work fine

var player = new Clappr.Player({
    source: "http://192.168.1.23:8080/hls/test/index.m3u8",
    parentId: "#player",
    plugins: {
        'core': [LevelSelector]
    },
    levelSelectorConfig: {
        title: 'Quality',
        labels: {
            2: 'High', // 500kbps
            1: 'Med', // 240kbps
            0: 'Low', // 120kbps
        },
        labelCallback: function(playbackLevel, customLabel) {
            return customLabel + playbackLevel.level.height+'p'; // High 720p
        }
    },
});
leandromoreira commented 6 years ago

can you test with:

var player = new Clappr.Player({
    source: "http://192.168.1.23:8080/hls/test/index.m3u8",
    parentId: "#player",
    plugins: [LevelSelector]
 });
Tilkeii commented 6 years ago

It doesn't work neither. Still 0 error and clappr working well but not the plugin

leandromoreira commented 6 years ago

Hi @Tilkeii

I tested here and it's working fine, try for yourself:

var playerElement = document.getElementById("player-wrapper");

var player = new Clappr.Player({
  source: 'https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8',
  poster: 'http://clappr.io/poster.png',
  plugins: [LevelSelector],
  mute: true,
  height: 360,
  width: 640
});

player.attachTo(playerElement);

screen shot 2018-01-29 at 4 23 02 pm

Tilkeii commented 6 years ago

Oh i think i find the problem. I tested with the configuration i had but with your source link (https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8) and it work. I think adding port break the plugin

leandromoreira commented 6 years ago

Maybe it's related to your hls stream, does it have multiple renditions?

Tilkeii commented 6 years ago

I use nginx-rtmp-module and i have only 1 simple application

rtmp {
    server {
        listen 1935;
        ping 30s;
        notify_method get;

        application hls {
            live on;
            max_connections 1;

            hls on;
            hls_path /usr/local/nginx/hls;
            hls_nested on;
        }
    }
}
Tilkeii commented 6 years ago

Oh i think i get it. I'll try to fix my HLS stream