From 2cb1873e51e1e259b740b02626b94b7f7a68a5ff Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 24 Jul 2014 19:35:25 +0200 Subject: [PATCH] use site language as audioTrack if possible --- static/js/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/utils.js b/static/js/utils.js index d25c729a..f9a5f972 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -1805,7 +1805,11 @@ pandora.getVideoOptions = function(data) { }); } }); - options.audioTrack = data.audioTracks ? Ox.getLanguageNameByCode(data.audioTracks[0]) : void 0; + options.audioTrack = data.audioTracks ? Ox.getLanguageNameByCode( + Ox.contains(data.audioTracks, pandora.site.language) + ? pandora.site.language + : data.audioTracks[0] + ) : void 0; options.annotations = []; pandora.site.layers.forEach(function(layer, i) { options.annotations[i] = Ox.extend({}, layer, {