You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Show sidebar in PiP mode
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -23,4 +23,9 @@ limitations under the License.
|
|||||||
min-width: 160px; // To match .mx_VideoFeed_voice
|
min-width: 160px; // To match .mx_VideoFeed_voice
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column-reverse;
|
flex-direction: column-reverse;
|
||||||
|
|
||||||
|
&.mx_CallViewSidebar_pipMode {
|
||||||
|
top: 16px;
|
||||||
|
bottom: unset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -641,14 +641,15 @@ export default class CallView extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
let sidebar;
|
let sidebar;
|
||||||
if (
|
if (
|
||||||
(!isOnHold && !transfereeCall && !this.props.pipMode) &&
|
(!isOnHold && !transfereeCall) &&
|
||||||
(sidebarShown || isScreensharing)
|
((sidebarShown && this.props.call.type === CallType.Video) || isScreensharing)
|
||||||
) {
|
) {
|
||||||
sidebar = (
|
sidebar = (
|
||||||
<CallViewSidebar
|
<CallViewSidebar
|
||||||
feeds={this.state.secondaryFeeds}
|
feeds={this.state.secondaryFeeds}
|
||||||
call={this.props.call}
|
call={this.props.call}
|
||||||
hideLocalFeeds={isScreensharing && !sidebarShown}
|
hideLocalFeeds={isScreensharing && !sidebarShown}
|
||||||
|
pipMode={this.props.pipMode}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,11 +18,13 @@ import React from "react";
|
|||||||
import { MatrixCall } from "matrix-js-sdk/src/webrtc/call";
|
import { MatrixCall } from "matrix-js-sdk/src/webrtc/call";
|
||||||
import { CallFeed } from "matrix-js-sdk/src/webrtc/callFeed";
|
import { CallFeed } from "matrix-js-sdk/src/webrtc/callFeed";
|
||||||
import VideoFeed from "./VideoFeed";
|
import VideoFeed from "./VideoFeed";
|
||||||
|
import classNames from "classnames";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
feeds: Array<CallFeed>;
|
feeds: Array<CallFeed>;
|
||||||
call: MatrixCall;
|
call: MatrixCall;
|
||||||
hideLocalFeeds: boolean;
|
hideLocalFeeds: boolean;
|
||||||
|
pipMode: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class CallViewSidebar extends React.Component<IProps> {
|
export default class CallViewSidebar extends React.Component<IProps> {
|
||||||
@@ -40,8 +42,12 @@ export default class CallViewSidebar extends React.Component<IProps> {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const className = classNames("mx_CallViewSidebar", {
|
||||||
|
mx_CallViewSidebar_pipMode: this.props.pipMode,
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_CallViewSidebar">
|
<div className={className}>
|
||||||
{ feeds }
|
{ feeds }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user