Skip to content

Commit

Permalink
fix player positioning/sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
belst committed Apr 10, 2022
1 parent 6310707 commit e007965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions frontend/src/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface PlayerProps {
instance: string,
}


// TODO: make this a directive instead of a component
const Stream: Component<PlayerProps & JSX.HTMLAttributes<HTMLDivElement>> = (props) => {
let ref: HTMLDivElement;

Expand Down Expand Up @@ -48,7 +48,9 @@ const Stream: Component<PlayerProps & JSX.HTMLAttributes<HTMLDivElement>> = (pro
});

return (
<div {...divProps} ref={ref}></div>
<div {...divProps}>
<div ref={ref}></div>
</div>
);
};

Expand Down
5 changes: 3 additions & 2 deletions frontend/src/Stream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ const Stream: Component = () => {
'aspect-ratio': '16 / 9',
'max-width': '100%',
'max-height': 'calc(100vh - 48px - 16px - 16px)',
margin: '0 auto'
};

return (
<>
<Title value={params.user} />
<div style={css}>
<Player url={`wss://${endpoint}/ws/${params.user}`} instance={params.user} autoplay={true} id="player"></Player>
<div>
<Player style={css} url={`wss://${endpoint}/ws/${params.user}`} instance={params.user} autoplay={true} id="player"></Player>
</div>
</>
);
Expand Down

0 comments on commit e007965

Please sign in to comment.