Web Browser integrated into XBMC - HTML Layout Engine with a GUI embedded into XBMC?

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Temar Offline
Senior Member
Posts: 259
Joined: Nov 2008
Reputation: 8
Post: #251
maruchan Wrote:The main issues I see with Berkelium are that it lacks Javascript bindings...

What do you mean by JS bindings? JS bindings in the sense of event bindings or bindings in the sense of callbacks to the C++ code? At least the latter seems to be supported.

Quote:...and only supports Flash at the moment.

That indeed is a disadvantage. For me however the main concern is how fast a working version can be implemented. I really don't care if we use firefox, webkit or any other library. The problem is that projects which require huge prerequisites mostly never get finished because people tend to underestimate the amount of work required. That's why I would prefer a library which allows us to concentrate on the main feature (the browser) and the integration into XBMC.

I asked motd2k in the other thread if we can get our hands on his source code, as he already has a more or less working version of a webkit implementation.
find quote
amejia Offline
Team-XBMC Developer
Posts: 111
Joined: Dec 2008
Reputation: 0
Post: #252
I mentioned this in another thread. Last I checked, berkelium is a heavily modified version of Google chrome. To use it requires shipping the entire binary (all of google chrome) plus it's own version of ffmpeg libs. This is a major reason why using an implementation of webkit from one of the widget libraries like Qt or GTK is better.

One can search for llqtwebkit to see how to use qtwebkit inside an opengl app like xbmc. What I think should be done is implement support for Qt widgets inside xbmc. Then implementing a qtwebkit widget (a web browser) should be easy.

Implementing support for Qt widgets is not a trivial task however.
find quote
Temar Offline
Senior Member
Posts: 259
Joined: Nov 2008
Reputation: 8
Post: #253
ceros Wrote:What I think should be done is implement support for Qt widgets inside xbmc. Then implementing a qtwebkit widget (a web browser) should be easy.

I totally agree with you, that this would be the best solution. However, speaking for myself only, I do not have that amount of time available. I'm in between jobs atm, so I have some time for a little project, but as soon as I start my new job things will look different. Overall it makes no sense for me to start such a huge project as I already know that I will probably never finish it.

So if anyone wants to take a lead on that project, I'm willing to help but I will probably drop off halfway (or at least won't be able to contribute that much).
(This post was last modified: 2010-11-30 23:47 by Temar.)
find quote
FishOil Offline
Posting Freak
Posts: 836
Joined: May 2009
Reputation: 8
Post: #254
I think the Boxee browser would be a good start. How do they do it?
(This post was last modified: 2011-04-26 10:54 by FishOil.)
find quote
maruchan Offline
Fan
Posts: 311
Joined: Feb 2009
Reputation: 0
Post: #255
FishOil Wrote:I think the Boxee browser would be a good start. How do they do it?

As far as I'm aware, their implementation is closed source.
find quote
serp Offline
Junior Member
Posts: 5
Joined: Nov 2010
Reputation: 0
Post: #256
Lighthouse project intro from Nokia:-

http://labs.qt.nokia.com/2009/10/02/intr...-platform/

Looks like they wrote a small amount of code to port QT to a new platform. Sounds too good to be true. I'll investigate and get back to you.

If this works then it would be brilliant. Using the built in qtwebkit library would be a good basic start for our project.
find quote
serp Offline
Junior Member
Posts: 5
Joined: Nov 2010
Reputation: 0
Smile  Figured it out... Post: #257
Ok so here's the master plan as far as I can figure it out. Only really looked in to it to a particular depth, so if anyone sees any gaping holes please let me know.

If we use Qt/Embedded we can also use the Lighthouse project from Nokia to create code representing the underlying platform that Qt is expected to sit in. In our case this is pure OpenGL C++ code. This project has implemented simple examples within 128 lines of code, so is a good place to start.

The browser application itself is to be written in Qt making use of the QtWebKit library for rendering support. This gives us a feature rich browser. (I need to check if it can do Flash, Silverlight, etc.)

We then create an XBMC add-on that will initialise the Qt OpenGL platform and start the browser Qt application. This will control things like showing fullscreen or not, deciding which mouse/keyboard events to pass on or handle itself (E.g. Escape to leave the browser for the main menu). We could also develop an add-on to list bookmarks within other menus (E.g. BBC iPlayer URL within TV Shows, or Google Search within Programs.)

