use site language as audioTrack if possible

This commit is contained in:
j 2014-07-24 19:35:25 +02:00
parent afae94a1be
commit 2cb1873e51

View file

@ -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 = []; options.annotations = [];
pandora.site.layers.forEach(function(layer, i) { pandora.site.layers.forEach(function(layer, i) {
options.annotations[i] = Ox.extend({}, layer, { options.annotations[i] = Ox.extend({}, layer, {