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

Netflix: add the ability to rewind by subs #31

Closed
Nitrino opened this issue Oct 20, 2019 · 0 comments · Fixed by #75
Closed

Netflix: add the ability to rewind by subs #31

Nitrino opened this issue Oct 20, 2019 · 0 comments · Fixed by #75
Labels
enhancement New feature or request
Milestone

Comments

@Nitrino
Copy link
Owner

Nitrino commented Oct 20, 2019

Related #14 (comment)
Netflix returns an error when rewinding through HTML5 video API.
image

Tricky way:
We can reuse netflix js.
In the chrome debugger we can find the player instance and rewind as follows:

let videoPlayer = netflix.appContext.state.playerApp.getAPI().videoPlayer;
let sessionId = videoPlayer.getAllPlayerSessionIds()[0];
let player = videoPlayer.getVideoPlayerBySessionId(sessionId);
player.seek(100000)

To use this, we need to inject our js in the page and configure the exchange of messages between page and extension

Example: https://github.com/jonnylin13/LongDistance/blob/61777d7970e2cedd3c2c5d36e6f8fb3a19ee66a0/extension/controller.js

@Nitrino Nitrino added the enhancement New feature or request label Oct 20, 2019
@Nitrino Nitrino added this to the v1.0 milestone Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant