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,
|
paused: true,
|
||||||
showIconOnLoad: true,
|
showIconOnLoad: true,
|
||||||
subtitles: getSubtitles(edit.clips),
|
subtitles: getSubtitles(edit.clips),
|
||||||
|
subtitlesDefaultTrack: Ox.getLanguageNameByCode(pandora.site.language),
|
||||||
|
subtitlesTrack: Ox.getLanguageNameByCode(pandora.site.language),
|
||||||
timeline: getSmallTimelineURL(),
|
timeline: getSmallTimelineURL(),
|
||||||
video: getVideos(),
|
video: getVideos(),
|
||||||
volume: ui.videoVolume,
|
volume: ui.videoVolume,
|
||||||
|
@ -494,11 +496,7 @@ pandora.ui.editPanel = function(isEmbed) {
|
||||||
|
|
||||||
function getSubtitles(clips) {
|
function getSubtitles(clips) {
|
||||||
var subtitles = [],
|
var subtitles = [],
|
||||||
subtitlesLayer = pandora.site.layers.filter(function(layer) {
|
subtitlesLayer = pandora.getSubtitlesLayer();
|
||||||
return layer.isSubtitles;
|
|
||||||
}).map(function(layer) {
|
|
||||||
return layer.id;
|
|
||||||
})[0];
|
|
||||||
subtitlesLayer && clips.map(function(clip) {
|
subtitlesLayer && clips.map(function(clip) {
|
||||||
if (clip.layers[subtitlesLayer]) {
|
if (clip.layers[subtitlesLayer]) {
|
||||||
clip.layers[subtitlesLayer].forEach(function(subtitle) {
|
clip.layers[subtitlesLayer].forEach(function(subtitle) {
|
||||||
|
|
|
@ -920,7 +920,8 @@ pandora.getClipVideos = function(clip, resolution) {
|
||||||
resolution = resolution || pandora.user.ui.videoResolution;
|
resolution = resolution || pandora.user.ui.videoResolution;
|
||||||
return Ox.flatten(Ox.range(clip.parts).map(function(i) {
|
return Ox.flatten(Ox.range(clip.parts).map(function(i) {
|
||||||
var item = {
|
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) {
|
if (currentTime + clip.durations[i] <= start || currentTime > end) {
|
||||||
item = null;
|
item = null;
|
||||||
|
|
Loading…
Reference in a new issue