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