]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/peertube-videojs-typings.ts
tslint update
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-videojs-typings.ts
index fff992a6f37985a42ea3389aa76760fc145d6eaa..a96b0bc8c4ab07e3889d1b44f50716ceacf9a579 100644 (file)
@@ -4,12 +4,15 @@ import * as videojs from 'video.js'
 
 import { VideoFile } from '../../../../shared/models/videos/video.model'
 import { PeerTubePlugin } from './peertube-plugin'
-import { WebTorrentPlugin } from './webtorrent-plugin'
+import { WebTorrentPlugin } from './webtorrent/webtorrent-plugin'
+import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin'
+import { PlayerMode } from './peertube-player-manager'
 
 declare namespace videojs {
   interface Player {
     peertube (): PeerTubePlugin
     webtorrent (): WebTorrentPlugin
+    p2pMediaLoader (): P2pMediaLoaderPlugin
   }
 }
 
@@ -33,15 +36,18 @@ type UserWatching = {
 }
 
 type PeerTubePluginOptions = {
+  mode: PlayerMode
+
   autoplay: boolean
   videoViewUrl: string
   videoDuration: number
-  startTime: number | string
 
   userWatching?: UserWatching
   subtitle?: string
 
   videoCaptions: VideoJSCaption[]
+
+  stopTime: number | string
 }
 
 type WebtorrentPluginOptions = {
@@ -51,11 +57,16 @@ type WebtorrentPluginOptions = {
   videoDuration: number
 
   videoFiles: VideoFile[]
+
+  startTime: number | string
 }
 
 type P2PMediaLoaderPluginOptions = {
+  redundancyBaseUrls: string[]
   type: string
   src: string
+
+  startTime: number | string
 }
 
 type VideoJSPluginOptions = {
@@ -91,6 +102,13 @@ type AutoResolutionUpdateData = {
 }
 
 type PlayerNetworkInfo = {
+  http: {
+    downloadSpeed: number
+    uploadSpeed: number
+    downloaded: number
+    uploaded: number
+  }
+
   p2p: {
     downloadSpeed: number
     uploadSpeed: number