diff options
author | Chocobozzz <me@florianbigard.com> | 2019-01-11 16:44:45 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-01-14 09:07:08 +0100 |
commit | c32bf839c11557cac527ca5f181d1ce39fc80974 (patch) | |
tree | 9be808496cb8381d09c9b334c6169ca70411e75e /client/src/assets/player/peertube-player.ts | |
parent | f242c2e01e3423ad63a9a6d904062256d60b6971 (diff) | |
download | PeerTube-c32bf839c11557cac527ca5f181d1ce39fc80974.tar.gz PeerTube-c32bf839c11557cac527ca5f181d1ce39fc80974.tar.zst PeerTube-c32bf839c11557cac527ca5f181d1ce39fc80974.zip |
Fix captions in HTTP fallback
Diffstat (limited to 'client/src/assets/player/peertube-player.ts')
-rw-r--r-- | client/src/assets/player/peertube-player.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/assets/player/peertube-player.ts b/client/src/assets/player/peertube-player.ts index e0e063838..2de6d7fef 100644 --- a/client/src/assets/player/peertube-player.ts +++ b/client/src/assets/player/peertube-player.ts | |||
@@ -254,6 +254,10 @@ function loadLocaleInVideoJS (serverUrl: string, videojs: any, locale: string) { | |||
254 | loadLocaleInVideoJS.cache[path] = json | 254 | loadLocaleInVideoJS.cache[path] = json |
255 | return json | 255 | return json |
256 | }) | 256 | }) |
257 | .catch(err => { | ||
258 | console.error('Cannot get player translations', err) | ||
259 | return undefined | ||
260 | }) | ||
257 | } | 261 | } |
258 | 262 | ||
259 | const completeLocale = getCompleteLocale(locale) | 263 | const completeLocale = getCompleteLocale(locale) |
@@ -270,6 +274,10 @@ function getServerTranslations (serverUrl: string, locale: string) { | |||
270 | 274 | ||
271 | return fetch(path + '/server.json') | 275 | return fetch(path + '/server.json') |
272 | .then(res => res.json()) | 276 | .then(res => res.json()) |
277 | .catch(err => { | ||
278 | console.error('Cannot get server translations', err) | ||
279 | return undefined | ||
280 | }) | ||
273 | } | 281 | } |
274 | 282 | ||
275 | // ############################################################################ | 283 | // ############################################################################ |