forked from 0x2620/pandora
pass subtitlesDefaultTrack and resolution in editor
This commit is contained in:
parent
f244476138
commit
8aa95d35f2
2 changed files with 5 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue