Node Player made for WebChimera.js (libVLC wrapper)
GNU Lesser General Public License v2.1
178
stars
46
forks
source link
Player freezes complete electron application when stopped just after video has been initialized #93
Open
vihar638 opened 3 years ago
var wjs = require("wcjs-player"); var conf = { wcjs: require('wcjs-prebuilt'), multiscreen: true, autoplay: true, loop: true, };
var liveViewPlayerHolder = new wjs('#player').addPlayer(conf);
liveViewPlayerHolder.clearPlaylist(); liveViewPlayerHolder.addPlaylist(url); liveViewPlayerHolder.play();
liveViewPlayerHolder.onBuffering(function(p){
if(p > 0 && p < 1) { liveViewPlayerHolder.stop(); setTimeout(() => { start(); }, 1000); } else if(p > 50){ stop(); start(); } });
function stop() { liveViewPlayerHolder.stop();
}
function start() { liveViewPlayerHolder.clearPlaylist(); liveViewPlayerHolder.addPlaylist(url); liveViewPlayerHolder.play(); }
In some condition the player completely stuck the complete electron application and it stuck in file wcjs-player/index.js
wjs.prototype.stop = function() {
//player completely works fine till this line this.vlc.playlist.stop(); //player stucks here
}