mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 17:20:30 +08:00
web: request keyframes
This commit is contained in:
parent
f3632426a6
commit
48118f15ff
2
PKGBUILD
2
PKGBUILD
@ -78,7 +78,7 @@ depends=(
|
|||||||
"janus-gateway-pikvm>=0.11.2-7"
|
"janus-gateway-pikvm>=0.11.2-7"
|
||||||
certbot
|
certbot
|
||||||
platform-io-access
|
platform-io-access
|
||||||
"ustreamer>=5.26"
|
"ustreamer>=5.29"
|
||||||
|
|
||||||
# Systemd UDEV bug
|
# Systemd UDEV bug
|
||||||
"systemd>=248.3-2"
|
"systemd>=248.3-2"
|
||||||
|
|||||||
@ -162,6 +162,9 @@ function _JanusStreamer(__setActive, __setInactive, __setInfo) {
|
|||||||
|
|
||||||
webrtcState: function(up) {
|
webrtcState: function(up) {
|
||||||
__logInfo("Janus says our WebRTC PeerConnection is", (up ? "up" : "down"), "now");
|
__logInfo("Janus says our WebRTC PeerConnection is", (up ? "up" : "down"), "now");
|
||||||
|
if (up) {
|
||||||
|
__sendKeyRequired();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onmessage: function(msg, jsep) {
|
onmessage: function(msg, jsep) {
|
||||||
@ -217,6 +220,7 @@ function _JanusStreamer(__setActive, __setInactive, __setInfo) {
|
|||||||
__logInfo("Got a remote stream:", stream);
|
__logInfo("Got a remote stream:", stream);
|
||||||
__setAudioEnabled(!!stream.getAudioTracks().length);
|
__setAudioEnabled(!!stream.getAudioTracks().length);
|
||||||
_Janus.attachMediaStream($("stream-video"), stream);
|
_Janus.attachMediaStream($("stream-video"), stream);
|
||||||
|
__sendKeyRequired();
|
||||||
__startInfoInterval();
|
__startInfoInterval();
|
||||||
// FIXME: Задержка уменьшается, но начинаются заикания на кейфреймах.
|
// FIXME: Задержка уменьшается, но начинаются заикания на кейфреймах.
|
||||||
// - https://github.com/Glimesh/janus-ftl-plugin/issues/101
|
// - https://github.com/Glimesh/janus-ftl-plugin/issues/101
|
||||||
@ -283,6 +287,14 @@ function _JanusStreamer(__setActive, __setInactive, __setInfo) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var __sendKeyRequired = function() {
|
||||||
|
if (__handle) {
|
||||||
|
// На этом шаге мы говорим что стрим пошел и надо запросить кейфрейм
|
||||||
|
__logInfo("Sending KEY_REQUIRED ...");
|
||||||
|
__handle.send({message: {request: "key_required"}});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var __sendStop = function() {
|
var __sendStop = function() {
|
||||||
__stopInfoInterval();
|
__stopInfoInterval();
|
||||||
if (__handle) {
|
if (__handle) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user