Skip to content

Commit

Permalink
[cmd:quicklook] fix #1985 seek and volume change disabled in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Apr 25, 2017
1 parent f47a64d commit d2b7394
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion js/commands/quicklook.plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ elFinder.prototype.commands.quicklook.plugins = [
e.stopImmediatePropagation();

node = $('<audio class="elfinder-quicklook-preview-audio" controls preload="auto" autobuffer><source src="'+ql.fm.openUrl(file.hash)+'" /></audio>')
.on('change', function(e) {
// Firefox fire change event on seek or volume change
e.stopPropagation();
})
.appendTo(preview);
autoplay && node[0].play();

Expand Down Expand Up @@ -343,7 +347,12 @@ elFinder.prototype.commands.quicklook.plugins = [
e.stopImmediatePropagation();

ql.hideinfo();
node = $('<video class="elfinder-quicklook-preview-video" controls preload="auto" autobuffer><source src="'+ql.fm.openUrl(file.hash)+'" /></video>').appendTo(preview);
node = $('<video class="elfinder-quicklook-preview-video" controls preload="auto" autobuffer><source src="'+ql.fm.openUrl(file.hash)+'" /></video>')
.on('change', function(e) {
// Firefox fire change event on seek or volume change
e.stopPropagation();
})
.appendTo(preview);
autoplay && node[0].play();

win.on('viewchange.video', setNavi);
Expand Down

0 comments on commit d2b7394

Please sign in to comment.