Merge branch '7w1:dev' into fix/caddy-port
This commit is contained in:
4 files changed
+26
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
---
|
||||
|
||||
Fix picture in picture setting not effecting element-call
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
---
|
||||
|
||||
Fixed an issue where the app would fail to load after completing SSO login (e.g., logging in with matrix.org). Users are now correctly redirected to the app after SSO authentication completes.
|
||||
+1
-1
@@ -92,6 +92,6 @@
|
||||
</script>
|
||||
<div id="root"></div>
|
||||
<div id="portalContainer"></div>
|
||||
<script type="module" src="./src/index.tsx"></script>
|
||||
<script type="module" src="/src/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,6 +2,8 @@ import { createContext, RefObject, useCallback, useContext, useEffect, useState
|
||||
import { MatrixRTCSession } from 'matrix-js-sdk/lib/matrixrtc/MatrixRTCSession';
|
||||
import { MatrixClient, Room } from 'matrix-js-sdk';
|
||||
import { useSetAtom } from 'jotai';
|
||||
import { settingsAtom } from '$state/settings';
|
||||
import { useSetting } from '$state/hooks/settings';
|
||||
import {
|
||||
CallEmbed,
|
||||
ElementCallThemeKind,
|
||||
@@ -77,6 +79,19 @@ export const useCallStart = (dm = false) => {
|
||||
|
||||
export const useCallJoined = (embed?: CallEmbed): boolean => {
|
||||
const [joined, setJoined] = useState(embed?.joined ?? false);
|
||||
const [allowPip] = useSetting(settingsAtom, 'allowPipVideos');
|
||||
|
||||
if (embed && allowPip) {
|
||||
const removeDisablePictureInPicture = (mutated: any) => {
|
||||
mutated.forEach((event: any) => {
|
||||
Array.from(event.target.getElementsByTagName('video')).forEach((video: any) => {
|
||||
video.removeAttribute('disablepictureinpicture');
|
||||
});
|
||||
});
|
||||
};
|
||||
const pipObserver = new MutationObserver(removeDisablePictureInPicture);
|
||||
pipObserver.observe(embed.iframe.contentDocument!, { subtree: true, childList: true });
|
||||
}
|
||||
|
||||
useClientWidgetApiEvent(
|
||||
embed?.call,
|
||||
|
||||
Reference in new issue
Block a user