1 import { PluginsManager } from '@root-helpers/plugins-manager'
2 import { LiveVideoLatencyMode, VideoFile } from '@shared/models'
3 import { PlaylistPluginOptions, 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
34 export interface CommonOptions extends CustomizationOptions {
35 playerElement: HTMLVideoElement
36 onPlayerElementChange: (element: HTMLVideoElement) => void
41 nextVideo?: () => void
42 hasNextVideo?: () => boolean
44 previousVideo?: () => void
45 hasPreviousVideo?: () => boolean
47 playlist?: PlaylistPluginOptions
50 enableHotkeys: boolean
51 inactivityTimeout: number
56 theaterButton: boolean
60 authorizationHeader?: string
67 latencyMode: LiveVideoLatencyMode
72 videoCaptions: VideoJSCaption[]
75 videoShortUUID: string
79 errorNotifier: (message: string) => void
82 export type PeertubePlayerManagerOptions = {
84 webtorrent: WebtorrentOptions
85 p2pMediaLoader?: P2PMediaLoaderOptions
87 pluginsManager: PluginsManager