1 import { PluginsManager } from '@root-helpers/plugins-manager'
2 import { LiveVideoLatencyMode, VideoFile } from '@shared/models'
3 import { PlaylistPluginOptions, UserWatching, VideoJSCaption } from './peertube-videojs-typings'
5 export type PlayerMode = 'webtorrent' | 'p2p-media-loader'
7 export type WebtorrentOptions = {
8 videoFiles: VideoFile[]
11 export type P2PMediaLoaderOptions = {
13 segmentsSha256Url: string
14 trackerAnnounce: string[]
15 redundancyBaseUrls: string[]
16 videoFiles: VideoFile[]
19 export interface CustomizationOptions {
20 startTime: number | string
21 stopTime: number | string
32 export interface CommonOptions extends CustomizationOptions {
33 playerElement: HTMLVideoElement
34 onPlayerElementChange: (element: HTMLVideoElement) => void
39 nextVideo?: () => void
40 hasNextVideo?: () => boolean
42 previousVideo?: () => void
43 hasPreviousVideo?: () => boolean
45 playlist?: PlaylistPluginOptions
48 enableHotkeys: boolean
49 inactivityTimeout: number
52 theaterButton: boolean
61 latencyMode: LiveVideoLatencyMode
66 videoCaptions: VideoJSCaption[]
69 videoShortUUID: string
71 userWatching?: UserWatching
75 errorNotifier: (message: string) => void
78 export type PeertubePlayerManagerOptions = {
80 webtorrent: WebtorrentOptions
81 p2pMediaLoader?: P2PMediaLoaderOptions
83 pluginsManager: PluginsManager