]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/assets/player/types/manager-options.ts
Merge branch 'release/4.3.0' into develop
[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
32}
33
34export interface CommonOptions extends CustomizationOptions {
35 playerElement: HTMLVideoElement
36 onPlayerElementChange: (element: HTMLVideoElement) => void
37
38 autoplay: boolean
59a643aa
C
39 forceAutoplay: boolean
40
9597920e
C
41 p2pEnabled: boolean
42
43 nextVideo?: () => void
44 hasNextVideo?: () => boolean
45
46 previousVideo?: () => void
47 hasPreviousVideo?: () => boolean
48
49 playlist?: PlaylistPluginOptions
50
51 videoDuration: number
52 enableHotkeys: boolean
53 inactivityTimeout: number
54 poster: string
55
bd2b51be
C
56 instanceName: string
57
9597920e
C
58 theaterButton: boolean
59 captions: boolean
60
61 videoViewUrl: string
3545e72c 62 authorizationHeader?: () => string
384ba8b7 63
fd3c2e87
C
64 metricsUrl: string
65
9597920e
C
66 embedUrl: string
67 embedTitle: string
68
69 isLive: boolean
70 liveOptions?: {
71 latencyMode: LiveVideoLatencyMode
72 }
73
74 language?: string
75
76 videoCaptions: VideoJSCaption[]
77
78 videoUUID: string
79 videoShortUUID: string
80
9597920e 81 serverUrl: string
3545e72c
C
82 requiresAuth: boolean
83 videoFileToken: () => string
9597920e
C
84
85 errorNotifier: (message: string) => void
86}
87
88export type PeertubePlayerManagerOptions = {
89 common: CommonOptions
90 webtorrent: WebtorrentOptions
91 p2pMediaLoader?: P2PMediaLoaderOptions
92
93 pluginsManager: PluginsManager
94}