X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fassets%2Fplayer%2Fpeertube-videojs-typings.ts;h=a96b0bc8c4ab07e3889d1b44f50716ceacf9a579;hb=c47106315ae3c403239cda29c49b4bba51ddccb2;hp=fff992a6f37985a42ea3389aa76760fc145d6eaa;hpb=3b6f205c34bb931de0323581edf991ca33256e6b;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/assets/player/peertube-videojs-typings.ts b/client/src/assets/player/peertube-videojs-typings.ts index fff992a6f..a96b0bc8c 100644 --- a/client/src/assets/player/peertube-videojs-typings.ts +++ b/client/src/assets/player/peertube-videojs-typings.ts @@ -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