mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +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() {
|
||||
if (!STATES.isPlaying && !Object.keys(STATES.currentStream).length) {
|
||||
if (!STATES.isPlaying) {
|
||||
return;
|
||||
}
|
||||
|
||||
STATES.isPlaying = false;
|
||||
STATES.currentStream = {};
|
||||
|
||||
// Stop MKB listeners
|
||||
EmulatedMkbHandler.getInstance().destroy();
|
||||
NativeMkbHandler.getInstance().destroy();
|
||||
@ -295,6 +292,8 @@ function unload() {
|
||||
// Destroy StreamPlayer
|
||||
STATES.currentStream.streamPlayer?.destroy();
|
||||
|
||||
STATES.isPlaying = false;
|
||||
STATES.currentStream = {};
|
||||
window.BX_EXPOSED.shouldShowSensorControls = false;
|
||||
window.BX_EXPOSED.stopTakRendering = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user