From c32bf839c11557cac527ca5f181d1ce39fc80974 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 11 Jan 2019 16:44:45 +0100 Subject: Fix captions in HTTP fallback --- client/src/assets/player/peertube-player.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'client/src/assets/player/peertube-player.ts') 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) { loadLocaleInVideoJS.cache[path] = json return json }) + .catch(err => { + console.error('Cannot get player translations', err) + return undefined + }) } const completeLocale = getCompleteLocale(locale) @@ -270,6 +274,10 @@ function getServerTranslations (serverUrl: string, locale: string) { return fetch(path + '/server.json') .then(res => res.json()) + .catch(err => { + console.error('Cannot get server translations', err) + return undefined + }) } // ############################################################################ -- cgit v1.2.3