Spaces:
Running
Running
Update index.html
Browse files- index.html +0 -24
index.html
CHANGED
@@ -44,34 +44,10 @@
|
|
44 |
</li>
|
45 |
</ul>
|
46 |
|
47 |
-
|
48 |
-
<audio id="sample" src="./full_conversations/b107d272-73c7-45d2-af9e-9ded79697fd3/speaker_a_convo_b107d272-73c7-45d2-af9e-9ded79697fd3.wav" controls preload></audio>
|
49 |
-
|
50 |
-
<a href="javascript:playSegment(0, 13);">Play1</a>
|
51 |
-
<a href="javascript:playSegment(130, 140);">Play2</a>
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
56 |
<script type="text/javascript" src="./js/js.php"></script>
|
57 |
|
58 |
-
<script>
|
59 |
-
var audio = document.getElementById('sample');
|
60 |
-
var segmentEnd;
|
61 |
-
|
62 |
-
audio.addEventListener('timeupdate', function (){
|
63 |
-
if (segmentEnd && audio.currentTime >= segmentEnd) {
|
64 |
-
audio.pause();
|
65 |
-
}
|
66 |
-
console.log(audio.currentTime);
|
67 |
-
}, false);
|
68 |
|
69 |
-
function playSegment(startTime, endTime){
|
70 |
-
segmentEnd = endTime;
|
71 |
-
audio.currentTime = startTime;
|
72 |
-
audio.play();
|
73 |
-
}
|
74 |
-
</script>
|
75 |
</body>
|
76 |
</html>
|
77 |
|
|
|
44 |
</li>
|
45 |
</ul>
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
48 |
<script type="text/javascript" src="./js/js.php"></script>
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
</body>
|
52 |
</html>
|
53 |
|