Kodi Community Forum
[Web Interface Addon] Web Base - Gesture Remote Control for iPhone/iPod Touch/Android - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Web Interfaces (https://forum.kodi.tv/forumdisplay.php?fid=156)
+---- Thread: [Web Interface Addon] Web Base - Gesture Remote Control for iPhone/iPod Touch/Android (/showthread.php?tid=73192)



[Web Interface Addon] Web Base - Gesture Remote Control for iPhone/iPod Touch/Android - peprasetya - 2010-05-03

Greeting,

I'm not sure that this room is for my thread or no. Admin please fix if it's on the wrong place.
In recent days, I was playing with touch api of mobile safari on iPhone. As it is webkit based, some other webkit based browser that have touch capability may use it, like Android. WebOs is not supported as it does not support for touch base event.

Basic idea is remote XBMC via iPhone/iPod Touch.
There is already some application on iTunes App Store, but having some alternative is not a bad thing. Especially the gesture based remote only available on paid app.

I prefer gesture based for remote, as on touch based devices we lost the feel of physical button, we could not just feel where is the center button, then move finger for arrows, we need to see the devices to tap the right point. With gesture based remote, we does not need to care where we start to touch and were end, just how we move our finger.

Download http://web1.spot.net.id/wtouch.zip

Install:
  1. Download the wtouch.zip Big Grin
  2. Extract it into XBMC application web folder.
    • On linux should be /usr/share/xbmc/web/
    • On os x should be /Applications/XBMC.app/Contents/Resources/XBMC/web/
    • On windows should be c:\Program Files\XBMC\web\
    You should have a new folder wtouch under the web folder.
  3. Open safari on iPhone/iPod Touch, browse to http://(yourip):8080/wtouch/
    The last slash (/) as important for images as it used relative path in the html.
  4. Tap on (+) sign and select Add to Home Screen. This will give the webapp as full screen, no more url bar, no bottom tool bar.

Usage:
Press the help button on the app for more usage Big Grin

Any comments and suggestion are welcomed. May need help to fix my english for the help page or any documentation.

Oh BTW, I'm no longer going through SVN these days, So i'm just use XBMC 0911. As XBMC change the Web Server, if things was changed on the httpcommand api, this module may not work too.
Just testing and updating to comply with XBMC 10.5.

And if you are using SVN, there is extra feature that use the new jsonRPC.


- topfs2 - 2010-05-03

Nice!

peprasetya Wrote:Oh BTW, I'm no longer going through SVN these days, So i'm just use XBMC 0911. As XBMC change the Web Server, if things was changed on the httpcommand api, this module may not work too.

Just wanted to comment on this, new web server can't do asp at all so it won't work Sad

New webserver still can do httpapi but not via asp, it has to be done client side with java script or similair.

Cheers,
Tobias


- peprasetya - 2010-05-03

I'm using name default.asp as it was the first file to be found by the old webserver. Actually it is a plain html, nothing of server-side script on the default.asp.

This is purely work on javascript and ajax. The issue, if the the new webserver does not handle file other than extension html/htm


- peprasetya - 2010-05-04

I'm just update my fedora box to latest XBMC SVN, and make a little change and copy default.asp to index.html. They both are identical files, as I keep the default.asp for old version XBMC while index.html for the new one.

So hoping it can be test. And I have just look at the new JSONRPC, and I think it is really great and will ease my plan on making browse media Smile

Anyway any comments and suggestion are more than welcome.


- nonpolar - 2010-05-04

Tested on XBMC on XBOX with webOS. I am seeing the page and I am able to open the help menu and the "keyboard" (looks like a textfield).

Unfortunately swiping or tapping does nothing No


- peprasetya - 2010-05-05

nonpolar Wrote:Tested on XBMC on XBOX with webOS. I am seeing the page and I am able to open the help menu and the "keyboard" (looks like a textfield).

Unfortunately swiping or tapping does nothing No

Uhm, sorry then, it's just mean Palm not implement event ontouchstart, ontouchend, ontouchmove and ontouchcancel.
I will try to look on webos Dev site, but could not do much, as I can't get have any webos devices.

The implementation the touch even on android is also lagging if compared to iPhoneOS. As the Android Browser just support event for single touch, and this prevent me to extend multitouch gesture on this project. While safari on iPhone may support 3 touch at max


- peprasetya - 2010-05-10

Update version 0.2

A little update to make a better gesture swipe left then swipe right (esc key) and swipe right-left (tab key)


- peprasetya - 2010-05-14

Just have fun with the JSONRPC and time for little update.

Since jsonRPC only supported on svn, from current version the default.asp is differ than index.html. default.asp will no longer develop, and it is there to maintain compatibility with XBMC 0911. default.asp version will remain 0.2

While index.html is using the old xbmcCmds for sending keystroke (Is it will be deprecated and removed in future? If so what is the replacement in jsonRPC?) and also use the new jsonRPC for Now Playing Feature and Browse Media.

I test this under svn 30092.

I will post some suggestion for jsonRPC on the specific thread for it. Within the still minimal documentation of jsonRPC, I'm just adapt on the existing web provided in SVN. There might be some tricky way to resolve and not all function will work.

1. Now Playing.
This feature implement in automatically way, once the web see there is a media played, it will show the thumbnail (cover art) as the main picture and show status if the title, time, and remaining time.
Known Limitation
  • The cover art displayed under background image, thus there is no way to resized the image to fit on small display. I was try use tag img, and the result is not good on my iphone when I keep change the orientation, the image not back to first size.
  • As I do not know, if there is way to know wether the media played under state Play or Pause, the time may keep change on sometime and if it see there is no change on time, the timer will be stopped.
  • To reduce the process weight, the timer is refreshen to XBMC for each 15 second, except if there is touch event, it will do refresh. To keep the timer work each second, I use separate time counter that work fully in client/browser.

2. Browse Media
There is new button to browse the media. I adapted most code from example web included in svn.
Known Limitation
  • I'm using default images from example web, so it might not good as the sample web use black background for browsing, while my browse media use white background
  • When you browse Video or Music, there is no way to select a file to play, I do not know the command or parameter for XBMC.play.
  • Music could not browse via artist, album or etc, As I do not have good enough library to test it well, might need some more time to learn converting from my iTunes library to XBMC friendly lib.

Another note about WebOs User, I really could not help, as WebOs still does not implement touch base event. So till now only iPhone/iPod Touch and Android. Is there someone use this wTouch with android?

Current version 0.2.9.0


- topfs2 - 2010-05-14

httpapi will get deprecated but not until jsonrpc is fully able to do what httpapi is able to do, so might take a while.

Anyways, nice work!


- peprasetya - 2010-05-14

There was a problem on ver 0.2.9.0, the the Now Playing was not update to latest SVN.

You can redownload again to get 0.2.9.1, fixed for the Now Playing feature, at least on SVN 30092.

Also in Browse Media, now can call a file to be played by XBMC. Thanks topfs2.


- Elbert - 2010-09-22

Just grabbed your webinterface from the repo; have to say it looks very promising! Thanks a lot for your hard work.


- peprasetya - 2010-10-15

Uhm sorry for updating this thread after wTouch appears on Add-ons Repositories.

And i think, this thread should stop and I open new Thread under sub forum
Supplemental Tools for XBMC

So any discussion, comment and suggestion might be better thrown over the new one.
http://forum.xbmc.org/showthread.php?tid=83243