4 ms·
> Jiggle the mouse so the playback controls appear. Wait 10ms for the UI to respond. 1ms is apparently not enough. It doesn't seem necessary for the controls t
by bambax 11y ago
> Jiggle the mouse so the playback controls appear. Wait 10ms for the UI to respond. 1ms is apparently not enough.
It doesn't seem necessary for the controls to be visible, to be able to interact with them?
$('.player-control-button.player-play-pause.pause').click();
and
$('.player-control-button.player-play-pause.play').click();
seem to work (in the console) whether the controls are visible or not?
> Netflix doesn’t expose any JavaScript functions for manipulating video playback
Apparently the player used to be at netflix.cadmium.objects.videoPlayer() but it seems to not be there anymore.
netflix.player.diag.togglePanel("log") overlays a detailed log of a lot of things happening in the player.
netflix.player.getVersion() shows the current version of the player; mine is "2.0000.453.011".
Edit: showgoers.tv that aims to do the same thing, has a script for controlling the player at http://assets.showgoers.tv/sync2.js http://assets.showgoers.tv/sync2.js (minified) and as far as I can tell they too simulate clicks on the interface.
- bambax 11y agoCan't edit my original comment above anymore, but the video element listens for events play and pause; so, after adding jQuery to the page, you can do $("video").trigger("play") and $("video").trigger("pause") to play and pause the video. Don't know about seek, but it's probably in there somewhere (minified: http://secure.netflix.com/en_us/ffe/player/html/cadmium-playercore-2.0000.453.011.js http://secure.netflix.com/en_us/ffe/player/html/cadmium-play...).
- tetrep 11y agoi would assume mouse controls are used because they are less likely to have a breaking change pushed out silently by netflix than the "private" JavaScript APIs.
- bambax 11y agoTrue, but the classes that qualify the buttons can be changed by Netflix just as easily as anything else...