jaruba / wcjs-player

Node Player made for WebChimera.js (libVLC wrapper)
http://webchimera.org/
GNU Lesser General Public License v2.1
178 stars 46 forks source link

Electron app stucks when .stop() method called #94

Open vihar638 opened 2 years ago

vihar638 commented 2 years ago

When player is on buffering state and if .stop() method is called then player gets stuck/hangs complete electron application.

wjs.prototype.stop = function() {
    wjsButton = this.find(".wcp-pause");
    if (wjsButton.length != 0) wjsButton.removeClass("wcp-pause").addClass("wcp-play");
    wjsButton = this.find(".wcp-replay");
    if (wjsButton.length != 0) wjsButton.removeClass("wcp-replay").addClass("wcp-play");
    //code stucks here
    this.vlc.playlist.stop();
   /////////////////
    positionChanged.call(this,0);
    this.find(".wcp-time-current").text("");
    this.find(".wcp-time-total").text("");
    return this;
}