From 95b5c8a905de4debc2a46176fbd2db93e5ff012f Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Mon, 14 Oct 2019 10:46:32 -0700 Subject: [PATCH 1/2] DEV-2375: ensure web entities stop playing audio --- interface/resources/qml/Web3DSurface.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/resources/qml/Web3DSurface.qml b/interface/resources/qml/Web3DSurface.qml index ff574ceaa5..5f49fe399a 100644 --- a/interface/resources/qml/Web3DSurface.qml +++ b/interface/resources/qml/Web3DSurface.qml @@ -33,6 +33,10 @@ Item { property var item: null function load(url, scriptUrl) { + // Ensure we reset any existing item to "about:blank" to ensure web audio stops: DEV-2375 + if (root.item != null) { + root.item.url = "about:blank" + } QmlSurface.load("./controls/WebView.qml", root, function(newItem) { root.item = newItem root.item.url = url From 6c35387b8d98be39e9416ff423b1c55c2af0c1bf Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Mon, 14 Oct 2019 10:56:23 -0700 Subject: [PATCH 2/2] also fix DEV-2083 --- interface/resources/qml/Web3DSurface.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/resources/qml/Web3DSurface.qml b/interface/resources/qml/Web3DSurface.qml index 5f49fe399a..3340226761 100644 --- a/interface/resources/qml/Web3DSurface.qml +++ b/interface/resources/qml/Web3DSurface.qml @@ -36,6 +36,8 @@ Item { // Ensure we reset any existing item to "about:blank" to ensure web audio stops: DEV-2375 if (root.item != null) { root.item.url = "about:blank" + root.item.destroy() + root.item = null } QmlSurface.load("./controls/WebView.qml", root, function(newItem) { root.item = newItem