Browse Source

add screenshot button

master
filesite 4 months ago
parent
commit
971971d5fb
  1. 6
      themes/beauty/views/site/player.php
  2. 4
      www/js/beauty.js

6
themes/beauty/views/site/player.php

@ -38,8 +38,12 @@ @@ -38,8 +38,12 @@
<source src="<?php echo $viewData['videoUrl']; ?>" type="video/mp4">
</video>
<div class="text-right mt-2 mr-1">
<button class="btn btn-default mr-1 btn-snapshot">
<img src="/img/beauty/video_dir.png" alt="download icon" width="20">
生成封面图
</button>
<a class="btn btn-default" href="<?php echo $viewData['videoUrl']; ?>&download=1">
<img src="/img/download.png" alt="download icon" width="20">
下载视频
</a>
</div>

4
www/js/beauty.js

@ -370,4 +370,8 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') { @@ -370,4 +370,8 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') {
setTimeout(takeScreenshot, screenshot_start);
});
$('.btn-snapshot').click(function() {
takeScreenshot();
});
}
Loading…
Cancel
Save