refactor(legacy): remove unused waveform related code (#3003)
Co-authored-by: Thomas Göttgens <tgoettgens@mail.com> Co-authored-by: Kyle Robbertze <paddatrapper@users.noreply.github.com>
This commit is contained in:
parent
a556b73d2a
commit
064c435b09
8 changed files with 62 additions and 1146 deletions
|
@ -43,7 +43,7 @@
|
|||
"css/show_analytics.css": "4393c521308277447afabe8791779bf1",
|
||||
"css/showbuilder.css": "4421c01b5c2dfb03f8d06dd6023b4bd7",
|
||||
"css/station_podcast.css": "88e9b38ead71eddc69ef50bfc8cb2d0d",
|
||||
"css/styles.css": "29ce2292b2c007e86d192d0deeaf88ad",
|
||||
"css/styles.css": "f38f7f24c3895c146babbb56a6534730",
|
||||
"css/tipsy/jquery.tipsy.css": "b13517583583f83ed7d5fc067a0c9372",
|
||||
"css/tracktypes.css": "94c94817a8505ff4dfcd090987859a7e",
|
||||
"css/users.css": "94c94817a8505ff4dfcd090987859a7e",
|
||||
|
@ -180,12 +180,9 @@
|
|||
"js/waveformplaylist/playout.js": "7dfc5fe760f3c6739e38499df7b61e47",
|
||||
"js/waveformplaylist/time_scale.js": "74e0e17e1c8cd597449220c98de408ba",
|
||||
"js/waveformplaylist/track.js": "5456e6081ffedf55a9e38571bc178781",
|
||||
"js/waveformplaylist/track_render.js": "e371b582b23e4b618e039f096d2f0570",
|
||||
"js/wavesurfer/cursor.js": "8ed17a7437f3ec84972d15d0073249b2",
|
||||
"js/wavesurfer/cursor.min.js": "831165862b629e615cf59112fa00d963",
|
||||
"js/wavesurfer/libretime.js": "17133cacf09fc204a572b56c99d44278",
|
||||
"js/wavesurfer/minimap.js": "c17dd315386006bb3cffdabb5f715c7b",
|
||||
"js/wavesurfer/minimap.min.js": "90b2f2d1d1b4eb189d1a9c3c27dcb4f7",
|
||||
"js/wavesurfer/libretime.js": "dfaefa6d32657faa77af6145d9d191ae",
|
||||
"js/wavesurfer/regions.js": "aafe4f696d3da50c976d11e472fd56d1",
|
||||
"js/wavesurfer/regions.min.js": "2ed2f8b5880beee568942000a6139e85",
|
||||
"js/wavesurfer/timeline.js": "0bd70779070513c2a4f34237a0f9f573",
|
||||
|
|
|
@ -190,14 +190,6 @@ class Application_Form_EditAudioMD extends Zend_Form
|
|||
]);
|
||||
$this->addElement($mood);
|
||||
|
||||
// Add replay gain field
|
||||
$replay_gain = new Zend_Form_Element_Hidden('replay_gain');
|
||||
$replay_gain->class = 'input_text replay_gain_' . $p_id;
|
||||
$replay_gain->setLabel(_('Replay Gain:'))
|
||||
->addDecorator('HtmlTag', ['tag' => 'div', 'style' => 'display:none'])
|
||||
->removeDecorator('Label');
|
||||
$this->addElement($replay_gain);
|
||||
|
||||
// Add bmp field
|
||||
$bpm = new Zend_Form_Element_Text('bpm');
|
||||
$bpm->class = 'input_text';
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
<?php $get_artwork = FileDataHelper::getArtworkData($this->artwork, 256);
|
||||
|
||||
$baseUrl = Config::getBasePath();
|
||||
|
||||
$get_replay_gain = Application_Model_Preference::getReplayGainModifier();
|
||||
if (!Application_Model_Preference::GetEnableReplayGain() ) {
|
||||
$get_replay_gain = 0;
|
||||
}
|
||||
$analogMeter = true;
|
||||
?>
|
||||
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong edit-md-dialog">
|
||||
<div class="track-edit-header" style="top:15px">
|
||||
|
@ -45,8 +39,8 @@ $analogMeter = true;
|
|||
</div>
|
||||
<div style="height: 160px;"></div>
|
||||
<?php echo $this->form; ?>
|
||||
<div class="collapsible-header closed"><span class="arrow-icon"></span><?php echo _("Visual Waveform Editor"); ?></div>
|
||||
<div class="visual-waveform-editor" style="clear:both;padding:18px 24px 0 0;">
|
||||
<div class="collapsible-header collapsible-header-<?php echo $this->id;?> closed"><span class="arrow-icon"></span><?php echo _("Cue Point Editor"); ?></div>
|
||||
<div class="visual-waveform-editor visual-waveform-editor-<?php echo $this->id;?>" style="clear:both;padding:18px 24px 0 0;">
|
||||
<div class="controls">
|
||||
<div class="row">
|
||||
<div class="col-sm-7">
|
||||
|
@ -88,54 +82,45 @@ $analogMeter = true;
|
|||
<div id="track-waveform-<?php echo $this->id; ?>"></div>
|
||||
<div id="timeline-<?php echo $this->id; ?>"></div>
|
||||
</div>
|
||||
<input type="hidden" id="volume-<?php echo $this->id; ?>" type="range" min="0" max="1" value="1" step="0.1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//waveform
|
||||
var track_id = <?php echo $this->id; ?>;
|
||||
var selector_id = "#track-waveform-"+<?php echo $this->id; ?>;
|
||||
var url = baseUrl + 'api/get-media/file/<?php echo $this->id; ?>';
|
||||
var cuein = '<?php echo $this->cuein; ?>';
|
||||
var cueout = '<?php echo $this->cueout; ?>';
|
||||
var gain_level = deciSteps(<?php echo $this->replay_gain; ?>);
|
||||
var default_gain = <?php echo $get_replay_gain; ?>;
|
||||
var eTrack = renderWaveform(track_id, selector_id, url, cuein, cueout, gain_level, default_gain);
|
||||
renderWaveform(<?php echo $this->id; ?>, '#track-waveform-<?php echo $this->id; ?>', baseUrl + 'api/get-media/file/<?php echo $this->id; ?>', '<?php echo $this->cuein; ?>', '<?php echo $this->cueout; ?>');
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$(".collapsible-header")
|
||||
$(".collapsible-header-<?php echo $this->id;?>")
|
||||
.off("click")
|
||||
.on("click", function () {
|
||||
$(this).toggleClass("visible");
|
||||
$(".visual-waveform-editor").toggle();
|
||||
$(".visual-waveform-editor-<?php echo $this->id;?>").toggle();
|
||||
$(".editor_pane_wrapper").animate({
|
||||
scrollTop: $(".collapsible-header").offset().top * 2
|
||||
scrollTop: $(".collapsible-header-<?php echo $this->id;?>").offset().top * 2
|
||||
}, 500);
|
||||
wavesurfer["t<?php echo $this->id; ?>"].drawer.containerWidth = wavesurfer["t<?php echo $this->id; ?>"].drawer.container.clientWidth;
|
||||
wavesurfer["t<?php echo $this->id; ?>"].zoom(Number($(".zoom-slider-<?php echo $this->id; ?>").value));
|
||||
});
|
||||
|
||||
// Counter field edit
|
||||
$(document).on('change', '#tracktimerinput-<?php echo $this->id; ?>', 'input', function(event) {
|
||||
// Counter field edit
|
||||
$(document).on('change', '#tracktimerinput-<?php echo $this->id; ?>', 'input', function(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var val = $(this).val();
|
||||
wavesurfer["t<?php echo $this->id; ?>"].setCurrentTime(val);
|
||||
}).on('keypress keydown', '#tracktimerinput-<?php echo $this->id; ?>', 'input', function(event) {
|
||||
if (event.key === 'Enter' || event.keyCode === 13 || event.keyCode === 10) {
|
||||
var val = $(this).val();
|
||||
wavesurfer["t<?php echo $this->id; ?>"].setCurrentTime(val);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var val = $(this).val();
|
||||
eTrack.setCurrentTime(val);
|
||||
}).on('keypress keydown', '#tracktimerinput-<?php echo $this->id; ?>', 'input', function(event) {
|
||||
if (event.key === 'Enter' || event.keyCode === 13 || event.keyCode === 10) {
|
||||
var val = $(this).val();
|
||||
eTrack.setCurrentTime(val);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
event.stopImmediatePropagation();
|
||||
return false;
|
||||
}
|
||||
event.stopImmediatePropagation();
|
||||
return false;
|
||||
}
|
||||
})
|
||||
|
||||
//Gain Knob
|
||||
$("#volume-<?php echo $this->id; ?>").val(deciSteps(<?php echo $this->replay_gain; ?>));
|
||||
|
||||
$(document).on('change', '.cuein_<?php echo $this->id; ?>', 'input', function(event) {
|
||||
console.log('cuein input');
|
||||
event.preventDefault();
|
||||
|
@ -144,9 +129,9 @@ $analogMeter = true;
|
|||
var a = val.split(':');
|
||||
var startseconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]);
|
||||
console.log(startseconds);
|
||||
var region = eTrack.regions.list[track_id];
|
||||
var region = wavesurfer["t<?php echo $this->id; ?>"].regions.list[<?php echo $this->id; ?>];
|
||||
region.update({start: startseconds});
|
||||
$('#track-playedit-'+track_id).attr('onClick', 'wavesurfer["t'+ track_id +'"].play('+ region.start +', '+ region.end +');');
|
||||
$('#track-playedit-<?php echo $this->id; ?>').attr('onClick', 'wavesurfer["t'+ <?php echo $this->id; ?> +'"].play('+ region.start +', '+ region.end +');');
|
||||
});
|
||||
|
||||
$(document).on('change', '.cueout_<?php echo $this->id; ?>', 'input', function(event) {
|
||||
|
@ -156,31 +141,31 @@ $analogMeter = true;
|
|||
var val = $(this).val();
|
||||
var b = val.split(':');
|
||||
var endseconds = (+b[0]) * 60 * 60 + (+b[1]) * 60 + (+b[2]);
|
||||
var region = eTrack.regions.list[track_id];
|
||||
var region = wavesurfer["t<?php echo $this->id; ?>"].regions.list[<?php echo $this->id; ?>];
|
||||
region.update({end: endseconds});
|
||||
$('#track-playedit-'+track_id).attr('onClick', 'wavesurfer["t'+ track_id +'"].play('+ region.start +', '+ region.end +');');
|
||||
$('#track-playedit-<?php echo $this->id; ?>').attr('onClick', 'wavesurfer["t'+ <?php echo $this->id; ?> +'"].play('+ region.start +', '+ region.end +');');
|
||||
});
|
||||
|
||||
$(document).on('click', '#cuein-set-<?php echo $this->id; ?>', 'button', function(event) {
|
||||
console.log('cuein button');
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var val = eTrack.getCurrentTime();
|
||||
var region = eTrack.regions.list[track_id];
|
||||
var val = wavesurfer["t<?php echo $this->id; ?>"].getCurrentTime();
|
||||
var region = wavesurfer["t<?php echo $this->id; ?>"].regions.list[<?php echo $this->id; ?>];
|
||||
region.update({start: val});
|
||||
document.getElementsByClassName("cuein_"+track_id)[0].value = toHHMMSS(region.start);
|
||||
$('#track-playedit-'+track_id).attr('onClick', 'wavesurfer["t'+ track_id +'"].play('+ region.start +', '+ region.end +');');
|
||||
document.getElementsByClassName("cuein_<?php echo $this->id; ?>")[0].value = toHHMMSS(region.start);
|
||||
$('#track-playedit-<?php echo $this->id; ?>').attr('onClick', 'wavesurfer["t'+ <?php echo $this->id; ?> +'"].play('+ region.start +', '+ region.end +');');
|
||||
});
|
||||
|
||||
$(document).on('click', '#cueout-set-<?php echo $this->id; ?>', 'button', function(event) {
|
||||
console.log('cueout button')
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var val = eTrack.getCurrentTime();
|
||||
var region = eTrack.regions.list[track_id];
|
||||
var val = wavesurfer["t<?php echo $this->id; ?>"].getCurrentTime();
|
||||
var region = wavesurfer["t<?php echo $this->id; ?>"].regions.list[<?php echo $this->id; ?>];
|
||||
region.update({end: val});
|
||||
document.getElementsByClassName("cueout_"+track_id)[0].value = toHHMMSS(region.end);
|
||||
$('#track-playedit-'+track_id).attr('onClick', 'wavesurfer["t'+ track_id +'"].play('+ region.start +', '+ region.end +');');
|
||||
document.getElementsByClassName("cueout_<?php echo $this->id; ?>")[0].value = toHHMMSS(region.end);
|
||||
$('#track-playedit-<?php echo $this->id; ?>').attr('onClick', 'wavesurfer["t'+ <?php echo $this->id; ?> +'"].play('+ region.start +', '+ region.end +');');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue