[mythtv] Replace the QtWebKit code

Paul Harrison mythtv at mythqml.net
Fri Mar 11 19:04:52 UTC 2022


On 11/03/2022 14:22, Peter Bennett wrote:

>
> On 3/11/22 05:48, Paul Harrison wrote:
>> On 11/03/2022 01:48, Peter Bennett wrote:
>>
>>>
>>> I am a taker. My Initial plan is:
>>>
>>> 1. Find out what all in MythTV and plugins use QtWebKit.
>>>
>>> 2. Test all the features that use it and make sure they work..
>>>
>>> 3. Port from QtWebKit to QtWebEngine
>>>
>>> 4. Test all the features that use it and make sure they work..
>>>
>>> Does anybody have issues with using QtWebEngine as the replacement?
>>>
>>> Peter
>>>
>>>
>>
>> Am I going mad or have we not been here before. I'm sure I have 
>> discussed this several times on IRC?
>>
>>
>> I have or had an initial patch to replace WebKit with WebEngine but 
>> basically I couldn't get it to keep rendering properly. What happens 
>> is any MythUI update to the screen stops the WebEngine widget from 
>> updating. If you run the frontend in a window and move the focus to 
>> another window and back to the frontend it will start to update again 
>> until another MythUI update stops it again. If you force the QT 
>> painter in the frontend it works OK so it appears to be some OpenGL 
>> compatibility. When I started to look more deeply I did notice our 
>> OpenGL renderer does make it's opengl contexts active but while the 
>> code is there to release the contexts it is commented out so we never 
>> release them. I'm no OpenGL expert so don't know if that is the real 
>> problem. The QT docs does say the WebEngine widget does require 
>> shared OpenGL contexts which we do have some support for but if we 
>> never release the contexts not sure it is going to work.
>>
>>
>> I do remember doing an experiment to just have MythUI draw a simple 
>> rotating box using QML and that showed the same behavior so it would 
>> appear to be our rendering code that is somehow at fault and not 
>> something unique to WebEngine.
>>
>>
>> I do feel strongly that having a working web browser widget  is 
>> important to the future of MythTV if we want to modernize it to 
>> support streaming services like YouTube, Netflix, Prime, iPlayer, 
>> Pluto TV etc.
>>
>>
>> Paul H.
>>
>>
>>
> No you are not going mad. Thanks for the information. I am new to the 
> webkit problem. Stuart asked if anybody would take on replacing 
> webkit, so I volunteered, thinking it was a simple task after looking at
> https://doc.qt.io/qt-5/qtwebenginewidgets-qtwebkitportingguide.html
> It is clearly not a simple task from what you have said.
>
> It was discussed yesterday in IRC, and the suggested option was to get 
> rid of webkit, thinking that not much of importance uses it. Some 
> things may use it just for a text display and those could be replaced 
> with a simple text display widget. Also discussed was getting rid of 
> some of the plugins, especially if they use webkit.
>
> Does mythmusic use webkit? Can it use something else if we drop webkit 
> and do not include webengine?
>
> Any other suggestions?
>
> Peter
>

I think there may be some confusion of what webkit and webengine are. 
What we are talking about here is the web browser UI widget and has 
nothing to do with MythWeb or  the WebFrontend.


It's primary use is in the MythBrowser plugin which in turn is used by 
MythMusic, MythNews and MythNetvision. I don't think it's used anywhere 
else in the frontend other than the MythUI widget. It was used in the 
program info screen you get when you press INFO in Watch Recordings but 
that is no longer the case.


The use in MythMusic that Mark was concerned about was added so you 
could control MythMusic using a WebInterface. Robert Siebert? I think it 
was asked for it to be added so he could add some Music podcasts or 
mashups to MythNetVision but he never completed it so that can easily be 
removed. I think it is also used to search for missing coverart images 
by search google IIRC.


If we have a usable web browser widget that opens up the whole 
possibility of adding support for many streaming services like YouTube, 
Netflix, Pluto TV etc.


If it would be useful I can see if I can find the WIP patch I had. I'm 
out of ideas how to fix the rendering problem. In any case I have my own 
QML frontend that does have a working web browser player :)


Paul H.



More information about the mythtv-dev mailing list