aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-04 11:42:06 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-08-07 08:58:29 +0200
commit5abc96fca2496f33075796db208fccc3543e0f65 (patch)
tree72da3df83df172a7a66b9ecff9b136e171c830bf /client/src/assets
parenta4ff3100d36f2fe9a4dfc00e8487c28a94433c4f (diff)
downloadPeerTube-5abc96fca2496f33075796db208fccc3543e0f65.tar.gz
PeerTube-5abc96fca2496f33075796db208fccc3543e0f65.tar.zst
PeerTube-5abc96fca2496f33075796db208fccc3543e0f65.zip
Add logic to handle playlist in embed
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/player/peertube-videojs-typings.ts15
-rw-r--r--client/src/assets/player/translations-manager.ts2
2 files changed, 10 insertions, 7 deletions
diff --git a/client/src/assets/player/peertube-videojs-typings.ts b/client/src/assets/player/peertube-videojs-typings.ts
index 9c81fd5bc..1506a04ac 100644
--- a/client/src/assets/player/peertube-videojs-typings.ts
+++ b/client/src/assets/player/peertube-videojs-typings.ts
@@ -1,11 +1,12 @@
1import { PeerTubePlugin } from './peertube-plugin' 1import { Config, Level } from 'hls.js'
2import { WebTorrentPlugin } from './webtorrent/webtorrent-plugin' 2import videojs from 'video.js'
3import { VideoFile } from '@shared/models'
3import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin' 4import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin'
4import { PlayerMode } from './peertube-player-manager'
5import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' 5import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager'
6import { VideoFile } from '@shared/models' 6import { PlayerMode } from './peertube-player-manager'
7import videojs from 'video.js' 7import { PeerTubePlugin } from './peertube-plugin'
8import { Config, Level } from 'hls.js' 8import { EndCardOptions } from './upnext/end-card'
9import { WebTorrentPlugin } from './webtorrent/webtorrent-plugin'
9 10
10declare module 'video.js' { 11declare module 'video.js' {
11 12
@@ -42,6 +43,8 @@ declare module 'video.js' {
42 } 43 }
43 44
44 dock (options: { title: string, description: string }): void 45 dock (options: { title: string, description: string }): void
46
47 upnext (options: Partial<EndCardOptions>): void
45 } 48 }
46} 49}
47 50
diff --git a/client/src/assets/player/translations-manager.ts b/client/src/assets/player/translations-manager.ts
index 631e3feba..d5a09a31a 100644
--- a/client/src/assets/player/translations-manager.ts
+++ b/client/src/assets/player/translations-manager.ts
@@ -3,7 +3,7 @@ import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from
3export class TranslationsManager { 3export class TranslationsManager {
4 private static videojsLocaleCache: { [ path: string ]: any } = {} 4 private static videojsLocaleCache: { [ path: string ]: any } = {}
5 5
6 static getServerTranslations (serverUrl: string, locale: string) { 6 static getServerTranslations (serverUrl: string, locale: string): Promise<{ [id: string]: string }> {
7 const path = TranslationsManager.getLocalePath(serverUrl, locale) 7 const path = TranslationsManager.getLocalePath(serverUrl, locale)
8 // It is the default locale, nothing to translate 8 // It is the default locale, nothing to translate
9 if (!path) return Promise.resolve(undefined) 9 if (!path) return Promise.resolve(undefined)