[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
MSP Gaya "Emulator" for Firefox
04-28-2009, 09:18 PM (This post was last modified: 06-01-2009 01:30 PM by allanmc.)
Post: #1
MSP Gaya "Emulator" for Firefox
Since i do not have a NMT, i'm having troubles developing a MSP plugin. Mostly the biggest problem was to test and understand the new extensions to the old HTML specification, described here:
http://www.networkedmediatank.com/downlo..._v1.2.html

So to help myself, and hopefully others, i have started creating a GreaseMonkey script for Firefox, which is supposed to emulate these HTML extensions.

Current feature list:
Code:
Keys supported:
- Numeric 0-9
- Page-up
- Page-down
- Repeat (use "r"-key on keyboard)
- Menu/Tab (use "t"-key on keyboard)
- Return/Back (use "b"-key on keyboard)
- Red(f1), Green (f2), Yellow (f3), Blue (f4)

Special attributes supported: tvid, OnKeyUpSet, OnKeyDownSet, OnKeyLeftSet, OnKeyRightSet, OnFocusSrc, OnFocusLoad, OnLoadSet

It will also draw the 720p screen size, and the draw area suggested in the Media Service Plugins specification.
The script can be found here: http://userscripts.org/scripts/show/47753

I'm having a hard time understanding how the UP/LEFT/RIGHT/DOWN joystick is used to navigate a MSP page when none of the above mentioned special attributes are used to specify what elements should be selected next. As a quick solution to this, when the items are named 1,2,3,4,5, etc, this script just selects the next numeric name if RIGHT/DOWN is pressed, and the previous numeric name if UP/LEFT is pressed - but of couse only if no action is specified for these keys using the special attributes. I don't know if this in reality is how the NMT acts? I hope people will try this, and tell me where the NMT acts different Smile

As a note, many MSP plugins does not give Firefox browsers the same HTML as NMT devices does. To solve this, i suggest using a Firefox extension to allow switching your user-agent value. I use this extension:
https://addons.mozilla.org/en-US/firefox/addon/59
And this user-agent value:
Code:
Syabas/01-17-081023-15-POP-403-000/15-POP Firefox/0.8.0+ (gaya1 TV Res1280x720; Browser Res1100x656-32bits; Res1280x720;

This script is only enabled for sites on the http://www.mspportal.com domain.

I hope someone finds this useful, atleast i doBig Grin

[Image: msp.th.png]

My setup: Popcorn Hour A-110 - Panasonic TH-37PX70 - Samsung BD-P2500 - Yamaha RX-V550
[Image: userbar93650.gif]
Visit this user's website Find all posts by this user
[+] 2 users say Thank You to allanmc for this post
04-29-2009, 10:09 PM
Post: #2
RE: MSP Gaya "Emulator" for Firefox
About the left/right/up/down navigation on a page, when no remote-keys has been assigned, i was wondering if it is the case that the navigation then simply sets focus to the next link-element in the page's DOM?

I can't find any information regarding this so i have to guess. How do other MSP developers make use of the left/right/up/down navigation without specifying their use explicitly with OnKeyUpSet, OnKeyDownSet, OnKeyLeftSet, OnKeyRightSet?

Please help someone Smile

My setup: Popcorn Hour A-110 - Panasonic TH-37PX70 - Samsung BD-P2500 - Yamaha RX-V550
[Image: userbar93650.gif]
Visit this user's website Find all posts by this user
04-30-2009, 11:41 AM
Post: #3
RE: MSP Gaya "Emulator" for Firefox
I added GreaseMonkey to firefox and installed your script, but am not seeing the red border outlines on the http://www.mspportal.com domain.

I can see the GreaseMonkey icon in the lower right status corner and it's enabled. Is there anything else that needs to be done to get it to work?

Thanks, this looks like it could be a great contribution!
Find all posts by this user
04-30-2009, 12:12 PM (This post was last modified: 04-30-2009 12:12 PM by allanmc.)
Post: #4
RE: MSP Gaya "Emulator" for Firefox
(04-30-2009 11:41 AM)jds580s Wrote:  I added GreaseMonkey to firefox and installed your script, but am not seeing the red border outlines on the http://www.mspportal.com domain.

I can see the GreaseMonkey icon in the lower right status corner and it's enabled. Is there anything else that needs to be done to get it to work?

Thanks, this looks like it could be a great contribution!
I'm glad someone is interested Smile

It seems like there was a minor mistake in the script as it was when you downloaded it from userscripts.org. I just updated it, so try to reinstall it, and everything should workSmile

Of course Firefox still doesn't render the page exactly as gaya does, but i will try to tweak it as much as possible. E.g. with the the Larry King Podcast MSP, i would believe that the highlight image should be located underneath the marquee text?

My setup: Popcorn Hour A-110 - Panasonic TH-37PX70 - Samsung BD-P2500 - Yamaha RX-V550
[Image: userbar93650.gif]
Visit this user's website Find all posts by this user
04-30-2009, 09:46 PM (This post was last modified: 05-01-2009 09:08 PM by allanmc.)
Post: #5
RE: MSP Gaya "Emulator" for Firefox
New update! Smile

Added features:
  • Support for colored keys RED (f1), GREEN (f2), YELLOW (f3) and BLUE(f4).
  • Removed Firefox's annoying focus outline
  • Improved support for ONFOCUS - the main MSP portal looks great now, see screenshot Wink

New screenshot of http://www.mspportal.com
[Image: nmt2.th.png]

It is very important that you change your user-agent, as explained in the first post, else most MSP plugins will look bad!

My setup: Popcorn Hour A-110 - Panasonic TH-37PX70 - Samsung BD-P2500 - Yamaha RX-V550
[Image: userbar93650.gif]
Visit this user's website Find all posts by this user
05-01-2009, 09:14 PM (This post was last modified: 05-01-2009 09:15 PM by allanmc.)
Post: #6
RE: MSP Gaya "Emulator" for Firefox
Updated again.
  • Now showing the background-image, which is moved to the "correct" location
  • Fixed some problems with "popup"-focus images shown below other content
  • Shows the draw area correctly with 0px,0px as top/left base
  • Fixed some major up/left/right/down navigatin issues - should now work on almost all MSP pages.

[Image: msp.th.png]

My setup: Popcorn Hour A-110 - Panasonic TH-37PX70 - Samsung BD-P2500 - Yamaha RX-V550
[Image: userbar93650.gif]
Visit this user's website Find all posts by this user
05-31-2009, 10:45 PM
Post: #7
RE: MSP Gaya "Emulator" for Firefox
@allenmc, great stuff man (thanks due!)

Played around with it and it all makes much more sense now. The screens look much better now!!!

Browsed the flickr plugin though and pressingthe "t" button for the menu didn't work though Sad
Find all posts by this user
06-01-2009, 12:28 AM
Post: #8
RE: MSP Gaya "Emulator" for Firefox
Thank you Matio, glad you like it Smile

I fixed that specific issue, so that it now will display. However, you will not be able to navigate to the popup menu-items... But atleast you can see them.

My setup: Popcorn Hour A-110 - Panasonic TH-37PX70 - Samsung BD-P2500 - Yamaha RX-V550
[Image: userbar93650.gif]
Visit this user's website Find all posts by this user
06-01-2009, 12:48 PM
Post: #9
RE: MSP Gaya "Emulator" for Firefox
lemme ask you allanmc, could this be adapted to view html files i created myself for the PCH on my pc?

If so it'd be helpfull in checking skins and index.htm files i've made instead of running back and forth with them Smile

It'd also be extremely helpfull in taking screen shots of the work

Pannasonic Plasma 50" -->HK254-->Emotiva xpa-5 & upa-2
A100 w/ 500gb HDD, A200 w/ mn100, c200 w/ 2.5" 250gb
Calm 2.1, YAMJ - Redefined 1.8a skin, Music Jukebox 8
WHS ex490 w/ 2.5tb's
Find all posts by this user
06-01-2009, 01:00 PM (This post was last modified: 06-01-2009 01:01 PM by allanmc.)
Post: #10
RE: MSP Gaya "Emulator" for Firefox
(06-01-2009 12:48 PM)excal Wrote:  lemme ask you allanmc, could this be adapted to view html files i created myself for the PCH on my pc?

If so it'd be helpfull in checking skins and index.htm files i've made instead of running back and forth with them Smile

It'd also be extremely helpfull in taking screen shots of the work

Yes that could be done rather easy. Greasemonkey scripts are simply javascript which is executed whenever are website's url matches the url'pattern specified in a greasemonkey script. So actually you could tell my "emulator" greasemonkey script to match your local files (files://*). However, when i have tried this myself, the greasemonkey script is misterously loaded two times, resulting in it being unusable. Another approach could be to simply store my script in a normal .js file, an include it in yout .html between in your head-tag.

Keep in mind that this will only try to draw the html/css as the Gaya browser, and enable the same navigation keys. It will not have the same limitations as the Gaya browser, since the browser engine still is Firefox's Gecko.

I would love to improve it according to your feedback. Hope you find it usefull Smile

My setup: Popcorn Hour A-110 - Panasonic TH-37PX70 - Samsung BD-P2500 - Yamaha RX-V550
[Image: userbar93650.gif]
Visit this user's website Find all posts by this user
06-01-2009, 01:13 PM
Post: #11
RE: MSP Gaya "Emulator" for Firefox
Hmmm i think i might be missing something still.

I included the js file as a script in my file i'm testing out. And i downloaded the User Agent switch....

I created a new user agent titled it PCH

and put

yabas/01-17-081023-15-POP-403-000/15-POP Firefox/0.8.0+ (gaya1 TV Res1280x720; Browser Res1100x656-32bits; Res1280x720;

in the "User Agent" line.

then i switched my user agent to PCH.... but it still looks like it would if i hadn't done all that.

I'm probably missing a step...any ideas?

Pannasonic Plasma 50" -->HK254-->Emotiva xpa-5 & upa-2
A100 w/ 500gb HDD, A200 w/ mn100, c200 w/ 2.5" 250gb
Calm 2.1, YAMJ - Redefined 1.8a skin, Music Jukebox 8
WHS ex490 w/ 2.5tb's
Find all posts by this user
06-01-2009, 01:18 PM (This post was last modified: 06-01-2009 01:18 PM by allanmc.)
Post: #12
RE: MSP Gaya "Emulator" for Firefox
(06-01-2009 01:13 PM)excal Wrote:  then i switched my user agent to PCH.... but it still looks like it would if i hadn't done all that.
The user-agent switch is only necessary if the page you are viewing has some user-agent check. This is most likely not the case with your local .html file. However many plugins on mspportal.com deliver different html when a browser other than Gaya requests a page. So the user-agent switch is just for situations like that, were it's important that we get the actual html that the Gaya browser would retrieve.

However, if the javascript doesn't do anything useful for your html file, then just send it to me, and i will take a look - optimize my script. Your can just send it to allanmc at the google mail domain Smile

My setup: Popcorn Hour A-110 - Panasonic TH-37PX70 - Samsung BD-P2500 - Yamaha RX-V550
[Image: userbar93650.gif]
Visit this user's website Find all posts by this user
06-01-2009, 01:24 PM
Post: #13
RE: MSP Gaya "Emulator" for Firefox
wow really great work Smile

-----------------------------------------------------------------------------------------------------
Syabas Technology Inc. DBA Popcornhour
Find all posts by this user
06-01-2009, 01:27 PM
Post: #14
RE: MSP Gaya "Emulator" for Firefox
Thanks werner, i appreciate itSmile

Btw, have you at Syabas considered releasing the source code for Gaya? This would make it possible for others to port it to e.g. Windows... I'm certain that alot developers, both with or without a NMT, would like this very much. It would make developmnet so much easier. Like excal said, no more running between the TV and PC. And in my case, no more screenshot asking :-) Gaya for Windows = 100% perfect emulator Smile

My setup: Popcorn Hour A-110 - Panasonic TH-37PX70 - Samsung BD-P2500 - Yamaha RX-V550
[Image: userbar93650.gif]
Visit this user's website Find all posts by this user
06-01-2009, 01:31 PM
Post: #15
RE: MSP Gaya "Emulator" for Firefox
yes i know but currently we wont release it also because gaya is our browser which fits into our system and for that we earn money Big Grin so to make it open it would kill our business, maybe if we switch away from gaya then we can start to think about it.

Regards,
Werner

-----------------------------------------------------------------------------------------------------
Syabas Technology Inc. DBA Popcornhour
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  What happened to MSP Community? Alexandro 33 11,730 10-22-2010 03:24 PM
Last Post: werner
Shield MSP Plugin Competition - October 2009 WINNER Last time chris57 15 6,279 11-16-2009 01:57 PM
Last Post: chris57
  MSP Community Site is up !!! webservices 11 17,432 10-28-2009 02:14 AM
Last Post: emcue
  MSP contest entry - It's Showtime sTyLeS 5 3,178 10-23-2009 03:31 PM
Last Post: sTyLeS
  MSP contest entry - Earth-touch.com deldel 7 3,635 10-22-2009 08:04 PM
Last Post: deldel
  Contest Entry - IMDb MSP Search genius995 2 2,728 10-19-2009 05:02 PM
Last Post: chris57
Shield MSP Plugin Competition - August 2009 Winner chris57 4 3,360 09-22-2009 03:26 PM
Last Post: sTyLeS
  MSP Plugin Competition Finishes chris57 6 3,585 09-21-2009 12:14 AM
Last Post: chris57
  How do I login in MSP Internet Radio plugin? izverg 2 4,701 08-18-2009 05:20 PM
Last Post: cisco1955
  msp (tag and timer questions ) lec 1 1,956 08-14-2009 08:34 PM
Last Post: lec

Forum Jump: