David Catuhe %!s(int64=7) %!d(string=hai) anos
pai
achega
0e1e320ef2

+ 12 - 0
src/Helpers/babylon.videoDome.ts

@@ -90,5 +90,17 @@ module BABYLON {
                 }
             }
         }
+
+        /**
+         * Releases all associated resources
+         */
+        public dispose(): void {
+            super.dispose();
+
+            this._videoTexture.dispose();
+            this._mesh.dispose();
+            this._material.dispose();
+
+        }
     }
 }

+ 2 - 1
src/Materials/Textures/babylon.videoTexture.ts

@@ -205,11 +205,12 @@
         }
 
         public dispose(): void {
-            super.dispose();
+            super.dispose();            
             this.video.removeEventListener("canplay", this._createInternalTexture);
             this.video.removeEventListener("paused", this._updateInternalTexture);
             this.video.removeEventListener("seeked", this._updateInternalTexture);
             this.video.removeEventListener("emptied", this.reset);
+            this.video.pause();
         }
 
         public static CreateFromWebCam(