SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageMC Custom Interface (http://forums.sagetv.com/forums/forumdisplay.php?f=41)
-   -   Netflix Control: A Netflix Silverlight Remote Control Script (http://forums.sagetv.com/forums/showthread.php?t=38969)

SteveD 02-19-2009 06:05 PM

Ok thanks for the attempt.

brainbone 02-21-2009 12:31 PM

Netflix Control v2 test1:

Because of the various problems putting silverlight in full screen brings, I decided to test a different method of making the netflix silverlight player go "full screen". I say "full screen" in quotes because what this method actually does is just enlarge the browser window to the point where the movie takes up the full screen, then attempts to mask off any of the ugly bits of the browser.

The attached is a very early test of this method. It will have problems.

Note: If you use this on a system with more than one display, you will need to make sure IE is launched in kiosk mode (-k switch). Otherwise, bits of the IE window will be visible on your other display(s).

You will see flickering when the netflix navigation bar is displayed/hidden.

You may have problems with the player window, or black mask borders sticking at the topmost position. In this case, you'll need to go into task manager and kill IE and AutoHotKey.

You may have issues where your task-bar disappears.

EDIT: Use v2 test2, below.

brainbone 02-22-2009 02:21 PM

Netflix Control v2 test2:

This is an update to Netflix Control v2 test1, above.

Changes:

- Created "settings.ini" file to allow easy adjustment of how long the navigation bar takes to hide, if the TaskBar should be hidden or not, and the ability to specify a window that should be kept in focus.

- Mouse/Keyboard input is blocked while controlling the netflix silverlight player (during a click, etc.).

- Hiding/Showing of netflix player navigation bar should be more smooth.

Feedback would be appreciated.

EDIT: Use v2 test3, below.

brainbone 02-23-2009 09:21 PM

1 Attachment(s)
Netflix Control v2 test3:

This is an update to Netflix Control v2 test2, above.

Changes:

- Navigation buttons were not always properly located, especially if player needed to buffer for a long period of time. Make sure you replace the old "netflix_player_buttons" folder with the new v2 test3 one.

- Changed method for hiding/showing Windows TaskBar. Previous method forced "Always On Top" off after showing the taskbar.

As always, feedback appreciated.

mikesm 02-24-2009 03:02 PM

Brainbone, I already run the lmgestion remote control plugin (as opposed to eventghost). I'm trying to get your plugin to work with it. Can you take a look at this page: http://www.lmgestion.net/@en-us/4/22/60/78/article.asp

The reason is that I am confused as to which window class, title and executable I should be using to control the silverlight plugin - should I specify these for the actual plugin, or for ie once the window has begun to play?

I'm trying to avoid having to learn eventghost...

brainbone 02-24-2009 04:25 PM

Send to the window class of "AutoHotKey" and the window title of "NetflixSilverlightControl".

Look at the first post in this topic, and scroll down to "Using SendMessage() to instruct Netflix Control from your application:". That relates to the FindWindow and SendMessage actions in the article you gave.

Edit:

While the "NetflixSilverlightControl" is the window you want to send commands to, you'll want to be sending those commands to that window only when an IE window with the title "Netflix: Netflix Movie Viewer - Windows Internet Explorer" is active.

You should be using netflix_silverlight_control.exe (not netflix_control.exe)

mikesm 02-24-2009 09:11 PM

Quote:

Originally Posted by brainbone (Post 340736)
Send to the window class of "AutoHotKey" and the window title of "NetflixSilverlightControl".

Look at the first post in this topic, and scroll down to "Using SendMessage() to instruct Netflix Control from your application:". That relates to the FindWindow and SendMessage actions in the article you gave.

Edit:

While the "NetflixSilverlightControl" is the window you want to send commands to, you'll want to be sending those commands to that window only when an IE window with the title "Netflix: Netflix Movie Viewer - Windows Internet Explorer" is active.

You should be using netflix_silverlight_control.exe (not netflix_control.exe)

It doesn't seem to work for me. IE kicks off and I get a full screen player, but stop is the only button that is working. I suspect it's the IE screen that's in focus, and therefore the lm plugin doesn't think netflix_silverlight-control.exe should be getting the commands.

Any ideas?

brainbone 02-24-2009 10:09 PM

Quote:

Originally Posted by mikesm (Post 340789)
It doesn't seem to work for me. IE kicks off and I get a full screen player, but stop is the only button that is working. I suspect it's the IE screen that's in focus, and therefore the lm plugin doesn't think netflix_silverlight-control.exe should be getting the commands.

Any ideas?

In the "Profile" section:

Name: (whatever you want)
Window Class: (leave blank)
Window Title: Netflix: Netflix Movie Viewer - Windows Internet Explorer
Executable name: (leave blank)

Now, for each remote button action in this profile, you need to:
FindWindow: searching for a windows with a class of "AutoHotKey" and a title of "NetflixSilverlightControl"
SendMessage: with a wParam of 10 and an lParam of 100-110 (see first post in this thread for details) to the window found in FindWindow.

mikesm 02-25-2009 12:19 AM

Quote:

Originally Posted by brainbone (Post 340798)
In the "Profile" section:

Name: (whatever you want)
Window Class: (leave blank)
Window Title: Netflix: Netflix Movie Viewer - Windows Internet Explorer
Executable name: (leave blank)

Now, for each remote button action in this profile, you need to:
FindWindow: searching for a windows with a class of "AutoHotKey" and a title of "NetflixSilverlightControl"
SendMessage: with a wParam of 10 and an lParam of 100-110 (see first post in this thread for details) to the window found in FindWindow.

I did all that, but it didn't work either. Doing a trace of the commands recieved, it still shows the active window was sageclient, and so it never triggered the netflix sliverlight plugin profile at all. Stop, the arrow keys, etc... are passed through, so they actually work in the plugin. Everything else doesn't seem to work since the profile didn't change.

This must have something to do with the way morgan's plugin calls ie - the powerdvd profile works because I have a dynamic menu item that runs a system command (in this case power dvd), and when it fires up in full screen mode, it becomes the active window.

Any ideas on where to go from here? It's kind of workable now, using just the arrow heys on the remote and stop. But it would be nice to get the added control capabilities.

thx
mike

brainbone 02-25-2009 07:10 AM

What version of Netflix Control are you using?

mikesm 02-25-2009 08:43 AM

Quote:

Originally Posted by brainbone (Post 340840)
What version of Netflix Control are you using?

0.9.

thx
mike

brainbone 02-25-2009 09:07 AM

Try v2 test3.

After updating to v2 test3, check the "Bring application window to foreground" option in your LM Remote profile.

Note that you should run "netflix_silverlight_control.exe", not "netflix_control.exe". Right click both of the green H's in your sys-tray and click "exit". Then only run "netflix_silverlight_control.exe". You should now only see one green "H". (Now that netflix_control.exe is not running, your arrows and stop button will not work until you have LM Remote working properly)

To be clear:
netflix_silverlight_control.exe is the actual control program.

netflix_control.exe captures keystrokes and sends them to netflix_silverlight_control.exe. It should not be used when configuring your remote control software to communication with netflix_silverlight_control.exe directly.

I know the naming I used is confusing. I'll likely be changing it in the future.

mikesm 02-25-2009 12:18 PM

Quote:

Originally Posted by brainbone (Post 340864)
Try v2 test3.

After updating to v2 test3, check the "Bring application window to foreground" option in your LM Remote profile.

Note that you should run "netflix_silverlight_control.exe", not "netflix_control.exe". Right click both of the green H's in your sys-tray and click "exit". Then only run "netflix_silverlight_control.exe". You should now only see one green "H". (Now that netflix_control.exe is not running, your arrows and stop button will not work until you have LM Remote working properly)

To be clear:
netflix_silverlight_control.exe is the actual control program.

netflix_control.exe captures keystrokes and sends them to netflix_silverlight_control.exe. It should not be used when configuring your remote control software to communication with netflix_silverlight_control.exe directly.

I know the naming I used is confusing. I'll likely be changing it in the future.

Ok, will try that tonight. Sorry for the confusion...

xelfer 07-22-2009 11:57 AM

Has anyone noticed after Silverlight 3 update (my computers began prompting me last night) that the netflix_silverlight_control.exe isn't finding the pause button? It finds the Fullscreen button, but not the Pause.

I did some more digging and with some extreme zoom in Photoshop, the anti-aliasing on the leading edge of some controls (like next chapter, pause, etc) has a different edge from the base images for the control.

Now here's the kicker... it is different on different graphics cards. One computer still works with the old images, but another needed the new images. Something about SL3 using the GPU instead of CPU is doing the aliasing differently.

I may try and figure out a way to test for all the variations since a lot of people will still have Silverlight 2 for a long time.

xelfer 07-22-2009 12:36 PM

Adding a *5 to the ImageSearch inside of GetButtonPos was enough to compensate for the GPU differences on my computers.

The line now reads:

ImageSearch, FoundX, FoundY, 0, %y_start%, A_ScreenWidth, A_ScreenHeight, *5 %full_image_path%

xelfer 07-29-2009 10:41 AM

On 7/27/2009, Netflix appears to have released a newer Silverlight player. This time, the AHK program lost the ability to move the timeline. The change appears surgically directed at the AHK approach.

When the timeline move command comes in, the AHK enters a loop to click the mouse down and move the cursor. As long as the next command comes in before the timer expires, the cursor keeps moving. As of 7/27, the timeline would only make 1 move (regardless of how fast you sent commands) before jumping to that time. I added some debug to the code and found that AHK never sent the mouse up (release that allows the player to proceed until the timer expired. So why was the player jumping in time?

Turns out, the cursor move loop also issues gratuitous mouse-down commands on each loop. Netflix now interprets those extra mouse-downs as mouse-up. Afterall, how can you have another mouse down if the mouse is already down, so you must have meant mouse up.

I added a flag to test for the mouse being down and to NOT issue gratuitous mouse-down events. Now the timeline move works again.

homie 10-17-2010 07:46 AM

Not working when zoom active, volume control questionable
 
I tested and confirmed that netflix_silverlight_control.exe does not work (at all) when Netflix is opened in IE and a zoom level other than 100% is selected.

Also, on my system the volume control actions set the mouse pointer to the volume control element in the player but don't actively change the volume level. Mute works, though.

The jump back/ahead actions don't allow to advance all the way, i.e. to the beginning or the end.

dhgb256 04-26-2011 08:11 AM

Brainbone,

Any chance you'd be willing to help me with my Netflix program? I need to find the episode forward and back buttons in silverlight and I have no idea how to go about that. Any help you'd be willing to give is greatly appreciated!

-DH

kiki51 04-20-2013 06:40 AM

Hi all

I'm using a silverlight player on a french website like Netflix.
The website is here :
http://www.canalsat.fr/decouvrir-liv...6-live-tv.html

I would like to take control of this player using your script, I have made some modification but it's difficult to have something good.

I think the interface of Netflix is very different then the interface of the website I want to remote control.

Now, I can close the player, play/pause is OK.
I have to build the code line for full screen, volume up and down, and navigate between channels.

I anyone can help me, it will be very cool

Thanks

Eric

Fuzzy 04-22-2013 01:44 PM

There are a few mouse recording macro style programs that should be sufficient for replaying a mouse click on the screen. I don't think you'll get much help from this script - for starters, it's pretty old, and also, I'm not sure anyone really uses it anymore (I think those sage users that are using netflix are doing so via 7MC or PlayOn).


All times are GMT -6. The time now is 08:19 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.