mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 15:47:18 +02:00
Fix no sound when using volume control feature (#490)
This commit is contained in:
parent
15b7869e5d
commit
821904066b
@ -281,13 +281,10 @@ window.addEventListener(BxEvent.DATA_CHANNEL_CREATED, e => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function unload() {
|
function unload() {
|
||||||
if (!STATES.isPlaying && !Object.keys(STATES.currentStream).length) {
|
if (!STATES.isPlaying) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATES.isPlaying = false;
|
|
||||||
STATES.currentStream = {};
|
|
||||||
|
|
||||||
// Stop MKB listeners
|
// Stop MKB listeners
|
||||||
EmulatedMkbHandler.getInstance().destroy();
|
EmulatedMkbHandler.getInstance().destroy();
|
||||||
NativeMkbHandler.getInstance().destroy();
|
NativeMkbHandler.getInstance().destroy();
|
||||||
@ -295,6 +292,8 @@ function unload() {
|
|||||||
// Destroy StreamPlayer
|
// Destroy StreamPlayer
|
||||||
STATES.currentStream.streamPlayer?.destroy();
|
STATES.currentStream.streamPlayer?.destroy();
|
||||||
|
|
||||||
|
STATES.isPlaying = false;
|
||||||
|
STATES.currentStream = {};
|
||||||
window.BX_EXPOSED.shouldShowSensorControls = false;
|
window.BX_EXPOSED.shouldShowSensorControls = false;
|
||||||
window.BX_EXPOSED.stopTakRendering = false;
|
window.BX_EXPOSED.stopTakRendering = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user