isaackd/AnnotationsRestored

Annotation Renderer doesn't stop when video is navigated away from

Closed this issue · 4 comments

Annotation Renderer doesn't stop when video is navigated away from

Also when a new video is played, if no annotations are available, annotation data from the previous video will be shown

I was trying to work on this, but I don't really know much JS (I'm more familiar with Python.) What I believe causes the problem is that video navigation on YouTube does not fully reload/reset the page, leaving the modified DOM in the page. So the renderer needs to reset itself when navigation occurs. (I also noticed several helpful-looking events under "Event Listeners" in the browser dev tools including: yt-navigate, yt-navigate-finish, etc.)

Yeah it looks like that's the problem. I'll probably handle it on the background script since it's already setup to react to when a new video is loaded (so the annotations can be retrieved).

Fixed with 65c5e2e