]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/peertube-videojs-typings.ts
Add player mode to player stats
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-videojs-typings.ts
index a359b8595f4c553f351fbec7be9f5cce5e9777b3..8afb424a780c7b3602729f6d9b0fb3f0711bb1ef 100644 (file)
@@ -7,7 +7,9 @@ import { PlayerMode } from './peertube-player-manager'
 import { PeerTubePlugin } from './peertube-plugin'
 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' {
 
@@ -36,6 +38,8 @@ declare module 'video.js' {
 
     bezels (): void
 
+    stats (options?: StatsCardOptions): StatsForNerdsPlugin
+
     qualityLevels (): QualityLevels
 
     textTracks (): TextTrackList & {
@@ -106,6 +110,10 @@ type PeerTubePluginOptions = {
   videoCaptions: VideoJSCaption[]
 
   stopTime: number | string
+
+  isLive: boolean
+
+  videoUUID: string
 }
 
 type PlaylistPluginOptions = {
@@ -175,6 +183,8 @@ type AutoResolutionUpdateData = {
 }
 
 type PlayerNetworkInfo = {
+  source: 'webtorrent' | 'p2p-media-loader'
+
   http: {
     downloadSpeed: number
     uploadSpeed: number
@@ -189,6 +199,9 @@ type PlayerNetworkInfo = {
     uploaded: number
     numPeers: number
   }
+
+  // In bytes
+  bandwidthEstimate: number
 }
 
 type PlaylistItemOptions = {