This would leave navigation control mappings configurable within XBMC which is desirable given the difference between keyboard/mouse vs. remote controls/game controllers. It would also provide other XBMC add on developers with a working Qt development option to create new applications, and potentially allow us to expose existing Qt application within the XBMC platform. This should work on all platforms too, so long as there is XBMC and an OpenGL layer.

Does this sound like a sensible approach?

I've downloaded Lighthouse and I'll try and get a basic OpenGL layer working so I can at least draw a WebKit browser hardcoded to a URL (I'll try BBC News and BBC iPlayer to test). Just need to get XBMC working properly with Xcode first. For some reason there are 'missing' files according to the Xcode project file.

Not sure how much time this will take, or how much time I'll have to devote to it. I'll post to this forum topic with any progress or delays though.
find quote
amejia Offline
Team-XBMC Developer
Posts: 111
Joined: Dec 2008
Reputation: 0
Post: #258
As far as I know, you probably don't even need to worry about what implementation of Qt to use, whether it be Qt/Embedded, Qt/X11, and so on. As a matter of fact, Qt/Embedded and Qt/X11 are built from the same source. Instead you should focus on the high level details of getting a Qt widget running inside a 3D texture (i.e. inside a texture in XBMC). Ideally, if you stay at a high level, it's more likely that support for Qt widgets can be implemented more easily on all supported platforms (Windows, OSX, Linux, and possibly FreeBSD in the near future).

Some of the high level details to worry about should include how to initialize the Qt library, how to process Qt events, and how to map keyboard and mouse events back and forth from XBMC and Qt widgets.

You could start by building a demo app using QGraphicsWebView and GLUT to test out the keyboard and mouse input mapping.
find quote
serp Offline
Junior Member
Posts: 5
Joined: Nov 2010
Reputation: 0
Rainbow  Progress so far... Post: #259
Hi ceros. That's pretty much what I thought. I've created an OpenGL Qt Platform. Just getting it compiling (not done hard core C++ in a while). Once I have this drawing in a resizeable OpenGL viewport I'll start looking at interaction. The code is already there for that.

I would imagine I'll need to make the layer pluggable. This would enable an XBMC/OpenGL-Qt add on to say 'These are the major key/mouse events I'm bothered about. Qt should try and handle everything else. If there's anything Qt doesn't handle, pass that to me too.'

This layer would also provide a Qt application reference to launch on startup in to the viewport, resizing functions, and references as to where and how to store any user information (E.g. bookmarks).

It's looking deceptively simple thus far. The challenge will come in making a web browser that can be effectively controlled via keyboard and remote control keys and mouse events.

As you say there's one Qt repository now. I've taking a clone of the main qt repository and am building my opengl qt platform against that. There's been a few API changes since most of the examples were updated, so it's proven a bit challenging.
find quote
FishOil Offline
Posting Freak
Posts: 836
Joined: May 2009
Reputation: 8
Post: #260
serp Wrote:Hi ceros. That's pretty much what I thought. I've created an OpenGL Qt Platform. Just getting it compiling (not done hard core C++ in a while). Once I have this drawing in a resizeable OpenGL viewport I'll start looking at interaction. The code is already there for that.

I would imagine I'll need to make the layer pluggable. This would enable an XBMC/OpenGL-Qt add on to say 'These are the major key/mouse events I'm bothered about. Qt should try and handle everything else. If there's anything Qt doesn't handle, pass that to me too.'

This layer would also provide a Qt application reference to launch on startup in to the viewport, resizing functions, and references as to where and how to store any user information (E.g. bookmarks).

It's looking deceptively simple thus far. The challenge will come in making a web browser that can be effectively controlled via keyboard and remote control keys and mouse events.

As you say there's one Qt repository now. I've taking a clone of the main qt repository and am building my opengl qt platform against that. There's been a few API changes since most of the examples were updated, so it's proven a bit challenging.

Thanks for taking the time to investigate and maybe develop this.
This will be a wanted and needed addition to online content.
(This post was last modified: 2011-04-26 10:55 by FishOil.)
find quote
Post Reply