Browse Source

chore(Web): update lib

hujinliang 3 years ago
parent
commit
55f37f1c9a
3 changed files with 4 additions and 3 deletions
  1. 3 2
      web/dist/vap.js
  2. 0 0
      web/dist/vap.min.js
  3. 1 1
      web/package.json

+ 3 - 2
web/dist/vap.js

@@ -1922,7 +1922,7 @@
         var _this2 = this;
         var _this2 = this;
 
 
         var timePoint = info && info.mediaTime >= 0 ? info.mediaTime : this.video.currentTime;
         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'] || [];
         var frameCbs = this.events['frame'] || [];
         frameCbs.forEach(function (cb) {
         frameCbs.forEach(function (cb) {
           cb(frame + 1, timePoint);
           cb(frame + 1, timePoint);
@@ -1998,8 +1998,9 @@
 
 
         if (canvas) {
         if (canvas) {
           canvas.parentNode && canvas.parentNode.removeChild(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);
         get(getPrototypeOf$1(WebglRenderVap.prototype), "destroy", this).call(this);
 
 

File diff suppressed because it is too large
+ 0 - 0
web/dist/vap.min.js


+ 1 - 1
web/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "video-animation-player",
   "name": "video-animation-player",
-  "version": "0.2.10",
+  "version": "0.2.11",
   "description": "webgl动画特效组件",
   "description": "webgl动画特效组件",
   "main": "dist/vap.js",
   "main": "dist/vap.js",
   "scripts": {
   "scripts": {

Some files were not shown because too many files changed in this diff