mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
feat: Add toast and speech triggers on timestamp click
This commit is contained in:
parent
feda315c2b
commit
2cb1b6be46
1 changed files with 5 additions and 0 deletions
|
@ -31,6 +31,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
timeLink.textContent = formattedTime;
|
timeLink.textContent = formattedTime;
|
||||||
timeLink.className = 'timestamp-link';
|
timeLink.className = 'timestamp-link';
|
||||||
timeLink.dataset.time = timeInSeconds;
|
timeLink.dataset.time = timeInSeconds;
|
||||||
|
timeLink.dataset.message = message;
|
||||||
|
|
||||||
// Add click event to seek the player
|
// Add click event to seek the player
|
||||||
timeLink.addEventListener('click', function(e) {
|
timeLink.addEventListener('click', function(e) {
|
||||||
|
@ -38,6 +39,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
if (player && typeof player.seek === 'function') {
|
if (player && typeof player.seek === 'function') {
|
||||||
player.seek(timeInSeconds);
|
player.seek(timeInSeconds);
|
||||||
player.play();
|
player.play();
|
||||||
|
|
||||||
|
// Also trigger toast and speech
|
||||||
|
showToast(message);
|
||||||
|
speakText(message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue