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?
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.
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