CC-2301 : fades editor is loading now with a leftoffset for the second track and the cues for both tracks.
This commit is contained in:
parent
956bcccd24
commit
179621d687
5 changed files with 46 additions and 8 deletions
|
@ -239,6 +239,11 @@ SQL;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
foreach ($rows as &$row) {
|
foreach ($rows as &$row) {
|
||||||
$clipSec = Application_Common_DateHelper::playlistTimeToSeconds($row['length']);
|
$clipSec = Application_Common_DateHelper::playlistTimeToSeconds($row['length']);
|
||||||
|
$row['trackSec'] = $clipSec;
|
||||||
|
|
||||||
|
$row['cueInSec'] = Application_Common_DateHelper::playlistTimeToSeconds($row['cuein']);
|
||||||
|
$row['cueOutSec'] = Application_Common_DateHelper::playlistTimeToSeconds($row['cueout']);
|
||||||
|
|
||||||
$offset += $clipSec;
|
$offset += $clipSec;
|
||||||
$offset_cliplength = Application_Common_DateHelper::secondsToPlaylistTime($offset);
|
$offset_cliplength = Application_Common_DateHelper::secondsToPlaylistTime($offset);
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
<div data-fadeout="<?php echo $this->item1Url; ?>" data-fadein="<?php echo $this->item2Url; ?>"><input type="button" class="pl-waveform-fades-btn" value="Show Waveform"></input></div>
|
|
||||||
<dl id="spl_editor" class="inline-list">
|
<dl id="spl_editor" class="inline-list">
|
||||||
|
<dd>
|
||||||
|
<input type="button" class="pl-waveform-fades-btn" value="Show Waveform"></input>
|
||||||
|
</dd>
|
||||||
<?php if ($this->item1Type == 0) {?>
|
<?php if ($this->item1Type == 0) {?>
|
||||||
<dt><? echo _("Fade out: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
|
<dt><? echo _("Fade out: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
|
||||||
<dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out">
|
<dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out" data-fadeout="<?php echo $this->item1Url; ?>"
|
||||||
|
data-cuein="<?php echo $this->cueIn1; ?>" data-cueout="<?php echo $this->cueOut1; ?>">
|
||||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span>
|
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span>
|
||||||
</dd>
|
</dd>
|
||||||
<dd class="edit-error"></dd>
|
<dd class="edit-error"></dd>
|
||||||
<?php }
|
<?php }
|
||||||
if ($this->item2Type == 0) {?>
|
if ($this->item2Type == 0) {?>
|
||||||
<dt><? echo _("Fade in: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
|
<dt><? echo _("Fade in: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
|
||||||
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in">
|
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in" data-fadein="<?php echo $this->item2Url; ?>" data-offset="<?php echo $this->offset; ?>"
|
||||||
|
data-cuein="<?php echo $this->cueIn2; ?>" data-cueout="<?php echo $this->cueOut2; ?>">
|
||||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
|
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
|
||||||
</dd>
|
</dd>
|
||||||
<dd class="edit-error"></dd>
|
<dd class="edit-error"></dd>
|
||||||
|
|
|
@ -93,7 +93,13 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
||||||
'item1Url' => $fileUrl,
|
'item1Url' => $fileUrl,
|
||||||
'item2Url' => $nextFileUrl,
|
'item2Url' => $nextFileUrl,
|
||||||
'fadeOut' => $items[$i]['fadeout'],
|
'fadeOut' => $items[$i]['fadeout'],
|
||||||
'fadeIn' => $items[$i+1]['fadein'])); ?>
|
'fadeIn' => $items[$i+1]['fadein'],
|
||||||
|
'offset' => $items[$i]['trackSec'],
|
||||||
|
'cueIn1' => $items[$i]['cueInSec'],
|
||||||
|
'cueOut1' => $items[$i]['cueOutSec'],
|
||||||
|
'cueIn2' => $items[$i+1]['cueInSec'],
|
||||||
|
'cueOut2' => $items[$i+1]['cueOutSec'])
|
||||||
|
); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($item['type'] == 2) {?>
|
<?php if ($item['type'] == 2) {?>
|
||||||
|
|
|
@ -1111,14 +1111,21 @@ var AIRTIME = (function(AIRTIME){
|
||||||
|
|
||||||
mod.showFadesWaveform = function(e) {
|
mod.showFadesWaveform = function(e) {
|
||||||
var $el = $(e.target),
|
var $el = $(e.target),
|
||||||
$parent = $el.parent(),
|
$parent = $el.parents("dl"),
|
||||||
|
$fadeOut = $parent.find(".spl_fade_out"),
|
||||||
|
$fadeIn = $parent.find(".spl_fade_in"),
|
||||||
$html = $($("#tmpl-pl-fades").html()),
|
$html = $($("#tmpl-pl-fades").html()),
|
||||||
tracks = [
|
tracks = [
|
||||||
{
|
{
|
||||||
src: $parent.data("fadeout")
|
src: $fadeOut.data("fadeout"),
|
||||||
|
cuein: $fadeOut.data("cuein"),
|
||||||
|
cueout: $fadeOut.data("cueout")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: $parent.data("fadein")
|
src: $fadeIn.data("fadein"),
|
||||||
|
start: $fadeIn.data("offset"),
|
||||||
|
cuein: $fadeIn.data("cuein"),
|
||||||
|
cueout: $fadeIn.data("cueout")
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dim = AIRTIME.utilities.findViewportDimensions();
|
dim = AIRTIME.utilities.findViewportDimensions();
|
||||||
|
|
|
@ -304,6 +304,22 @@ PlaylistEditor.prototype.updateEditor = function() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
PlaylistEditor.prototype.getJson = function() {
|
||||||
|
var editors = this.trackEditors,
|
||||||
|
i,
|
||||||
|
len,
|
||||||
|
info = [],
|
||||||
|
json;
|
||||||
|
|
||||||
|
for (i = 0, len = editors.length; i < len; i++) {
|
||||||
|
info.push(editors[i].getTrackDetails());
|
||||||
|
}
|
||||||
|
|
||||||
|
json = JSON.stringify(info);
|
||||||
|
|
||||||
|
return info;
|
||||||
|
};
|
||||||
|
|
||||||
PlaylistEditor.prototype.save = function() {
|
PlaylistEditor.prototype.save = function() {
|
||||||
var editors = this.trackEditors,
|
var editors = this.trackEditors,
|
||||||
i,
|
i,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue