diff options
author | Alexandru Croitor <alexandru.croitor@theqtcompany.com> | 2015-12-14 14:54:39 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@theqtcompany.com> | 2015-12-15 17:03:10 +0000 |
commit | 26aa7e314e58ea7be375fc767f6806127e50338d (patch) | |
tree | f1575597351effd890379420fca63f04100d8e87 /src/webengine/api/qquickwebengineview_p.h | |
parent | 6414f93b39c57b2718a622430f7e0329b3512c8b (diff) |
Add support for checking if audio is played in a page.
Add support for checking if audio is played in a page, as well
as the ability to (un)mute the audio.
Modify demobrowser example to show (muted) in the tab title, if
the tab is muted, or (audible) if there is audio playing in the tab.
Fix HTML5 audio/video (un)mute to also work.
Change-Id: I7213645e67be2f9da1c5f96cdf6c7eef5341ae4b
Task-number: QTBUG-48788
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/webengine/api/qquickwebengineview_p.h')
-rw-r--r-- | src/webengine/api/qquickwebengineview_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h index a2f937968..9f7a45156 100644 --- a/src/webengine/api/qquickwebengineview_p.h +++ b/src/webengine/api/qquickwebengineview_p.h @@ -110,6 +110,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem { Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged REVISION 2) Q_PROPERTY(QSizeF contentsSize READ contentsSize NOTIFY contentsSizeChanged FINAL REVISION 3) Q_PROPERTY(QPointF scrollPosition READ scrollPosition NOTIFY scrollPositionChanged FINAL REVISION 3) + Q_PROPERTY(bool audioMuted READ isAudioMuted WRITE setAudioMuted NOTIFY audioMutedChanged REVISION 3) #ifdef ENABLE_QML_TESTSUPPORT_API Q_PROPERTY(QQuickWebEngineTestSupport *testSupport READ testSupport WRITE setTestSupport FINAL) @@ -295,6 +296,9 @@ public Q_SLOTS: Q_REVISION(1) void grantFeaturePermission(const QUrl &securityOrigin, Feature, bool granted); Q_REVISION(2) void setActiveFocusOnPress(bool arg); Q_REVISION(2) void triggerWebAction(WebAction action); + Q_REVISION(3) bool isAudioMuted() const; + Q_REVISION(3) void setAudioMuted(bool muted); + Q_REVISION(3) bool wasRecentlyAudible(); Q_SIGNALS: void titleChanged(); @@ -319,6 +323,8 @@ Q_SIGNALS: Q_REVISION(2) void windowCloseRequested(); Q_REVISION(3) void contentsSizeChanged(const QSizeF& size); Q_REVISION(3) void scrollPositionChanged(const QPointF& position); + Q_REVISION(3) void audioMutedChanged(bool muted); + Q_REVISION(3) void wasRecentlyAudibleChanged(bool wasRecentlyAudible); protected: void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry); |