File size: 1,256 Bytes
2068834
 
 
 
 
 
 
 
d079437
 
2068834
 
 
5eac338
2068834
 
 
 
5eac338
 
 
 
 
 
 
2068834
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

import { MdZoomOutMap } from "react-icons/md"

import { cn } from "@/lib/utils"
import { useFullscreenStatus } from "@/lib/hooks"

import { UniversalPlayer } from "./UniversalPlayer"
import { PlayerControls } from "./PlayerControls"
import { useUI } from "@/services/ui"
import { useTheme } from "@/services/ui/useTheme"

export function Monitor() {
  const [isFullscreen, setFullscreen, ref] = useFullscreenStatus()
  const theme = useTheme()

  return (
    <div
      ref={ref as any}
      className={cn(`
      flex flex-col w-full h-full
      overflow-hidden items-center justify-between
      px-2
      transition-colors
    `)}
    style={{ background: theme?.monitorBgColor || theme?.defaultBgColor || "" }}>
      <UniversalPlayer />
      <PlayerControls />
      <div className="z-20 absolute right-0 top-8">
        <div
          onClick={() => setFullscreen()}
          className={cn(
          `p-2 rounded-full cursor-pointer`,
          `transition-all duration-100 ease-in-out`,
          isFullscreen ? `opacity-0` : `opacity-70 hover:opacity-100 scale-95 hover:scale-100`
          )}>
          {/*<BiFullscreen className="w-8 h-8" />*/}
          <MdZoomOutMap className="w-8 h-8" />
        </div>
      </div>
    </div>
  )
}