added note about browsers, added touch support for slider
This commit is contained in:
@@ -12,6 +12,7 @@ let songDir = [];
|
||||
let player = null;
|
||||
let aLoopTime = null;
|
||||
let bLoopTime = null;
|
||||
let sliderPause = false;
|
||||
|
||||
// init socket io
|
||||
$(function () {
|
||||
@@ -100,6 +101,34 @@ $(function () {
|
||||
updateDisplay();
|
||||
});
|
||||
|
||||
$( '#position-slider' ).on('touchend', function () {
|
||||
if(sliderPause){
|
||||
player.play();
|
||||
sliderPause = false;
|
||||
}
|
||||
});
|
||||
|
||||
$( '#position-slider' ).on('touchstart', function () {
|
||||
if(player.isPlaying()){
|
||||
player.pause();
|
||||
sliderPause = true;
|
||||
}
|
||||
});
|
||||
|
||||
$( '#position-slider' ).mouseup(function () {
|
||||
if(sliderPause){
|
||||
player.play();
|
||||
sliderPause = false;
|
||||
}
|
||||
});
|
||||
|
||||
$( '#position-slider' ).mousedown(function () {
|
||||
if(player.isPlaying()){
|
||||
player.pause();
|
||||
sliderPause = true;
|
||||
}
|
||||
});
|
||||
|
||||
$( '#speed-slider' ).change(function () {
|
||||
updateDisplay();
|
||||
});
|
||||
@@ -109,7 +138,7 @@ $(function () {
|
||||
});
|
||||
|
||||
$('input[type=range]').on('input', function () {
|
||||
$(this).trigger('change');
|
||||
$(this).trigger('change');
|
||||
});
|
||||
|
||||
$('#extFile').change(function () {
|
||||
@@ -238,10 +267,8 @@ Player.prototype = {
|
||||
html5: true, // Force to HTML5 so that the audio can stream in (best for large files).
|
||||
onplay: function() {
|
||||
updateDisplay();
|
||||
console.log('pressed play button');
|
||||
$( '#playBtn' ).removeClass('btn-succes').addClass('btn-warning');
|
||||
$( '#playBtn svg' ).removeClass('fa-play').addClass('fa-pause');
|
||||
// Start upating the progress of the track.
|
||||
requestAnimationFrame(self.step.bind(self));
|
||||
},
|
||||
onload: function() {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class='col-md-12'>
|
||||
<div class="alert alert-primary" role="alert">
|
||||
Die Noten Anzeige ist noch nicht ganz ausgereift und funktioniert z.Z. noch nicht auf mobilen Geräten. <br>
|
||||
Empfohlen wird Google Chrome (Chromium) oder Mozilla Firefox.
|
||||
Empfohlen wird Google Chrome (Chromium) oder Mozilla Firefox auf Windows, macOS oder Linux.
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-5'>
|
||||
|
||||
Reference in New Issue
Block a user