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,19 +220,26 @@ export function JanusStreamer(__setActive, __setInactive, __setInfo, __allow_aud
|
||||
},
|
||||
|
||||
"onremotestream": function(stream) {
|
||||
__logInfo("Got a remote stream:", stream);
|
||||
_Janus.attachMediaStream($("stream-video"), stream);
|
||||
__sendKeyRequired();
|
||||
__startInfoInterval();
|
||||
// FIXME: Задержка уменьшается, но начинаются заикания на кейфреймах.
|
||||
// - https://github.com/Glimesh/janus-ftl-plugin/issues/101
|
||||
/*if (__handle && __handle.webrtcStuff && __handle.webrtcStuff.pc) {
|
||||
for (let receiver of __handle.webrtcStuff.pc.getReceivers()) {
|
||||
if (receiver.track && receiver.track.kind === "video" && receiver.playoutDelayHint !== undefined) {
|
||||
receiver.playoutDelayHint = 0;
|
||||
__logInfo("Got a remote stream changes:", stream);
|
||||
if (stream.active) {
|
||||
_Janus.attachMediaStream($("stream-video"), stream);
|
||||
__sendKeyRequired();
|
||||
__startInfoInterval();
|
||||
// FIXME: Задержка уменьшается, но начинаются заикания на кейфреймах.
|
||||
// - https://github.com/Glimesh/janus-ftl-plugin/issues/101
|
||||
/*if (__handle && __handle.webrtcStuff && __handle.webrtcStuff.pc) {
|
||||
for (let receiver of __handle.webrtcStuff.pc.getReceivers()) {
|
||||
if (receiver.track && receiver.track.kind === "video" && receiver.playoutDelayHint !== undefined) {
|
||||
receiver.playoutDelayHint = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}*/
|
||||
} else {
|
||||
// В каких-то случаях стрим может иметь флаг active=false,
|
||||
// но при этом янус работает. Хз почему.
|
||||
// - https://github.com/pikvm/pikvm/issues/1057
|
||||
__destroyJanus();
|
||||
}
|
||||
},
|
||||
|
||||
"oncleanup": function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user