diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-04 11:42:06 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-07 08:58:29 +0200 |
commit | 5abc96fca2496f33075796db208fccc3543e0f65 (patch) | |
tree | 72da3df83df172a7a66b9ecff9b136e171c830bf /client/src/assets | |
parent | a4ff3100d36f2fe9a4dfc00e8487c28a94433c4f (diff) | |
download | PeerTube-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.ts | 15 | ||||
-rw-r--r-- | client/src/assets/player/translations-manager.ts | 2 |
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 @@ | |||
1 | import { PeerTubePlugin } from './peertube-plugin' | 1 | import { Config, Level } from 'hls.js' |
2 | import { WebTorrentPlugin } from './webtorrent/webtorrent-plugin' | 2 | import videojs from 'video.js' |
3 | import { VideoFile } from '@shared/models' | ||
3 | import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin' | 4 | import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin' |
4 | import { PlayerMode } from './peertube-player-manager' | ||
5 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' | 5 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' |
6 | import { VideoFile } from '@shared/models' | 6 | import { PlayerMode } from './peertube-player-manager' |
7 | import videojs from 'video.js' | 7 | import { PeerTubePlugin } from './peertube-plugin' |
8 | import { Config, Level } from 'hls.js' | 8 | import { EndCardOptions } from './upnext/end-card' |
9 | import { WebTorrentPlugin } from './webtorrent/webtorrent-plugin' | ||
9 | 10 | ||
10 | declare module 'video.js' { | 11 | declare 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 | |||
3 | export class TranslationsManager { | 3 | export 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) |