]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/peertube-videojs-typings.ts
HLS v1 support
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-videojs-typings.ts
index cf92e5f08a4b626fcb8b31be11e17d2380eb45f9..f0eb129d4153df394a56455544e866769d19d150 100644 (file)
@@ -1,4 +1,4 @@
-import { Config, Level } from 'hls.js'
+import { HlsConfig, Level } from 'hls.js'
 import videojs from 'video.js'
 import { VideoFile, VideoPlaylist, VideoPlaylistElement } from '@shared/models'
 import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin'
@@ -9,6 +9,7 @@ import { PlaylistPlugin } from './playlist/playlist-plugin'
 import { EndCardOptions } from './upnext/end-card'
 import { StatsCardOptions } from './stats/stats-card'
 import { WebTorrentPlugin } from './webtorrent/webtorrent-plugin'
+import { StatsForNerdsPlugin } from './stats/stats-plugin'
 
 declare module 'video.js' {
 
@@ -37,7 +38,7 @@ declare module 'video.js' {
 
     bezels (): void
 
-    stats (options?: Partial<StatsCardOptions>): any
+    stats (options?: StatsCardOptions): StatsForNerdsPlugin
 
     qualityLevels (): QualityLevels
 
@@ -59,7 +60,7 @@ export interface VideoJSTechHLS extends videojs.Tech {
 }
 
 export interface HlsjsConfigHandlerOptions {
-  hlsjsConfig?: Config & { cueHandler: any }// FIXME: typings
+  hlsjsConfig?: HlsConfig & { cueHandler: any }// FIXME: typings
   captionConfig?: any // FIXME: typings
 
   levelLabelHandler?: (level: Level) => string
@@ -131,6 +132,10 @@ type NextPreviousVideoButtonOptions = {
   isDisabled: () => boolean
 }
 
+type PeerTubeLinkButtonOptions = {
+  shortUUID: string
+}
+
 type WebtorrentPluginOptions = {
   playerElement: HTMLVideoElement
 
@@ -198,6 +203,9 @@ type PlayerNetworkInfo = {
     uploaded: number
     numPeers: number
   }
+
+  // In bytes
+  bandwidthEstimate: number
 }
 
 type PlaylistItemOptions = {
@@ -221,5 +229,6 @@ export {
   VideoJSPluginOptions,
   LoadedQualityData,
   QualityLevelRepresentation,
+  PeerTubeLinkButtonOptions,
   QualityLevels
 }