Commit 2c07ecaf authored by Gautam Chitnis's avatar Gautam Chitnis

Minor :Slider values in Track Sync Modal and Equalizer Modal

This commit adds value element to Track Sync and Equalizer Modal.
The element is updated as the slider movement occurs.

Gautam C.
parent c9325779
......@@ -172,7 +172,8 @@
<h4 class="modal-title">Equalizer</h4>
</div>
<div class="modal-body" id="">
<input type="range" name="equalizer-input" id="equalizer-input" min="0" max="100"/>
<input type="range" name="equalizer-input" id="equalizer-input" min="-20" max="20" step="0.1"/>
<center id="eqVal">{{ eqVal }}</center>
</div>
<div class="modal-footer">
</div>
......@@ -192,6 +193,17 @@
<h4 class="modal-title">Set Track Synchronization</h4>
</div>
<div class="modal-body" id="">
Playback Rate
<center id="playbackVal">{{ playbackVal }}</center>
<input type="range" name="playback-input" id="playback-input" min="-20" max="20" step="0.1"/>
<br>
Audio Delay
<center id="audioDelayVal">{{ audioDelayVal }}</center>
<input type="range" name="audioDelay-input" id="audioDelay-input" min="-20" max="20" step="0.1"/>
<br>
Subtitle Delay
<center id="subDelayVal">{{ subDelayVal }}</center>
<input type="range" name="subDelay-input" id="subDelay-input" min="-20" max="20" step="0.1"/>
</div>
<div class="modal-footer">
</div>
......
import { notifyBus } from '../../services/bus.service.js';
import { sendCommand } from '../../services/command.service.js';
let data = { eqVal: 0 }
Vue.component('equalizer-modal', {
template: '#equalizer-modal-template',
data:function() {
return data;
},
methods: {
handleEvents: function()
{
$('#equalizer-input').on("click",function(){
console.log("here: ",this.value);
let equalizerElement = $('#equalizer-input');
data.eqVal = equalizerElement[0].value;
//console.log(equalizerElement[0].value);
equalizerElement.on("input",function(e){
data.eqVal = e.currentTarget.value;
//sendCommand(0,"?command=setpreset&val="+e.currentTarget.value);
/*sendCommand(3,{
command: ,
val: e.currentTarget.value,
band: "60Hz"
});*/
//console.log(e.currentTarget.value);
});
}
},
created: function() {
console.log("created");
mounted: function() {
this.handleEvents();
}
});
\ No newline at end of file
import { notifyBus } from '../../services/bus.service.js';
import { sendCommand } from '../../services/command.service.js';
let data = { playbackVal: 0, audioDelayVal:0, subDelayVal: 0 }
let playbackElement;
let audioDelayElement;
let subDelayElement;
Vue.component('track-sync-modal', {
template: '#track-sync-modal-template',
data: function()
{
return data;
},
methods: {
handleEvents: function()
{
data.playbackVal = playbackElement[0].value;
data.audioDelayVal = audioDelayElement[0].value;
data.subDelayVal = subDelayElement[0].value;
playbackElement.on("input",function(e){
data.playbackVal = e.currentTarget.value;
});
audioDelayElement.on("input",function(e){
data.audioDelayVal = e.currentTarget.value;
});
subDelayElement.on("input",function(e){
data.subDelayVal = e.currentTarget.value;
});
}
},
created: function() {
mounted: function() {
playbackElement = $('#playback-input');
audioDelayElement = $('#audioDelay-input');
subDelayElement = $('#subDelay-input');
this.handleEvents();
}
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment