Fix TypeScript ref typings and lint errors
This commit is contained in:
+4
-4
@@ -1,4 +1,4 @@
|
||||
import type { CSSProperties, RefObject } from 'react'
|
||||
import type { CSSProperties, MutableRefObject } from 'react'
|
||||
|
||||
export interface SubtitleTrack {
|
||||
src: string
|
||||
@@ -87,8 +87,8 @@ export interface PlayerContextValue {
|
||||
videoState: VideoState
|
||||
uiState: UIState
|
||||
settings: PlayerSettings
|
||||
videoRef: RefObject<HTMLVideoElement>
|
||||
containerRef: RefObject<HTMLDivElement>
|
||||
videoRef: MutableRefObject<HTMLVideoElement | null>
|
||||
containerRef: MutableRefObject<HTMLDivElement | null>
|
||||
|
||||
// Video controls
|
||||
play: () => void
|
||||
@@ -109,7 +109,7 @@ export interface PlayerContextValue {
|
||||
toggleSettings: () => void
|
||||
|
||||
// Settings
|
||||
setQuality: (quality: VideoQuality) => void
|
||||
setQuality: (quality: VideoQuality | null) => void
|
||||
setSubtitle: (subtitle: SubtitleTrack | null) => void
|
||||
setAudioTrack: (audioTrack: AudioTrack | null) => void
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user