mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 12:18:36 +02:00
Merge pull request #16343 from jherico/fix/DEV-2375
DEV-2375: ensure web entities stop playing audio
This commit is contained in:
commit
b8df1c180f
1 changed files with 6 additions and 0 deletions
|
@ -33,6 +33,12 @@ Item {
|
||||||
property var item: null
|
property var item: null
|
||||||
|
|
||||||
function load(url, scriptUrl) {
|
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"
|
||||||
|
root.item.destroy()
|
||||||
|
root.item = null
|
||||||
|
}
|
||||||
QmlSurface.load("./controls/WebView.qml", root, function(newItem) {
|
QmlSurface.load("./controls/WebView.qml", root, function(newItem) {
|
||||||
root.item = newItem
|
root.item = newItem
|
||||||
root.item.url = url
|
root.item.url = url
|
||||||
|
|
Loading…
Reference in a new issue