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) {
|
||||
|
|
|
@ -920,7 +920,8 @@ pandora.getClipVideos = function(clip, resolution) {
|
|||
resolution = resolution || pandora.user.ui.videoResolution;
|
||||
return Ox.flatten(Ox.range(clip.parts).map(function(i) {
|
||||
var item = {
|
||||
src: pandora.getVideoURL(clip.item, resolution, i + 1)
|
||||
src: pandora.getVideoURL(clip.item, resolution, i + 1),
|
||||
resolution: resolution
|
||||
};
|
||||
if (currentTime + clip.durations[i] <= start || currentTime > end) {
|
||||
item = null;
|
||||
|
|
Loading…
Reference in a new issue