]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/assets/player/types/manager-options.ts
Prevent invalid end watch section warnings
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / types / manager-options.ts
CommitLineData
9597920e
C
1import { PluginsManager } from '@root-helpers/plugins-manager'
2import { LiveVideoLatencyMode, VideoFile } from '@shared/models'
384ba8b7 3import { PlaylistPluginOptions, VideoJSCaption } from './peertube-videojs-typings'
9597920e
C
4
5export type PlayerMode = 'webtorrent' | 'p2p-media-loader'
6
7export type WebtorrentOptions = {
8 videoFiles: VideoFile[]
9}
10
11export type P2PMediaLoaderOptions = {
12 playlistUrl: string
13 segmentsSha256Url: string
14 trackerAnnounce: string[]
15 redundancyBaseUrls: string[]
16 videoFiles: VideoFile[]
17}
18
19export interface CustomizationOptions {
20 startTime: number | string
21 stopTime: number | string
22
23 controls?: boolean
60f013e1
C
24 controlBar?: boolean
25
9597920e
C
26 muted?: boolean
27 loop?: boolean
28 subtitle?: string
29 resume?: string
30
31 peertubeLink: boolean
0e08a5e7 32
4fe7cde2 33 playbackRate?: number | string
9597920e
C
34}
35
36export interface CommonOptions extends CustomizationOptions {
37 playerElement: HTMLVideoElement
38 onPlayerElementChange: (element: HTMLVideoElement) => void
39
40 autoplay: boolean
59a643aa
C
41 forceAutoplay: boolean
42
9597920e
C
43 p2pEnabled: boolean
44
45 nextVideo?: () => void
46 hasNextVideo?: () => boolean
47
48 previousVideo?: () => void
49 hasPreviousVideo?: () => boolean
50
51 playlist?: PlaylistPluginOptions
52
53 videoDuration: number
54 enableHotkeys: boolean
55 inactivityTimeout: number
56 poster: string
57
6de07622
C
58 videoViewIntervalMs: number
59
bd2b51be
C
60 instanceName: string
61
9597920e
C
62 theaterButton: boolean
63 captions: boolean
64
65 videoViewUrl: string
3545e72c 66 authorizationHeader?: () => string
384ba8b7 67
fd3c2e87
C
68 metricsUrl: string
69
9597920e
C
70 embedUrl: string
71 embedTitle: string
72
73 isLive: boolean
74 liveOptions?: {
75 latencyMode: LiveVideoLatencyMode
76 }
77
78 language?: string
79
80 videoCaptions: VideoJSCaption[]
81
82 videoUUID: string
83 videoShortUUID: string
84
9597920e 85 serverUrl: string
3545e72c
C
86 requiresAuth: boolean
87 videoFileToken: () => string
9597920e
C
88
89 errorNotifier: (message: string) => void
90}
91
92export type PeertubePlayerManagerOptions = {
93 common: CommonOptions
94 webtorrent: WebtorrentOptions
95 p2pMediaLoader?: P2PMediaLoaderOptions
96
97 pluginsManager: PluginsManager
98}