diff --git a/web/dist/vap.js b/web/dist/vap.js index 45556aa2..f136543c 100644 --- a/web/dist/vap.js +++ b/web/dist/vap.js @@ -1922,7 +1922,7 @@ var _this2 = this; var timePoint = info && info.mediaTime >= 0 ? info.mediaTime : this.video.currentTime; - var frame = Math.round(timePoint * this.options.fps) + this.options.offset; + var frame = info && info.presentedFrames > 0 ? info.presentedFrames - 1 : Math.round(timePoint * this.options.fps) + this.options.offset; var frameCbs = this.events['frame'] || []; frameCbs.forEach(function (cb) { cb(frame + 1, timePoint); @@ -1998,8 +1998,9 @@ if (canvas) { canvas.parentNode && canvas.parentNode.removeChild(canvas); - } // glUtil.cleanWebGL(gl, this.shaders, this.program, this.textures, this.buffers) + } + gl.clear(gl.COLOR_BUFFER_BIT); // glUtil.cleanWebGL(gl, this.shaders, this.program, this.textures, this.buffers) get(getPrototypeOf$1(WebglRenderVap.prototype), "destroy", this).call(this); diff --git a/web/dist/vap.min.js b/web/dist/vap.min.js index 48b0fbc0..06f712bf 100644 --- a/web/dist/vap.min.js +++ b/web/dist/vap.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Vap=e()}(this,function(){"use strict";var r=function(t){if(Array.isArray(t))return t};var n=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}};var o=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r 0)) {\n srcIndex = int(image_pos[i]);\n \n x1 = image_pos[i+1];\n x2 = image_pos[i+2];\n y1 = image_pos[i+3];\n y2 = image_pos[i+4];\n \n mx1 = image_pos[i+5];\n mx2 = image_pos[i+6];\n my1 = image_pos[i+7];\n my2 = image_pos[i+8];\n \n \n if (v_texcoord.s>x1 && v_texcoord.sy1 && v_texcoord.tt.length)&&(e=t.length);for(var r=0,n=new Array(e);r 0)) {\n srcIndex = int(image_pos[i]);\n \n x1 = image_pos[i+1];\n x2 = image_pos[i+2];\n y1 = image_pos[i+3];\n y2 = image_pos[i+4];\n \n mx1 = image_pos[i+5];\n mx2 = image_pos[i+6];\n my1 = image_pos[i+7];\n my2 = image_pos[i+8];\n \n \n if (v_texcoord.s>x1 && v_texcoord.sy1 && v_texcoord.t