pass subtitlesDefaultTrack and resolution in editor

This commit is contained in:
j 2014-09-16 13:07:09 +02:00
commit 8aa95d35f2
2 changed files with 5 additions and 6 deletions

View file

@ -431,6 +431,8 @@ pandora.ui.editPanel = function(isEmbed) {
paused: true,
showIconOnLoad: true,
subtitles: getSubtitles(edit.clips),
subtitlesDefaultTrack: Ox.getLanguageNameByCode(pandora.site.language),
subtitlesTrack: Ox.getLanguageNameByCode(pandora.site.language),
timeline: getSmallTimelineURL(),
video: getVideos(),
volume: ui.videoVolume,
@ -494,11 +496,7 @@ pandora.ui.editPanel = function(isEmbed) {
function getSubtitles(clips) {
var subtitles = [],
subtitlesLayer = pandora.site.layers.filter(function(layer) {
return layer.isSubtitles;
}).map(function(layer) {
return layer.id;
})[0];
subtitlesLayer = pandora.getSubtitlesLayer();
subtitlesLayer && clips.map(function(clip) {
if (clip.layers[subtitlesLayer]) {
clip.layers[subtitlesLayer].forEach(function(subtitle) {