import { CssBaseline } from '@mui/material'; import { StyledEngineProvider, Theme, ThemeProvider, } from '@mui/material/styles'; import { deepmerge } from '@mui/utils'; import { FC, ReactNode, RefObject, memo } from 'react'; import { MediaProvider, MediaProviderProps } from '../../context/MediaProvider'; import { PIPContextProvider } from '../../context/PIPControlsProvider'; import { createPlayerTheme } from '../../theme'; import { blend } from '../../utils/colors'; import { DraggablePopoverProps } from '../draggable-popover/DraggablePopover'; import { MediaContainer } from '../media-container/MediaContainer'; import { useFilePlayerStyles } from '../media-container/useMediaContainerStyles'; import { ExternalStateUpdater } from './components/ExternalStateUpdater'; import { useCorePlayerHook } from './hooks/useCorePlayerHook'; import { CORE_PLAYER_INITIAL_STATE } from './types'; export interface CorePlayerProps extends Partial< Pick< MediaProviderProps, | 'initialState' | 'getHighlightColorBlended' | 'onStoreUpdate' | 'highlights' | 'alarms' | 'isPipEnabled' > >, Pick< DraggablePopoverProps, | 'audioPlaceholder' | 'xAxisDistance' | 'yAxisDistance' | 'pipPortalClassName' > { /** The url of the media file to be played */ url: string; /** CSS class name applied to component */ className?: string; /** A MUI theme to control the stylization of the player . */ theme?: Theme; children: ReactNode; /** Url mime type */ mediaType?: string; /** Builds UI for the PIP Player */ PIPControls?: FC; /**