|
|
|
@ -254,16 +254,23 @@ if ($('#pr-player').length > 0 && typeof(videojs) != 'undefined') {
@@ -254,16 +254,23 @@ if ($('#pr-player').length > 0 && typeof(videojs) != 'undefined') {
|
|
|
|
|
ctx.drawImage( video, 0, 0, canvas.width, canvas.height ); |
|
|
|
|
|
|
|
|
|
var snapshotImg = canvas.toDataURL('image/jpeg'); |
|
|
|
|
|
|
|
|
|
//更新视频封面图和视频时长
|
|
|
|
|
$('#poster_'+mc_video_id).attr('src', snapshotImg); |
|
|
|
|
$('#poster_'+mc_video_id).parent('a').find('.duration').text(formatDuration(myPlayer.duration())); |
|
|
|
|
|
|
|
|
|
saveVideoMeta(mc_video_id, { |
|
|
|
|
duration: myPlayer.duration(), |
|
|
|
|
snapshot: snapshotImg |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
mc_video_id = null; |
|
|
|
|
|
|
|
|
|
tryToGetVideoSnapshot(); //go next
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
setInterval(tryToGetVideoSnapshot, 1000); |
|
|
|
|
setInterval(tryToGetVideoSnapshot, 500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//视频列表封面图加载
|
|
|
|
|