Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Secondary subtitle doesn't sync with the content when using the Advertising standard membership #54

Open
KxxHyoRim opened this issue Jun 21, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@KxxHyoRim
Copy link

Hi! First of all, thanks for making this awesome program. I'm one of the users who's been really enjoying using this extension.

So recently, I switched over to the Advertising standard plan, and I ran into this little issue. The thing is, the second subtitle just keeps showing up even when the ads are playing, and it's not syncing up with the main content once the ads are done. So I have to refresh the page every time after the ads. Hope the subtitle can stay in sync with the video 👍

Thanks!

@KxxHyoRim KxxHyoRim changed the title [Enhancement] Secondary subtitle doesn't sync with the main content when using the Advertising standard membership [Enhancement] Secondary subtitle doesn't sync with the content when using the Advertising standard membership Jun 21, 2024
@gmertes gmertes added bug Something isn't working help wanted Extra attention is needed labels Jun 21, 2024
@gmertes
Copy link
Owner

gmertes commented Jun 21, 2024

That's annoying. I don't have the advertising plan... So it's going to be hard for me to debug this :/ Are you able to help?

Ideally I would need something that uniquely identifies the ad in the DOM that I can pick up with a mutation observer. I would need you or someone else with the ad plan to help find this.

Currently, the subtitles are synced with the video using the currentTime property of the video player element. The fact that subs keep playing during the ad tells me the ad is playing in the same video element as the show/movie. We might need to track how long every ad plays, and offset the currentTime by this amount when an ad is detected.

PR welcome. If someone is able to detect the ad, I can help with syncing the subs.

@KxxHyoRim
Copy link
Author

Whenever ads start, a <div> tag shows up, and then it goes away once the real video starts playing again.
(cf. The word '광고' means 'ads' in Korean.)

Whenever I check out several ads, I've noticed that the class IDs are the same.
Hope those IDs in the screenshot can help uniquely identify things for the observer you mentioned!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants