Merge branch 'feature_sfu' into feature_simulcast

This commit is contained in:
David Baker 2023-01-03 22:59:44 +00:00
commit 28946d0774
134 changed files with 1071 additions and 128 deletions

View file

@ -1,3 +1,19 @@
/*
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.videoGrid {
position: relative;
overflow: hidden;

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 Matrix.org Foundation C.I.C.
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 Matrix.org Foundation C.I.C.
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,3 +1,19 @@
/*
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.videoTile {
position: absolute;
will-change: transform, width, height, opacity, box-shadow;

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 Matrix.org Foundation C.I.C.
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 Matrix.org Foundation C.I.C.
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,3 +1,19 @@
/*
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.videoTileSettingsModal {
width: 700px;
height: 316px;

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 Matrix.org Foundation C.I.C.
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -15,6 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { logger } from "matrix-js-sdk/src/logger";
import { useCallback, useEffect, useState } from "react";
import { useEventTarget } from "../useEvents";
@ -36,7 +37,13 @@ export function useFullscreen(ref: React.RefObject<HTMLElement>): {
setFullscreenParticipant(null);
} else {
try {
ref.current.requestFullscreen();
if (ref.current.requestFullscreen) {
ref.current.requestFullscreen();
} else if (ref.current.webkitRequestFullscreen) {
ref.current.webkitRequestFullscreen();
} else {
logger.error("No available fullscreen API!");
}
setFullscreenParticipant(tileDes);
} catch (error) {
console.warn("Failed to fullscreen:", error);
@ -47,16 +54,23 @@ export function useFullscreen(ref: React.RefObject<HTMLElement>): {
);
const onFullscreenChanged = useCallback(() => {
if (!document.fullscreenElement) {
if (!document.fullscreenElement && !document.webkitFullscreenElement) {
setFullscreenParticipant(null);
}
}, [setFullscreenParticipant]);
useEventTarget(ref.current, "fullscreenchange", onFullscreenChanged);
useEventTarget(ref.current, "webkitfullscreenchange", onFullscreenChanged);
useEffect(() => {
if (disposed) {
document.exitFullscreen();
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else {
logger.error("No available fullscreen API!");
}
setFullscreenParticipant(null);
}
}, [disposed]);

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 Matrix.org Foundation C.I.C.
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/*
Copyright 2022 Matrix.org Foundation C.I.C.
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.