ydshieh HF staff commited on
Commit
15444ff
1 Parent(s): 0c8b702

Update transcript-tracer.js

Browse files
Files changed (1) hide show
  1. transcript-tracer.js +1 -1
transcript-tracer.js CHANGED
@@ -435,7 +435,7 @@ function ttTimeUpdate(e) {
435
  }
436
 
437
  // Auto-scroll to the highlighted text
438
- if (ttAutoScroll) {
439
  var scrollOptions = { behavior: 'smooth', block: 'center', inline: 'nearest' }
440
  if (ttAutoScroll == 'block' && ttPreviousEvent?.blockIndex != ttCurrentEvent.blockIndex) {
441
  document.querySelector('.tt-current-block-container').scrollIntoView(scrollOptions);
 
435
  }
436
 
437
  // Auto-scroll to the highlighted text
438
+ if (ttAutoScroll && !ttActivePlayer.paused() && ttActivePlayer.duration != 0) {
439
  var scrollOptions = { behavior: 'smooth', block: 'center', inline: 'nearest' }
440
  if (ttAutoScroll == 'block' && ttPreviousEvent?.blockIndex != ttCurrentEvent.blockIndex) {
441
  document.querySelector('.tt-current-block-container').scrollIntoView(scrollOptions);