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') {
preload: 'auto' preload: 'auto'
}); });
myPlayer.one('playing', function() { var takeScreenshot = function() {
myPlayer.pause(); //myPlayer.pause();
var height = myPlayer.videoHeight(), width = myPlayer.videoWidth(), var height = myPlayer.videoHeight(), width = myPlayer.videoWidth(),
aspect = height / width; aspect = height / width;
@ -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