mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-04 14:30:29 +03:00
Improve-auth-media (#1933)
* fix set power level broken after sdk update * add media authentication hook * fix service worker types * fix service worker not working in dev mode * fix env mode check when registering sw
This commit is contained in:
parent
4dfce32730
commit
96df140153
38 changed files with 100 additions and 124 deletions
|
|
@ -26,7 +26,7 @@ import { getFileSrcUrl } from './util';
|
|||
import { bytesToSize } from '../../../../util/common';
|
||||
import { millisecondsToMinutesAndSeconds } from '../../../utils/common';
|
||||
import { mxcUrlToHttp } from '../../../utils/matrix';
|
||||
import { useSpecVersions } from '../../../hooks/useSpecVersions';
|
||||
import { useMediaAuthentication } from '../../../hooks/useMediaAuthentication';
|
||||
|
||||
type RenderVideoProps = {
|
||||
title: string;
|
||||
|
|
@ -63,8 +63,7 @@ export const VideoContent = as<'div', VideoContentProps>(
|
|||
ref
|
||||
) => {
|
||||
const mx = useMatrixClient();
|
||||
const { versions } = useSpecVersions();
|
||||
const useAuthentication = versions.includes('v1.11');
|
||||
const useAuthentication = useMediaAuthentication();
|
||||
const blurHash = info.thumbnail_info?.[MATRIX_BLUR_HASH_PROPERTY_NAME];
|
||||
|
||||
const [load, setLoad] = useState(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue