diff --git a/src/components/media-views.js b/src/components/media-views.js index 0f390433c5..f43d7a8831 100644 --- a/src/components/media-views.js +++ b/src/components/media-views.js @@ -731,6 +731,16 @@ AFRAME.registerComponent("media-video", { texture.minFilter = THREE.LinearFilter; texture.encoding = THREE.sRGBEncoding; + // Firefox seems to have video play (or decode) performance issue. + // Somehow setting RGBA format improves the performance very well. + // Some tickets have been opened for the performance issue but + // I don't think it will be fixed soon. So we set RGBA format for Firefox + // as workaround so far. + // See https://github.com/mozilla/hubs/issues/3470 + if (/firefox/i.test(navigator.userAgent)) { + texture.format = THREE.RGBAFormat; + } + isReady = () => { if (texture.hls && texture.hls.streamController.audioOnly) { audioEl = videoEl;