Browse Source

add delay for video screenshot get

master
filesite 4 months ago
parent
commit
2270c988cb
  1. 10
      www/js/beauty.js

10
www/js/beauty.js

@ -331,8 +331,8 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') { @@ -331,8 +331,8 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') {
preload: 'auto'
});
myPlayer.one('playing', function() {
myPlayer.pause();
var takeScreenshot = function() {
//myPlayer.pause();
var height = myPlayer.videoHeight(), width = myPlayer.videoWidth(),
aspect = height / width;
@ -354,6 +354,10 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') { @@ -354,6 +354,10 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') {
});
}
myPlayer.play();
//myPlayer.play();
};
myPlayer.one('playing', function() {
setTimeout(takeScreenshot, 1000);
});
}
Loading…
Cancel
Save