Sfoglia il codice sorgente

Merge pull request #5848 from sebavan/master

Video Texture Fix
sebavan 6 anni fa
parent
commit
2d0b86d666
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      src/Materials/Textures/videoTexture.ts

+ 3 - 0
src/Materials/Textures/videoTexture.ts

@@ -196,7 +196,10 @@ export class VideoTexture extends Texture {
         if (!this.video.autoplay && !this._settings.poster) {
             let oldHandler = this.video.onplaying;
             let error = false;
+            let oldMuted = this.video.muted;
+            this.video.muted = true;
             this.video.onplaying = () => {
+                this.video.muted = oldMuted;
                 this.video.onplaying = oldHandler;
                 this._texture!.isReady = true;
                 this._updateInternalTexture();