mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
pikvm/pikvm#1057: web: fixed onremotestream handler for active=false
This commit is contained in:
parent
4f21aae0ce
commit
dfa3354978
@ -220,7 +220,8 @@ export function JanusStreamer(__setActive, __setInactive, __setInfo, __allow_aud
|
|||||||
},
|
},
|
||||||
|
|
||||||
"onremotestream": function(stream) {
|
"onremotestream": function(stream) {
|
||||||
__logInfo("Got a remote stream:", stream);
|
__logInfo("Got a remote stream changes:", stream);
|
||||||
|
if (stream.active) {
|
||||||
_Janus.attachMediaStream($("stream-video"), stream);
|
_Janus.attachMediaStream($("stream-video"), stream);
|
||||||
__sendKeyRequired();
|
__sendKeyRequired();
|
||||||
__startInfoInterval();
|
__startInfoInterval();
|
||||||
@ -233,6 +234,12 @@ export function JanusStreamer(__setActive, __setInactive, __setInfo, __allow_aud
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
} else {
|
||||||
|
// В каких-то случаях стрим может иметь флаг active=false,
|
||||||
|
// но при этом янус работает. Хз почему.
|
||||||
|
// - https://github.com/pikvm/pikvm/issues/1057
|
||||||
|
__destroyJanus();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"oncleanup": function() {
|
"oncleanup": function() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user