clr commited on
Commit
e679c06
1 Parent(s): 398dbeb

Update js/js.php

Browse files
Files changed (1) hide show
  1. js/js.php +24 -7
js/js.php CHANGED
@@ -6,19 +6,36 @@
6
  $(function (){
7
 
8
  // Add "timeupdate" listener to "#speakera".
9
- var vid = document.getElementById("speakera");
10
- vid.addEventListener("timeupdate", function(){
11
  updatePosition(this.currentTime);
12
  });
13
 
14
  // Listen for user to pause video.
15
- vid.addEventListener("pause", function(){
16
- $( '.movControl' ).html("&#9654"); // Change all bullets to "play".
17
  });
18
 
19
  // Listen for user to play video. ** i added this
20
- vid.addEventListener("play", function(){
21
- $( '.movControl' ).html("&#9724"); // Change all bullets to "stop".
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  });
23
 
24
 
@@ -44,7 +61,7 @@ $(function (){
44
  // segmentDur needs to be in MS
45
 
46
  setTimeout(function(){
47
- document.getElementById('speakera').pause();
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("&#9654"); // 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("&#9724"); // 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("&#9654"); // 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("&#9724"); // 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
  }