Qt 5.7 WebEngineView, HTML5 audio/video and WebRTC - qt

Documentation suggests that the latest QtWebEngineView should support WebRTC and HTML5 audio (I also want WebAudio API).
I'm using QtQuick 2 and QT 5.7, and the QML WebEngineView (1.1) and WebView don't support getUserMedia nor HTML5 audio.
Is it possible to have access to WebRTC and Web Audio API using QML?
Or do I have to use C++ and calling the widgets directly? (everything is supported with the webenginewidgets/demobrowser example)

I never found a good solution to this, but recent versions of Qt don't have this issue. I ended up not going the Qt route.

Related

QWebView or QWebEngineView

Are there any functional differences between QWebView and QWebEngineView? If I understand correctly, QWebView is webkit, while QWebEngineView is blink. Are there any differences to the programmer? Does one offer more customization of look & feel over the other?
I would give QtWebEngine a try. It is replacing QtWebKit for a reason.
If you control the HTML that is getting rendered, then it probably doesn't hurt to use QWebKit. Just make sure you test your pages beforehand.
QWebView uses WebKit as the backend.
http://doc.qt.io/qt-5/qwebview.html#details
QWebEngineView uses Chromium as the backend.
http://doc.qt.io/qt-5/qwebengineview.html#details
WebKit is what is used in Konqueror on Linux and Rekonq. Its not bad, but its not as robust across general (and often imperfect) web pages/html in my opinion.
Chromium is a much newer, faster and more robust engine.
I don't know all the technical details specifically, but QWebEngine is a big step in the right direction. I've found this mostly from my own experimenting and empirical usage.
To give WebKit a decent try, look at this project and try a variety of pages:
http://qtweb.net/
https://github.com/magist3r/QtWeb
Here is some more info about QtWebEngine v QtWebKit
http://wiki.qt.io/QtWebEngine
http://en.wikipedia.org/wiki/WebKit
http://wiki.qt.io/QtWebKit
As for me I can't see some very important features in QWebEngineView. First of all you can't access to all frames on page, and you can't run JS in all frames. The next one is that you cant use QNetworkAccessManager for control view underline layer. So for now I can't see any solutions for some issues, like this How to disable sound on flashplayer in my custom application? . I want to believe that it is possible to solve it in some way, becouse QWebEngineView works much faster and seems like it have no (or less) memory leak issues then QWebView.
Framework: WebKit vs WebEngine
There used to be Qt WebKit since 2007 up to version 3. According to this Qt blog and here It is replaced by new Chromium-based web engine which is Qt WebEngine. According to the link Qt WebKit works fine right now, and will continue to do so in the years to come but if you want to have all the latest and greatest HTML5 features available for your application or device, you should consider moving over to Qt WebEngine.
As this blog says: Qt 5.4 also still contains the older Qt WebKit module. Qt WebKit is still supported, but as of Qt 5.4 we consider it done, so no new functionality will be added to it. We are also planning to deprecate Qt WebKit in future releases, as the new Qt WebEngine provides what is needed. In
My Decision: I prefer to go with the latest QtWebEngine specially when I am in the initial stage. If I hit the wall then maybe I revert to the Qt WebKit.
QML: WebView vs WebEngineView.
For having a browser item in QML there are two items WebView and WebEngineView.
WebView with the same name has been defined in both WebKit and WebEngine. Documentation for WebView in WebKit is here. It should have the import QtWebKit 3.0.
For using the WebView bound to WebEngine which is mentioned in this documentation, we need to have this import: import QtWebView 1.0. But we will highly likely face an error #5 and #6 which the solutions to debug is states in the link.
I will use the latter WebView i.e the one which is provided by WebEngine. The proof that it is related to WebEngnie is the debug solution to error #5 and #6. From now on, WebView refers to the one offered by WebEngine in this document.
As this blog says: In Qt 5.4, Qt WebView is provided which offers a more limited API to embed the web browser that is native to the underlying operating system for use cases where the full Qt WebEngine isn’t needed, or where it can’t be used because of restrictions coming from the underlying OS. In Qt 5.4, the Qt WebView module supports iOS and Android. It supports embedding the native web engines of the underlying operating system into Qt, and is currently available for Android and iOS. Because of this, Qt WebView also gives a convenient light-weight solution for simple web document integration.
WebEngineView allows QML applications to render regions of dynamic web content. A WebEngineView component may share the screen with other QML components or encompass the full screen as specified within the QML application.It is my choice in applications which are not going to be executed in iOS and Android.
Note: It is According to this blog QtWebView will fall back to using QtWebEngine when possible. In the meantime that they are making more platforms possible with WebView. It is also mentioned as a reply to a QT-Bug that: While we don't have native WebView implementations for the OS X, Window etc. we can fallback to use QtWebEngine
My Decision: WebEngineView in non Android and iOS applications.

