-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslot7.php
More file actions
119 lines (118 loc) · 5.04 KB
/
slot7.php
File metadata and controls
119 lines (118 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
include('connect.php');
$sql = "SELECT * FROM slot7 WHERE id=1";
$req = $bdd->query($sql);
while($row = $req->fetch()) {
$musicid=$row['musicid'];
$slot7cue1=$row['cue1'];
$slot7cue2=$row['cue2'];
$slot7cue3=$row['cue3'];
}
$sql = "SELECT * FROM music WHERE id=$musicid";
$req = $bdd->query($sql);
while($row = $req->fetch()) {
$slot7musicname=$row['musicname'];
$slot7musicfile=$row['musicfile'];
}
$slot7_short_musicname=substr($slot7musicname, 0, 25);
$bdd=null;
?>
<audio id="slot7" <?php echo"src='music/$slot7musicfile'";?>"></audio>
<div class="col">
<div class="card shadow-sm bg-light" style="padding: 5px;">
<div class="row">
<h6>Slot #7 - <?php echo"$slot7_short_musicname"; ?></h6>
<div class="col-md-4">
<button id="butslot7cue1" type="button" class="btn btn-lg btn-secondary fs-4" style="width:100%;" onClick="slot7cue1()">CUE</button>
</div>
<div class="col-md-4">
<button id="butslot7cue2" type="button" class="btn btn-lg btn-secondary fs-4" style="width:100%;" onClick="slot7cue2()">CUE</button>
</div>
<div class="col-md-4">
<button id="butslot7cue3" type="button" class="btn btn-lg btn-secondary fs-4" style="width:100%;" onClick="slot7cue3()">CUE</button>
</div>
<div class="col-md-4">
<span><?php echo $slot7cue1; ?></span>
</div>
<div class="col-md-4">
<span><?php echo $slot7cue2; ?></span>
</div>
<div class="col-md-4">
<span><?php echo $slot7cue3; ?></span>
</div>
</div>
<div class="row">
<div class="col-md-4">
<button id="butslot7play" type="button" class="btn btn-lg btn-secondary fs-4" style="width:100%;" onClick="playslot7()">
<span class="material-icons-outlined" style="font-size: 2rem;">play_arrow</span>
</button>
</div>
<div class="col-md-4">
<button id="butslot7pause" type="button" class="btn btn-lg btn-secondary fs-4" style="width:100%;" onClick="pauseslot7()">
<span class="material-icons-outlined" style="font-size: 2rem;">pause</span>
</button>
</div>
<div class="col-md-4">
<button id="butslot7stop" type="button" class="btn btn-lg btn-primary fs-4" style="width:100%;" onClick="stopslot7()">
<span class="material-icons-outlined" style="font-size: 2rem;">stop</span>
</button>
</div>
</div>
<h6 align="center">Temps : <span id="tempsmorceauslot7"></span> / <span id="totaltempsslot7"></span></h6>
<table width="100%" border="0">
<tbody>
<tr>
<td>Volume</td>
<td><input type="range" class="form-range" id="sliderslot7" min="0" max="100" value="100" step="1" oninput="volumeslot7(this.value)" onchange="volumeslot7(this.value)"></td>
</tr>
</tbody>
</table>
</div>
</div>
<script>
// SLOT 7 ------------------------------------------------------------------------------
// audio temps reel Slot 7
var audioslot7 = document.getElementById('slot7');
audioslot7.ontimeupdate = function() {readreeltime7()};
function readreeltime7() {
var audioslot7 = document.getElementById('slot7');
document.getElementById("tempsmorceauslot7").innerHTML = audioslot7.currentTime; // Temps réel
document.getElementById("totaltempsslot7").innerHTML = audioslot7.duration; // Temps fin de morceau
}
//Slot7 Cue1
function slot7cue1() {
var audioslot7 = document.getElementById('slot7');
audioslot7.currentTime = <?php echo $slot7cue1 ?>;
audioslot7.play();
document.getElementById('butslot7cue1').className="btn btn-lg btn-danger fs-4";
document.getElementById('butslot7cue2').className="btn btn-lg btn-secondary fs-4";
document.getElementById('butslot7cue3').className="btn btn-lg btn-secondary fs-4";
document.getElementById('butslot7play').disabled = true;
document.getElementById('butslot7pause').className="btn btn-lg btn-secondary fs-4";
document.getElementById('butslot7stop').className="btn btn-lg btn-secondary fs-4";
}
//Slot7 Cue2
function slot7cue2() {
var audioslot7 = document.getElementById('slot7');
audioslot7.currentTime = <?php echo $slot7cue2 ?>;
audioslot7.play();
document.getElementById('butslot7cue1').className="btn btn-lg btn-secondary fs-4";
document.getElementById('butslot7cue2').className="btn btn-lg btn-danger fs-4";
document.getElementById('butslot7cue3').className="btn btn-lg btn-secondary fs-4";
document.getElementById('butslot7play').disabled = true;
document.getElementById('butslot7pause').className="btn btn-lg btn-secondary fs-4";
document.getElementById('butslot7stop').className="btn btn-lg btn-secondary fs-4";
}
//Slot7 Cue3
function slot7cue3() {
var audioslot7 = document.getElementById('slot7');
audioslot7.currentTime = <?php echo $slot7cue3 ?>;
audioslot7.play();
document.getElementById('butslot7cue1').className="btn btn-lg btn-secondary fs-4";
document.getElementById('butslot7cue2').className="btn btn-lg btn-secondary fs-4";
document.getElementById('butslot7cue3').className="btn btn-lg btn-danger fs-4";
document.getElementById('butslot7play').disabled = true;
document.getElementById('butslot7pause').className="btn btn-lg btn-secondary fs-4";
document.getElementById('butslot7stop').className="btn btn-lg btn-secondary fs-4";
}
</script>