Age | Commit message (Collapse) | Author |
|
|
|
Netflix updater their player UI in early August 2021. This caused my
credits handling to stop working. Haven't tested it for series episodes,
only movies so far.
This gets fullscreen credits mostly working again. The only thing wrong
now is that the player controls appear for a few seconds when the
credits are re-maximised.
* Since the player element changed, we have to watch a different element
now. We can still use class names to partially revert the
minimisation.
* The `<video>` element has inline styles that minimise it. We need to
override these now to make it fullscreen.
* Promos are now in `.OriginalsPostPlay-BackgroundTrailer`, which is
rendered in front of the video, so this element must be hidden.
* In order to click the minimised video, we have to click the `<div>`
inside it which the click event is now bound to.
* Added some ideas for hiding the player when the minimised video is
clicked, but haven't solved that part yet. The problem there is that
previously, the controls were always present in the DOM, and hidden
with a class. Now, they're added to and removed from the DOM when
shown and hidden.
|
|
When the credits start playing, we click on the player, giving it the
`active` class, and causing the mouse cursor to appear. The cursor
should remain hidden.
|
|
|
|
|
|
Don't use `wait_element` to hide the controls. I had done that because I
thought that the element wasn't there after clicking the "Watch Credits"
button, and I had to wait for it before trying to hide it.
Turns out the reason why the credits weren't hiding was that I just
shadowed the `controls` variable. This waiting isn't necessary, and in
fact it's undesirable, because it causes the player controls to appear
for a second before being hidden instead of not appearing at all.
|
|
TV series on Netflix now display a "Watch Credits" button when the
credits start rolling.
We can hide this button using CSS and the credits will continue playing
to the end, but while it's displayed, the player controls are hidden.
Automatically click the button to make it go away and reactivate the
player controls.
The tricky thing, though, is that the "Watch Credits" button doesn't
have a click handler. Instead, it listens to the "pointerdown" event, so
we have to construct one programmatically (and turn on `bubbles`,
otherwise the button doesn't react to the event) and dispatch it.
Moved `with_player` to `wait_element`, because now I need to wait for
more DOM elements than just the player element.
Add a new `controls` module since I need to hide the player controls in
both `fullscreen_credits` and `watch_credits`.
Add the `DOM` lib to `tsconfig.json` to give us DOM types.
|