QT/Phonon Video Recording

I want to do the Video Recording in QT Phonon media framework.Has Qt/KDE's Phonon media framework abstraction implemented Video recording? If Phonon does not implemented then how to add functionality(As Phonon uses gstreamer as backend and we can easily do Video Recording using gStreamer)
Regards
Kiran
Unfortunately Phonon only provides utilities for multimedia playback and as far as I know they do not plan to add recording functionality in the future. In order to perform video/audio stream recording you could use QtMultimedia module.

Qt, QtWebKit and <video> support

What kind of source material support embedded QtWebKit browser has? Does it support MPEG-4, WebM or Theora and is this support available through compilation?
I was mostly looking desktop platforms (Linux)
QtWebKit is not video player, but it supports extensions like adobe flash, so if you embed some kind of flash player in html you displaying, it will play all videos which can be played in your OS with flash.
Another approach is to use Phonon module, which connects to your video codec system and could play all formats which have codecs installed for them.
Also, html5 support will be added in qt webkit version 2.2, which is still in alpha.

Qt for Symbian VS. Qt for MeeGo

What is the difference between Qt for Symbian and Qt for MeeGo? I know Qt is a cross-compiling platform. Does this mean that if I use a library from Qt the exact same library works on all devices which support Qt (e.g. Symbian, MeeGo)?
For example:
QtDesktopServices can launch a web browser. Despite the name 'Desktop' is confusing for mobile devices can I launch a web browser on every device which supports Qt? If I look at MeeGo, MeeGo is used for different kind of devices e.g. In-Vehicle, TV, media phone
Is it guaranteed that every device has a web browser on it? I don't think so and that's why I'm asking. If a browser is guaranteed, which browser is it? Which features does it have? I know there is WRT, but a user here stated that WRT has discontinued. So what now?
Do I have to choose between Qt 4.7 and Qt Mobility 1.0?
What leinir said - Qt Mobility is a module that implements common features for mobile devices. Qt's API is the same on all platforms, though there are some platform-specific functions (mainly dealing with low-level stuff).
While the API (the interface) is the same, the implementation of course may be different. I suggest looking at the Qt online documentation - the pages linked under "Platform-specific Development"
According to "Platform notes - Symbian", the Symbian port is not complete and lacks some features (e.g. OpenGL support is "planned for a future release", while printing probably never will be supported). I'm pretty sure that the MeeGo/Maemo version supports OpenGL ES, as I've seen a Qt-based application using it (Stellarium on a Nokia N900).
QtMobility is an extra module for Qt, which provides a bunch of extra functionality which is more esoteric than the other 13 or so Qt modules, but functionality which is really useful when you are building applications the way you suggest.
So no, you don't choose between Qt 4.7 and QtMobility 1.0, because you have to use Qt to be able to use the extra module QtMobility :)
The browser will always be whatever is set up as the default browser on the system. So, no, there is no guarantees - for Windows, for example, you might have people using Firefox, Chrome, Internet Explorer 6 and many others. This is the nature of platform integration, i'm afraid :)

What is Qt Port?

I came accross a website and what is this QTWebKit? and why do we use it and in which envoirment c++/Java or...
https://trac.webkit.org/wiki/QtWebKit#TechnicalArticles
Citing from your own link:
WebKit is an open source web browser engine. [...] QtWebKit is a project aiming at porting this fabulous engine back to Qt.
The Qt port of WebKit currently compiles and runs on Linux (including Maemo and Meego), Windows, Mac OS X and Symbian."
So it's webkit ported to Qt. What Qt is, is described e.g. here.
A simple search also reveals the Qt Webkit documentation.
Citing the site you mentioned:
WebKit is an open source web browser
engine. (...) QtWebKit is a project aiming at porting this fabulous engine back to Qt.
WebKit being an engine focused on implementing web browser's specific tasks (interpreting a web page's source (HTML, CSS), executing Java Script, creating visual representation and others) makes use of some basic services needed to accomplish these tasks. The examples of such services would be displaying an image on the screen or downloading a file over a network. These services must be provided for it to work. In case of Qt port these services are provided by Qt, which is a cross platform C++ framework for creating applications. You can find more information on Qt here.

Resources