Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/components/media-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down