clr commited on
Commit
131b229
1 Parent(s): 2f05151

Upload js.php

Browse files
Files changed (1) hide show
  1. js/js.php +29 -0
js/js.php CHANGED
@@ -69,6 +69,35 @@ $(function (){
69
 
70
  }
71
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
 
74
  getIntervals();
 
69
 
70
  }
71
  );
72
+
73
+
74
+
75
+ // alt-click on utterance line and only play it, then automatically stop
76
+ $("body").on('contextmenu', 'span[name=utterance]',
77
+ function(event) {
78
+ //var vid = document.getElementById("speakera");
79
+ //var vid = document.getElementById( $(this).attr("audiolink") );
80
+
81
+ // If they are not already playing both videos
82
+ if((vida.paused) || (vidb.paused)) {
83
+
84
+ var newTime = $(this).attr("beg");
85
+ vida.currentTime = newTime / 1000;
86
+ vida.play();
87
+ vidb.currentTime = newTime / 1000;
88
+ vidb.play();
89
+ // currentTime needs to be in SEC
90
+
91
+ }
92
+
93
+ // if both videos were already playing
94
+ else {
95
+ vida.pause();
96
+ vidb.pause();
97
+ }
98
+
99
+ }
100
+ );
101
 
102
 
103
  getIntervals();