andrewleech / plugin.video.netflixbmc

NetfliXBMC - Unofficial Netflix Add-on (Win/OSX/Linux)
http://forum.kodi.tv/showthread.php?tid=211574
GNU General Public License v2.0
56 stars 29 forks source link

Customise keystrokes sent ("Default" volume in player) #57

Open WPettersson opened 9 years ago

WPettersson commented 9 years ago

So I see that xdotool (or other for different OSes) is used to "hide" the mouse. I have access to my mouse via my IR keyboard, so I actually got annoyed at that feature. At first I was going to just remove xdotool, but I had a better idea. For me at least, Netflix always starts at 100% volume when I start any new show (but if I've started watching an episode, it remembers my volume). What I did was tweak the script to send 10 "Down" keystrokes (sets volume to 0 no matter what it currently is) and then send 2 "Up" keystrokes to set it to 20%.

I figure the addon could have two (or more) options for what to do when starting Chrome. One is "try to hide the mouse pointer", aka do what it does now. A second one is "Try to set a default volume", which is send Down+Up strokes. More could be suggested by others.

One thing which needs to be considered is the delay before sending keystrokes. On my system I've done some tests, and 11 seconds works best. I'm thinking that could be another option people could set (with a default of 10? seconds).

I'll try to fix up some options and get a PR ready soon, but for now I wanted to see if other people had other things they wanted done when Netflix starts playing. Note that it has to be something easily doable via keystrokes, and I don't know of an exhaustive list of what keystrokes are available in Netflix.

PrplHaz4 commented 9 years ago

Doesn't look like the web player supports many options - but the idea is definitely interesting, and could lead the way to a better experience across platforms/devices....

https://help.netflix.com/article/en/node/24855?ba=GSButtonClick&q=

Space – Toggle Play/Pause
Enter – Toggle Play/Pause
PgUp – Play
PgDn – Pause
F – Full-screen
Esc – Exit full-screen
Shift+Left arrow – Rewind
Shift+Right arrow – Fast Forward
Up arrow – Volume Up
Down arrow – Volume Down
M – Mute toggle