Skip to content

Commit

Permalink
Workaround for playback stopping in chrome, closes #343.
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnd committed Sep 28, 2013
1 parent 9790c9d commit 91778cd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions res/playlistmanager.js
Expand Up @@ -245,6 +245,15 @@ PlaylistManager.prototype = {
$(this.cssSelectorjPlayer).bind($.jPlayer.event.ended, function(event) {
self.cmd_next();
});

/* WORKAROUND FOR BUG #343 (playback stops sometimes in google chrome) */
$(this.cssSelectorjPlayer).bind($.jPlayer.event.error, function(event) {
window.console.log("Playback failed! trying to resume from the point it failed.");
// get current time where playback failed and resume from there
var current_playtime = self.jPlayerInstance.data("jPlayer").status.currentTime;
playlistManager.jPlayerInstance.data("jPlayer").play(current_playtime);
});
/* WORKAROUND END */

/* JPLAYER CONTROLS BINDINGS */
$(this.cssSelector.previous).click(function() {
Expand Down

0 comments on commit 91778cd

Please sign in to comment.