File size: 426 Bytes
3e3029e
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import { VideoOrientation } from "@/app/types"

export function parseVideoOrientation(input?: any): VideoOrientation {
  const orientation = `${input || ""}`.trim().toLowerCase() || "square"

  return (
    (orientation === "vertical" || orientation === "portrait") ? VideoOrientation.PORTRAIT
    : (orientation === "horizontal" || orientation === "landscape") ? VideoOrientation.LANDSCAPE
    : VideoOrientation.SQUARE
  )
}