Kodi Community Forum
Web Browser integrated into XBMC - HTML Layout Engine with a GUI embedded into XBMC? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Web Browser integrated into XBMC - HTML Layout Engine with a GUI embedded into XBMC? (/showthread.php?tid=25)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


Interesting how-to on porting QT... - serp - 2010-12-01

Lighthouse project intro from Nokia:-

http://labs.qt.nokia.com/2009/10/02/introducing-new-port-of-qt-to-your-favourite-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.


Figured it out... - serp - 2010-12-02

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.


- amejia - 2010-12-02

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.


Progress so far... - serp - 2010-12-03

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.


- FishOil - 2010-12-03

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.


- da23ad - 2010-12-07

MediaPortal has that nice feature , I dont remember how it is called , but its pretty much like Executor on XBMC , except that you can add a parameter ....

Basically you have to tell which program/software you wanna launch , which parameter and the name of the label

For instance , I wanna launch FIREFOX , with the parameter http://www.google.com , and the label GOOGLE ....

So I will end up with the name GOOGLE in the menu and when I click on it , Firefox will open the http://www.google.com page ... and when I close firefox , MediaPortal will reopen in fullscreen where I left it .... Nerd


At this point , with add-ons such as Executor or Launch we can open a web browser but it will open on your default page and we will have to type the URL ... Sad


- kaiser423 - 2010-12-07

da23ad Wrote:For instance , I wanna launch FIREFOX , with the parameter http://www.google.com , and the label GOOGLE ....

So I will end up with the name GOOGLE in the menu and when I click on it , Firefox will open the http://www.google.com page ... and when I close firefox , MediaPortal will reopen in fullscreen where I left it .... Nerd


At this point , with add-ons such as Executor or Launch we can open a web browser but it will open on your default page and we will have to type the URL ... Sad

I already do that with, just have it execute "firefox www.mywsitehere.com" and firefox loads it automatically. I have multiple websites set up this way as different entries.


- topfs2 - 2010-12-07

A tad offtopic but why the heck do media portal have a launcher like that, afaik the web browser (IE though) is wrapped and accessible in C#, so they should be able to get and being able to render it in GUI I would have assumed.

What you are suggesting is already doable afaik. You can have parameters to scripts, so if you make a web browser launcher and takes a parameter to launch thats fine. What I don't understand is do you want to have one addon per site? because that would get old real quick.


Chrome Webstore Integration? - pfriederichs - 2010-12-08

Has there been any discussion on how possible it would be to integrate chrome web apps into XBMC? I assume its only a matter of time before a Netflix extension is released (this is my main concern as to why I am asking this). I love the appliance feel of XBMC on Linux and hate it on Windows 7 (sluggish, PITA to switch between external apps, etc).

I was just curious if this is going to even be possible going forward on the Linux platform.


Chrome Web Store Apps is XBMC? - xalaros - 2010-12-09

Hello,

today i played around with the new chrome web apps and find them pretty cool,
most of them are just weblinks to sites but it would still be very nice if we could open chrome web apps from within xbmc. think about it, playing a game, browsing your news, looking at the weather on that very cool wunderground web app. Would it be possible to have such functionality in xbmc natively or though a plugin maybe.


- htpc guy - 2010-12-09

This is doable with the launcher plugin (at least in windows, I havn't tested with linux yet but I'm sure it would work)

In chrome you can peel the tab with the web app off and drop it on the desktop Then you can launch directly to it like a normal program shortcut. There is something different about these web apps that make it possible because an normal web page will not do this.

Anyway, you could use the excicutor or advanced launcher addon to launch the web app from within xbmc. you can take it a step further by creating it as a favorite and adding it to the home screen.


- direx - 2011-03-22

Hi,

actually implementing a webbrowser as an app which can be launched from within XBMC is not very hard (with the Executor plugin). But launching a browser like Firefox or Chrome is sort of useless (at least for me), because I always need to zoom in in order to read the text on my TV.

This is why I have played around with Qt a little bit and made a quick-and-dirty fullscreen WebKit browser (with QWebKit) which is optimised for 720p and 1080p TVs.

Here is a screenshot: http://img52.imageshack.us/i/tvbrowser.png/

What do you think? As soon as I have more time I'll do some more UI polishing (like a settings widget for changing font and icon size) and release the source code. Please note that you need a keyboard/mouse. I am using it with my Logitech diNnovo Mini which works great.


- direx


- ubuntuf4n - 2011-03-22

This looks simple, but great. Do you plan to integrate a bookmarks-feature?


- lkraav - 2011-03-23

i think phone/tablet-style doubleclick-to-zoom could work on media centers too.


- euroford - 2011-03-26

direx Wrote:Hi,

actually implementing a webbrowser as an app which can be launched from within XBMC is not very hard (with the Executor plugin). But launching a browser like Firefox or Chrome is sort of useless (at least for me), because I always need to zoom in in order to read the text on my TV.

This is why I have played around with Qt a little bit and made a quick-and-dirty fullscreen WebKit browser (with QWebKit) which is optimised for 720p and 1080p TVs.

Here is a screenshot: http://img52.imageshack.us/i/tvbrowser.png/

What do you think? As soon as I have more time I'll do some more UI polishing (like a settings widget for changing font and icon size) and release the source code. Please note that you need a keyboard/mouse. I am using it with my Logitech diNnovo Mini which works great.


- direx

WebKit browser (with QWebKit) is a good choice.Big Grin