Update transcript-tracer.js
Browse files- transcript-tracer.js +6 -3
transcript-tracer.js
CHANGED
@@ -569,18 +569,21 @@ function handleSelection() {
|
|
569 |
// adjustment
|
570 |
var targetEndIndex = parseInt(wordIndex)+1;
|
571 |
if (!need_adjustment) targetEndIndex = wordIndex;
|
572 |
-
targetEndIndex = targetEndIndex.toString()
|
573 |
|
574 |
if (targetEndIndex < ttLinkedDataByMediaUrl[mediaUrl].wordTimings.length) {
|
575 |
endSeconds = ttLinkedDataByMediaUrl[mediaUrl].wordTimings[targetEndIndex].startSeconds;
|
576 |
}
|
577 |
|
578 |
-
|
|
|
|
|
|
|
|
|
579 |
|
580 |
console.log(endSeconds);
|
581 |
|
582 |
|
583 |
-
|
584 |
// Mark selection
|
585 |
// if (ttCurrentEvent.currentWordIndexes.length > 0) {
|
586 |
// for (const wordIndex of ttCurrentEvent.currentWordIndexes) {
|
|
|
569 |
// adjustment
|
570 |
var targetEndIndex = parseInt(wordIndex)+1;
|
571 |
if (!need_adjustment) targetEndIndex = wordIndex;
|
572 |
+
targetEndIndex = targetEndIndex.toString()
|
573 |
|
574 |
if (targetEndIndex < ttLinkedDataByMediaUrl[mediaUrl].wordTimings.length) {
|
575 |
endSeconds = ttLinkedDataByMediaUrl[mediaUrl].wordTimings[targetEndIndex].startSeconds;
|
576 |
}
|
577 |
|
578 |
+
var endWordIndex = parseInt(wordIndex);
|
579 |
+
if (need_adjustment) endWordIndex = endWordIndex - 1;
|
580 |
+
endWordIndex = endWordIndex.toString()
|
581 |
+
// ? How to get this
|
582 |
+
// var endWordElement = startWordElement;
|
583 |
|
584 |
console.log(endSeconds);
|
585 |
|
586 |
|
|
|
587 |
// Mark selection
|
588 |
// if (ttCurrentEvent.currentWordIndexes.length > 0) {
|
589 |
// for (const wordIndex of ttCurrentEvent.currentWordIndexes) {
|