figure out seeking method

This commit is contained in:
MoizAhmedd
2021-03-11 19:16:53 -05:00
parent a224ab06a2
commit d204fc27f8
2 changed files with 8 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ An extension that lets you search for words in a youtube video, and seeks to tha
- <s>Determine when you're on a video</s>
- <s>Get transcript of video given the video ID</s>
- <s>Write a function that will given a word and transcript get a list of timestamps</s>
- Write a function that will seek a youtube video to a timestamp
- <s>Write a function that will seek a youtube video to a timestamp</s>
- Searchbar + enter + shortcut logic
## Possible Pull Requests

View File

@@ -1,8 +1,12 @@
document.addEventListener('click', function(){
if (window.location.href.includes('watch')) {
chrome.runtime.sendMessage({type:"getTimestamp",word:"money"},function(response){
console.log(response);
//Seek to timestamp
document.addEventListener('keydown', function(e) {
console.log(e.code);
// chrome.runtime.sendMessage({type:"getTimestamp",word:"money"},function(response){
// console.log(response);
// //Seek to timestamp
// // document.getElementById('movie_player').seekTo(10,true)
// })
})
}
})