Update transcript-tracer.js
Browse files- transcript-tracer.js +4 -2
transcript-tracer.js
CHANGED
@@ -459,9 +459,11 @@ function handleWordClick(e) {
|
|
459 |
var transcript = wordElement.closest('.tt-transcript');
|
460 |
var mediaUrl = transcript.dataset.ttCurrentMediaUrl;
|
461 |
var startSeconds = ttLinkedDataByMediaUrl[mediaUrl].wordTimings[wordIndex].startSeconds
|
462 |
-
|
463 |
-
|
464 |
ttLinkedDataByMediaUrl[mediaUrl].mediaElement.currentTime = startSeconds;
|
|
|
|
|
|
|
465 |
|
466 |
// Make sure the correct transcript is selected
|
467 |
if (!ttCurrentTranscript || ttCurrentTranscript.dataset.ttTranscript != ttData.transcriptIndex) {
|
|
|
459 |
var transcript = wordElement.closest('.tt-transcript');
|
460 |
var mediaUrl = transcript.dataset.ttCurrentMediaUrl;
|
461 |
var startSeconds = ttLinkedDataByMediaUrl[mediaUrl].wordTimings[wordIndex].startSeconds
|
462 |
+
|
|
|
463 |
ttLinkedDataByMediaUrl[mediaUrl].mediaElement.currentTime = startSeconds;
|
464 |
+
|
465 |
+
if (!ttActivePlayer || !(ttActivePlayer.dataset.ttLinkedMediaUrl in ttLinkedDataByMediaUrl)) return;
|
466 |
+
var ttData = ttLinkedDataByMediaUrl[ttActivePlayer.dataset.ttLinkedMediaUrl];
|
467 |
|
468 |
// Make sure the correct transcript is selected
|
469 |
if (!ttCurrentTranscript || ttCurrentTranscript.dataset.ttTranscript != ttData.transcriptIndex) {
|