aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-player.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-11 16:44:45 +0100
committerChocobozzz <me@florianbigard.com>2019-01-14 09:07:08 +0100
commitc32bf839c11557cac527ca5f181d1ce39fc80974 (patch)
tree9be808496cb8381d09c9b334c6169ca70411e75e /client/src/assets/player/peertube-player.ts
parentf242c2e01e3423ad63a9a6d904062256d60b6971 (diff)
downloadPeerTube-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.ts8
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// ############################################################################