Steffen
Well-known member
- Affected version
- 2.2.7
Opus audio files can be uploaded (and rendered as an audio player) when they have a ".ogg" extension. XenForo doesn't recognize them when they have the recommended ".opus" extension (https://en.wikipedia.org/wiki/Opus_(audio_format)). This is easy to fix.
Opus has universal browser support: https://caniuse.com/opus
Diff:
diff --git a/src/XF/App.php b/src/XF/App.php
index 51395a939..7cf644589 100644
--- a/src/XF/App.php
+++ b/src/XF/App.php
@@ -349,6 +349,7 @@ class App implements \ArrayAccess
return [
'mp3' => 'audio/mpeg',
'ogg' => 'audio/ogg',
+ 'opus' => 'audio/ogg',
'wav' => 'audio/wav',
];
};
Opus has universal browser support: https://caniuse.com/opus