Skip to content

Commit

Permalink
Fix teamview video layout, 20 row in queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostya Bats committed Mar 9, 2024
1 parent 635ee46 commit b654bf0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,6 @@ class QueueService {
private val WAIT_TIME = 1.minutes
private val FIRST_TO_SOLVE_WAIT_TIME = 2.minutes
private val FEATURED_WAIT_TIME = 1.minutes
private const val MAX_QUEUE_SIZE = 30
private const val MAX_QUEUE_SIZE = 20
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { pushLog } from "@/redux/debug";
import { GrabberPlayerClient } from "../../../utils/grabber/grabber_player";
import { useAppDispatch } from "@/redux/hooks";
import { MediaType } from "@shared/api";
import c from "../../../config";

// export const TeamImageWrapper = styled.img /*`
// // border-radius: ${({ borderRadius }) => borderRadius};
Expand All @@ -21,6 +22,11 @@ import { MediaType } from "@shared/api";
// border-radius: ${({ borderRadius }) => borderRadius};
// `*/;

export const VideoWrapper = styled.video`
position: absolute;
width: 100%;
border-radius: ${c.GLOBAL_BORDER_RADIUS};
`;

export const TeamWebRTCProxyVideoWrapper = ({ url, setIsLoaded, ...props }) => {
const dispatch = useAppDispatch();
Expand Down Expand Up @@ -53,7 +59,7 @@ export const TeamWebRTCProxyVideoWrapper = ({ url, setIsLoaded, ...props }) => {

return () => rtcRef.current?.close();
}, [url]);
return (<video
return (<VideoWrapper
ref={videoRef}
onError={() => setIsLoaded(false) || dispatch(pushLog("ERROR on loading image in Picture widget"))}
onLoadedData={() => {
Expand Down Expand Up @@ -96,7 +102,7 @@ export const TeamWebRTCGrabberVideoWrapper = ({ media: { url, peerName, streamTy
};
}, [url, peerName, streamType]);

return (<video
return (<VideoWrapper
ref={videoRef}
onLoadedData={() => onLoadStatus(true)}
onError={() => onLoadStatus(false) || dispatch(pushLog("ERROR on loading image in WebRTC widget"))}
Expand Down Expand Up @@ -160,7 +166,7 @@ const teamViewComponentRender: {
},
Video: ({ onLoadStatus, className, media }) => {
return <FullWidthWrapper className={className}>
<video
<VideoWrapper
src={media.url}
onCanPlay={() => onLoadStatus(true)}
onError={() => onLoadStatus(false)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export const Scoreboard = ({ widgetData: { settings } }) => {
return <ScoreboardWrap>
<ScoreboardHeader>
<ScoreboardTitle>
{nameTable[settings.optimismLevel] ?? c.SCOREBOARD_UNDEFINED_NAME} standings
{nameTable[settings.optimismLevel] ?? c.SCOREBOARD_UNDEFINED_NAME} {c.SCOREBOARD_STANDINGS_NAME}
</ScoreboardTitle>
<ScoreboardCaption>
{c.SCOREBOARD_CAPTION}
Expand Down
1 change: 1 addition & 0 deletions src/frontend/overlay/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ config.SCOREBOARD_NORMAL_NAME = "Current";
config.SCOREBOARD_OPTIMISTIC_NAME = "Optimistic";
config.SCOREBOARD_PESSIMISTIC_NAME = "Pessimistic";
config.SCOREBUARD_UNDEFINED_NAME = "??";
config.SCOREBOARD_STANDINGS_NAME = "standings";


config.QUEUE_ROW_FONT_SIZE = config.GLOBAL_DEFAULT_FONT_SIZE;
Expand Down

0 comments on commit b654bf0

Please sign in to comment.