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) {
|
"onremotestream": function(stream) {
|
||||||
__logInfo("Got a remote stream:", stream);
|
__logInfo("Got a remote stream changes:", stream);
|
||||||
_Janus.attachMediaStream($("stream-video"), stream);
|
if (stream.active) {
|
||||||
__sendKeyRequired();
|
_Janus.attachMediaStream($("stream-video"), stream);
|
||||||
__startInfoInterval();
|
__sendKeyRequired();
|
||||||
// FIXME: Задержка уменьшается, но начинаются заикания на кейфреймах.
|
__startInfoInterval();
|
||||||
// - https://github.com/Glimesh/janus-ftl-plugin/issues/101
|
// FIXME: Задержка уменьшается, но начинаются заикания на кейфреймах.
|
||||||
/*if (__handle && __handle.webrtcStuff && __handle.webrtcStuff.pc) {
|
// - https://github.com/Glimesh/janus-ftl-plugin/issues/101
|
||||||
for (let receiver of __handle.webrtcStuff.pc.getReceivers()) {
|
/*if (__handle && __handle.webrtcStuff && __handle.webrtcStuff.pc) {
|
||||||
if (receiver.track && receiver.track.kind === "video" && receiver.playoutDelayHint !== undefined) {
|
for (let receiver of __handle.webrtcStuff.pc.getReceivers()) {
|
||||||
receiver.playoutDelayHint = 0;
|
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() {
|
"oncleanup": function() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user