Skip to content

Commit

Permalink
fix(packages): components - new video player fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnycrich committed May 22, 2024
1 parent dbef3fc commit 03f81ad
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions packages/components/src/video.v2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Controls = (props: ControlsProps) => {
<div
className={`max-w-2xl flex flex-col px-5 bottom-0 rounded-[5px] bg-opacity-50 ${
props.theme.bg
} ${props.fullscreen ? 'w-1/2' : 'w-2/3'}`}
} w-full ${props.fullscreen ? 'lg:w-1/2' : 'lg:w-2/3'}`}
>
<Box
sx={{
Expand Down Expand Up @@ -196,7 +196,7 @@ const Controls = (props: ControlsProps) => {
{props.fullscreen ? <FullscreenExitIcon /> : <FullscreenIcon />}
</IconButton>
<Box
className={`flex flex-row items-center transition-all duration-[420ms] mr-5 ${
className={`flex flex-row items-center transition-all duration-[420ms] lg:mr-5 ${
volumeHover ? 'basis-[50%]' : 'basis-[5%]'
} ${easing}`}
onMouseEnter={() => toggleHover(true)}
Expand All @@ -210,22 +210,24 @@ const Controls = (props: ControlsProps) => {
>
{props.muted ? <VolumeMuteIcon /> : <VolumeUpIcon />}
</IconButton>
<Slider
aria-label="Player Current Volume"
defaultValue={0.5}
value={props.volume * 100}
getAriaValueText={() => {
return props.volume.toString();
}}
onChange={(e: Event, value: number, activeThumb: number) => {
props.onVolumeChangeHandler(e, value.toString());
}}
sx={{
color: props.theme.seekbar,
opacity: volumeHover ? 1 : 0,
transition: 'all 420ms ease',
}}
/>
<span className="hidden lg:inline">
<Slider
aria-label="Player Current Volume"
defaultValue={0.5}
value={props.volume * 100}
getAriaValueText={() => {
return props.volume.toString();
}}
onChange={(e: Event, value: number, activeThumb: number) => {
props.onVolumeChangeHandler(e, value.toString());
}}
sx={{
color: props.theme.seekbar,
opacity: volumeHover ? 1 : 0,
transition: 'all 420ms ease',
}}
/>
</span>
</Box>
</div>
</div>
Expand Down Expand Up @@ -388,7 +390,7 @@ export const Video = ({
toggleOpen(true);
e.preventDefault();
}}
className="relative h-full w-full"
className="relative h-full w-full max-w-[400px]"
>
<Image
alt={
Expand Down

0 comments on commit 03f81ad

Please sign in to comment.