Integrate Cling with JScript and HTML5

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Integrate Cling with JScript and HTML5

ash5
Hi All,

I have been using Cling for quiet sometime, I am using Cling within Android app.

Just out of curiosity, I was thinking if it were ever possible to make a HTML5 (with JS) application using cling's libraries in the background.. kind of a HTML5 app for UPnP media listing.

Has anybody written or tried doing this? Can you please share your experience?

Thanks
ash5
Reply | Threaded
Open this post in threaded view
|

Re: Integrate Cling with JScript and HTML5

Michael Pujos
ash5 wrote
Hi All,

I have been using Cling for quiet sometime, I am using Cling within Android app.

Just out of curiosity, I was thinking if it were ever possible to make a HTML5 (with JS) application using cling's libraries in the background.. kind of a HTML5 app for UPnP media listing.

Has anybody written or tried doing this? Can you please share your experience?

Thanks
ash5
Yes it is possible. You will need a server app in Java running a web server + Cling. Then you can make a client in JS (or better: GWT) for the UI, connecting and talking to the web server through RPC, REST or whatever.

For the Web Server I recommend Jetty as it is highly configurable but there are many other choices.

Reply | Threaded
Open this post in threaded view
|

Re: Integrate Cling with JScript and HTML5

Christian Bauer
Administrator
The Cling Bridge module already provides an HTTP interface to the UPnP stack.
Reply | Threaded
Open this post in threaded view
|

Re: Integrate Cling with JScript and HTML5

ash5
In reply to this post by Michael Pujos
Thanks Pujos,

But this requires my server to within the same domain as my device (media server), I could have a device just connected to my home network and I would want to browse my media from the App.
Reply | Threaded
Open this post in threaded view
|

Re: Integrate Cling with JScript and HTML5

phu_nguyen
In reply to this post by ash5
Take a look at PhoneGap framework. You can build a UI with HTML5 and JS, then write a PhoneGap plugin to make some call to your native (I mean Java) code. Other thing like start UPnPService, device discovery, calling actions... can handle in native code, and you can call a JS function back from native code to JS for update your HTML UI
Thanks & Best Regards,
Phú Nguyễn
Reply | Threaded
Open this post in threaded view
|

Re: Integrate Cling with JScript and HTML5

ash5
Cool, this exactly what I was looking for :) Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Integrate Cling with JScript and HTML5

bains
In reply to this post by phu_nguyen
is this possible for you to give any source code of using phone gap with cling ???????