您可以尝试运行以下代码来播放和保留视频的最后一帧:
var c = $('canvas')[0]; var context = canvas.getContext('2d'); c.width = 640; c.height = 480; $("#,myPlayer").on('play', function (e) { var $this = this; (function loop() { if (!$this.paused && !$this.ended) { context.drawImage($this, 0, 0, 640, 480); setTimeout(loop, 1000 / 30); } })(); });