fix: Fix video and audio loading with authenicated media (#1946)

Appeareantly Firefox (and maybe Chrome) won't let service workers take over requests from <video> and <audio> tags, so we just fetch the URL ourselves.
This commit is contained in:
夜坂雅 2024-09-11 13:13:15 +08:00 committed by GitHub
parent 5482f8e72e
commit f2c31d29a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 3 deletions

View file

@ -71,7 +71,7 @@ export const VideoContent = as<'div', VideoContentProps>(
const [srcState, loadSrc] = useAsyncCallback(
useCallback(
() => getFileSrcUrl(mxcUrlToHttp(mx, url, useAuthentication) ?? '', mimeType, encInfo),
() => getFileSrcUrl(mxcUrlToHttp(mx, url, useAuthentication) ?? '', mimeType, encInfo, true),
[mx, url, useAuthentication, mimeType, encInfo]
)
);