MCPcopy Index your code
hub / github.com/iChochy/NCE / playLyricAtIndex

Method playLyricAtIndex

js/ReadingSystem.js:454–465  ·  view source on GitHub ↗

* 从指定时间播放 * @param {number} index - 歌词索引 * @param {number} time - 播放时间

(index, time)

Source from the content-addressed store, hash-verified

452 * @param {number} time - 播放时间
453 */
454 playLyricAtIndex(index, time) {
455 if (!this.dom.audioPlayer) return;
456
457 // 验证时间值是否为有效的有限数值
458 if (!Number.isFinite(time)) {
459 console.warn('Invalid time value for playback:', time);
460 return;
461 }
462
463 this.dom.audioPlayer.currentTime = time;
464 this.dom.audioPlayer.play();
465 }
466
467 /**
468 * 保存播放进度

Callers 1

handleLyricActivateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected