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

[BUG] Move by subtitles not working in Netflix #257

Open
ngoctint1lvc opened this issue Oct 30, 2024 · 0 comments
Open

[BUG] Move by subtitles not working in Netflix #257

ngoctint1lvc opened this issue Oct 30, 2024 · 0 comments

Comments

@ngoctint1lvc
Copy link

In the production build, the class name is changed, so detecting the streaming service based on streaming.constructor.name is incorrect. We must use streaming.name instead.

import Service from "@src/streamings/service";
export const moveVideoToTime = (video: HTMLVideoElement, streaming: Service, time: number) => {
if (streaming.constructor.name.toLowerCase() === "netflix") {
window.dispatchEvent(new CustomEvent("esNetflixSeek", { detail: time }));
} else {
video.currentTime = time / 1000;
}
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant