mobile http remote
xbmc mhr
an ajax web skin for mobile devices


mhr is a xmbc webserver skin. it will act as and like a remote control
and is not ment to be a full featured gui. therefore it actually is a
little ajax app that transfers keypress actions to your xbmc.

- enable web server api on your xbmc.
- download, unzip, and place /mhr folder inside /web folder of
your xbmc installation. we dont want to replace other web apis
we want to have this as an aditional web frontend.
- on your mobile device start a browser and navigate to:
http://[your xbmc ip and port]/mhr/
- follow instructions on your device: mhr wants to map device
specific key codes so it actually knows what key you are pressing.
it will save the mapping inside a cookie, so as long as that will
be kept by the device, you dont have to do it again next time.
when you use a touch screen, you can skip the mapping thing and
press "start" at once.
- whenever an action is triggered you can see two text lines left top
of the screen: 1) what action and 2) the status of the sending

- the mhr "skin" is more like a little ajax app. so it will not
present you "links" to some web api calls but will try to
interact with you via key- (and click-) events and will present
you a nice gui
- its a remote. it does not care about the current state of the
xbmc. its just a remote control.
- as said, it will store a key mapping, so hope everyone gets the
numpad and the left/right/up/down/ok mapped correctly.
- written to work with most browsers. so test it via a normal browser,
i have designed and tested it for a nokia s60 browser. if it wont
work with your 2004 wap browser, go and buy yourself a new phone.
if you experience flaws with your modern device, let me know.

- up, down, left, right
- ok (that one pretty much means play)
- 1 : queue (looks like play but actually enqueues items to playlist)
- 2 : pause
- 3 : stop
- 4 : play previous
- 5 : start (mostly starts something like osd)
- 6 : play next
- 7 : back (mostly kicks you out of whatever you are about to do)
- 8 : b (kicks you back just a little bit like closing osd)
- 9 : playing (black key on xb controller, toggles to and from playlist view)
- * : context (white key on xb controller, mostly opens context menu or info)
- 0 : screen (x key on xb controller, toggles full screen or visualization)
- # : shutdown (right thumb key on xb controller, displays shutdown menu)

(released 2009-10ish)

installation: put unpacked folder
'mhr' inside
'web' folder.
run xbmc, start its webserver, establish wifi or whatever, start a browser on your
mobile device, then open webpage: http://your.xbmc.ip:and port/mhr/

release notes:
2009-10-cant remember:

initial release. here goes the blabla:
loved my xbox 1, loved xbmp and xbmc, loved my xbox remote control.
grew older. bought new hardware. finally bought a pc next to the tv.
found out bout xbmc for x86, fell in love again. missed my remote control.
found other mini web apis like "mobileXBMC 2.0". used it with phone. bah.
drank a lot more.
hacking a web api of html and javascript to aim a remote control experience.

so i decided to somewhat make it configurable but it would have been way
too much hassle to implement free keyboard mapping. so i designed a keypad
and decided what keys to transfer what action. it can be changed by making
new images and css in skin folder and by hacking the command table in

it works via keypress events and thats why the thing needs the keycodes
of your browser/phone, since i dont trust them to be equal enough across
devices. you can still skip that and use it via click events when you
have a touch screen. mapping will be stored in a cookie on the phone.

since no xhr is supported widely i do it via an iframe. still i manage
everything that goes there and process the response from xbmc and send
the next command when the previous is processed. i queue a bunch of them
so you can press three times down very fast and they are sent out in a
row not swallowing any.

this relys on an iframe onload listener. its not 100% standard confy but
seems to work on all browsers i tested.

removed some flaws of mobile browsers handling dynamic focusable elements.

finally i put in a meta that should force iphones into proper zoom.

ahh and i finally replaces play on the 1 key with queue without changing
the icon. aetsch.