Closed marcoscv1981 closed 3 years ago
it plays normal on perfect playerjs but doesn't share p2p through this player
function PlayerjsEvents(event,id,data) { if (event === "new") { window.player.p2pEngine = new p2pml.hlsjs.Engine(); // store global config const config = Hls.DefaultConfig; window.player.originalConfig = config; // set hls.js config for this instance using global configuration objects Hls.DefaultConfig = { ...config, liveSyncDurationCount: 7, loader: window.player.p2pEngine.createLoaderClass() }; } else if (event === "play") { const hls = window.player.api("hls"); if (!hls.p2pInitialized) { // initialize hls.js instance p2pml.hlsjs.initHlsJsPlayer(hls); hls.p2pInitialized = true; Hls.DefaultConfig = window.player.originalConfig; // restore global config } } } window.player = new Playerjs({id: "player", file: "https://akamai-axtest.akamaized.net/routes/lapd-v1-acceptance/www_c4/Manifest.m3u8"});
it plays normal on perfect playerjs but doesn't share p2p through this player