expose per clip volume in edits

This commit is contained in:
j 2017-04-15 13:45:31 +02:00
commit be34383f8c
6 changed files with 58 additions and 9 deletions

View file

@ -213,6 +213,18 @@ pandora.ui.editPanel = function(isEmbed) {
}
pandora.api.get({id: clip.item, keys: ['duration']}, function(result) {
var clips;
//fixme include in history...
if (data.key == 'volume') {
pandora.api.editClip({
id: data.id,
volume: data.value
}, function(result) {
edit.clips[Ox.getIndexById(edit.clips, data.id)] = result.data;
Ox.Request.clearCache('sortClips');
sortClips(updateClips);
});
return;
}
if (data.key == 'out') {
data.value = Math.min(data.value, result.data.duration);
}

View file

@ -1197,6 +1197,9 @@ pandora.getClipVideos = function(clip, resolution) {
if (clip.id) {
item.id = clip.id;
}
if (Ox.isNumber(clip.volume)) {
item.volume = clip.volume;
}
if (
currentTime <= start
&& currentTime + clip.durations[i] > start