diff options
Diffstat (limited to 'client/src/assets/player/peertube-videojs-typings.ts')
-rw-r--r-- | client/src/assets/player/peertube-videojs-typings.ts | 25 |
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 @@ | |||
1 | import { Config, Level } from 'hls.js' | 1 | import { Config, Level } from 'hls.js' |
2 | import videojs from 'video.js' | 2 | import videojs from 'video.js' |
3 | import { VideoFile } from '@shared/models' | 3 | import { VideoFile, VideoPlaylist, VideoPlaylistElement } from '@shared/models' |
4 | import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin' | 4 | import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin' |
5 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' | 5 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' |
6 | import { PlayerMode } from './peertube-player-manager' | 6 | import { PlayerMode } from './peertube-player-manager' |
7 | import { PeerTubePlugin } from './peertube-plugin' | 7 | import { PeerTubePlugin } from './peertube-plugin' |
8 | import { PlaylistPlugin } from './playlist/playlist-plugin' | ||
8 | import { EndCardOptions } from './upnext/end-card' | 9 | import { EndCardOptions } from './upnext/end-card' |
9 | import { WebTorrentPlugin } from './webtorrent/webtorrent-plugin' | 10 | import { 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 | ||
111 | type PlaylistPluginOptions = { | ||
112 | elements: VideoPlaylistElement[] | ||
113 | |||
114 | playlist: VideoPlaylist | ||
115 | |||
116 | getCurrentPosition: () => number | ||
117 | |||
118 | onItemClicked: (element: VideoPlaylistElement) => void | ||
119 | } | ||
120 | |||
108 | type WebtorrentPluginOptions = { | 121 | type WebtorrentPluginOptions = { |
109 | playerElement: HTMLVideoElement | 122 | playerElement: HTMLVideoElement |
110 | 123 | ||
@@ -125,6 +138,8 @@ type P2PMediaLoaderPluginOptions = { | |||
125 | } | 138 | } |
126 | 139 | ||
127 | type VideoJSPluginOptions = { | 140 | type 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 | ||
188 | type PlaylistItemOptions = { | ||
189 | element: VideoPlaylistElement | ||
190 | |||
191 | onClicked: Function | ||
192 | } | ||
193 | |||
173 | export { | 194 | export { |
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, |