aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-videojs-typings.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/peertube-videojs-typings.ts')
-rw-r--r--client/src/assets/player/peertube-videojs-typings.ts25
1 files changed, 24 insertions, 1 deletions
diff --git a/client/src/assets/player/peertube-videojs-typings.ts b/client/src/assets/player/peertube-videojs-typings.ts
index 1506a04ac..b72c4b0f9 100644
--- a/client/src/assets/player/peertube-videojs-typings.ts
+++ b/client/src/assets/player/peertube-videojs-typings.ts
@@ -1,10 +1,11 @@
1import { Config, Level } from 'hls.js' 1import { Config, Level } from 'hls.js'
2import videojs from 'video.js' 2import videojs from 'video.js'
3import { VideoFile } from '@shared/models' 3import { VideoFile, VideoPlaylist, VideoPlaylistElement } from '@shared/models'
4import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin' 4import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin'
5import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' 5import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager'
6import { PlayerMode } from './peertube-player-manager' 6import { PlayerMode } from './peertube-player-manager'
7import { PeerTubePlugin } from './peertube-plugin' 7import { PeerTubePlugin } from './peertube-plugin'
8import { PlaylistPlugin } from './playlist/playlist-plugin'
8import { EndCardOptions } from './upnext/end-card' 9import { EndCardOptions } from './upnext/end-card'
9import { WebTorrentPlugin } from './webtorrent/webtorrent-plugin' 10import { WebTorrentPlugin } from './webtorrent/webtorrent-plugin'
10 11
@@ -45,6 +46,8 @@ declare module 'video.js' {
45 dock (options: { title: string, description: string }): void 46 dock (options: { title: string, description: string }): void
46 47
47 upnext (options: Partial<EndCardOptions>): void 48 upnext (options: Partial<EndCardOptions>): void
49
50 playlist (): PlaylistPlugin
48 } 51 }
49} 52}
50 53
@@ -105,6 +108,16 @@ type PeerTubePluginOptions = {
105 stopTime: number | string 108 stopTime: number | string
106} 109}
107 110
111type PlaylistPluginOptions = {
112 elements: VideoPlaylistElement[]
113
114 playlist: VideoPlaylist
115
116 getCurrentPosition: () => number
117
118 onItemClicked: (element: VideoPlaylistElement) => void
119}
120
108type WebtorrentPluginOptions = { 121type WebtorrentPluginOptions = {
109 playerElement: HTMLVideoElement 122 playerElement: HTMLVideoElement
110 123
@@ -125,6 +138,8 @@ type P2PMediaLoaderPluginOptions = {
125} 138}
126 139
127type VideoJSPluginOptions = { 140type VideoJSPluginOptions = {
141 playlist?: PlaylistPluginOptions
142
128 peertube: PeerTubePluginOptions 143 peertube: PeerTubePluginOptions
129 144
130 webtorrent?: WebtorrentPluginOptions 145 webtorrent?: WebtorrentPluginOptions
@@ -170,10 +185,18 @@ type PlayerNetworkInfo = {
170 } 185 }
171} 186}
172 187
188type PlaylistItemOptions = {
189 element: VideoPlaylistElement
190
191 onClicked: Function
192}
193
173export { 194export {
174 PlayerNetworkInfo, 195 PlayerNetworkInfo,
196 PlaylistItemOptions,
175 ResolutionUpdateData, 197 ResolutionUpdateData,
176 AutoResolutionUpdateData, 198 AutoResolutionUpdateData,
199 PlaylistPluginOptions,
177 VideoJSCaption, 200 VideoJSCaption,
178 UserWatching, 201 UserWatching,
179 PeerTubePluginOptions, 202 PeerTubePluginOptions,