Spaces:
Running
Running
Update js/js.php
Browse files
js/js.php
CHANGED
@@ -6,19 +6,36 @@
|
|
6 |
$(function (){
|
7 |
|
8 |
// Add "timeupdate" listener to "#speakera".
|
9 |
-
var
|
10 |
-
|
11 |
updatePosition(this.currentTime);
|
12 |
});
|
13 |
|
14 |
// Listen for user to pause video.
|
15 |
-
|
16 |
-
$( '.
|
17 |
});
|
18 |
|
19 |
// Listen for user to play video. ** i added this
|
20 |
-
|
21 |
-
$( '.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
});
|
23 |
|
24 |
|
@@ -44,7 +61,7 @@ $(function (){
|
|
44 |
// segmentDur needs to be in MS
|
45 |
|
46 |
setTimeout(function(){
|
47 |
-
document.getElementById(
|
48 |
}, segmentDur);
|
49 |
|
50 |
}
|
|
|
6 |
$(function (){
|
7 |
|
8 |
// Add "timeupdate" listener to "#speakera".
|
9 |
+
var vida = document.getElementById("speakera");
|
10 |
+
vida.addEventListener("timeupdate", function(){
|
11 |
updatePosition(this.currentTime);
|
12 |
});
|
13 |
|
14 |
// Listen for user to pause video.
|
15 |
+
vida.addEventListener("pause", function(){
|
16 |
+
$( '.movControla' ).html("▶"); // Change all bullets to "play".
|
17 |
});
|
18 |
|
19 |
// Listen for user to play video. ** i added this
|
20 |
+
vida.addEventListener("play", function(){
|
21 |
+
$( '.movControla' ).html("◼"); // Change all bullets to "stop".
|
22 |
+
});
|
23 |
+
|
24 |
+
|
25 |
+
// Add "timeupdate" listener to "#speakera".
|
26 |
+
var vidb = document.getElementById("speakerb");
|
27 |
+
vidb.addEventListener("timeupdate", function(){
|
28 |
+
updatePosition(this.currentTime);
|
29 |
+
});
|
30 |
+
|
31 |
+
// Listen for user to pause video.
|
32 |
+
vidb.addEventListener("pause", function(){
|
33 |
+
$( '.movControlb' ).html("▶"); // Change all bullets to "play".
|
34 |
+
});
|
35 |
+
|
36 |
+
// Listen for user to play video. ** i added this
|
37 |
+
vidb.addEventListener("play", function(){
|
38 |
+
$( '.movControlb' ).html("◼"); // Change all bullets to "stop".
|
39 |
});
|
40 |
|
41 |
|
|
|
61 |
// segmentDur needs to be in MS
|
62 |
|
63 |
setTimeout(function(){
|
64 |
+
document.getElementById( $(this).attr("audiolink") ).pause();
|
65 |
}, segmentDur);
|
66 |
|
67 |
}
|