diff options
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | web/kvm/index.html | 7 | ||||
-rw-r--r-- | web/kvm/navbar-system.pug | 4 | ||||
-rw-r--r-- | web/share/js/kvm/stream.js | 15 |
4 files changed, 25 insertions, 3 deletions
@@ -78,7 +78,7 @@ depends=( "janus-gateway-pikvm>=0.11.2-7" certbot platform-io-access - "ustreamer>=5.29" + "ustreamer>=5.30" # Systemd UDEV bug "systemd>=248.3-2" diff --git a/web/kvm/index.html b/web/kvm/index.html index 85c1803f..7a9c3883 100644 --- a/web/kvm/index.html +++ b/web/kvm/index.html @@ -202,6 +202,13 @@ </td> <td class="value-number" id="stream-h264-bitrate-value"></td> </tr> + <tr class="feature-disabled" id="stream-h264-gop"> + <td>H.264 <a target="_blank" href="https://docs.pikvm.org/webrtc">gop</a>:</td> + <td class="value-slider"> + <input class="slider" disabled type="range" id="stream-h264-gop-slider"> + </td> + <td class="value-number" id="stream-h264-gop-value"></td> + </tr> <tr> <td>Max FPS:</td> <td class="value-slider"> diff --git a/web/kvm/navbar-system.pug b/web/kvm/navbar-system.pug index 207c1841..3bbe74c4 100644 --- a/web/kvm/navbar-system.pug +++ b/web/kvm/navbar-system.pug @@ -34,6 +34,10 @@ li(id="system-dropdown" class="right") td H.264 kbps: td(class="value-slider") #[input(disabled type="range" id="stream-h264-bitrate-slider" class="slider")] td(id="stream-h264-bitrate-value" class="value-number") + tr(id="stream-h264-gop" class="feature-disabled") + td H.264 #[a(target="_blank" href="https://docs.pikvm.org/webrtc") gop]: + td(class="value-slider") #[input(disabled type="range" id="stream-h264-gop-slider" class="slider")] + td(id="stream-h264-gop-value" class="value-number") tr td Max FPS: td(class="value-slider") #[input(disabled type="range" id="stream-desired-fps-slider" class="slider")] diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js index 1a780845..511d251c 100644 --- a/web/share/js/kvm/stream.js +++ b/web/share/js/kvm/stream.js @@ -288,11 +288,11 @@ function _JanusStreamer(__setActive, __setInactive, __setInfo) { }; var __sendKeyRequired = function() { - if (__handle) { + /*if (__handle) { // На этом шаге мы говорим что стрим пошел и надо запросить кейфрейм __logInfo("Sending KEY_REQUIRED ..."); __handle.send({message: {request: "key_required"}}); - } + }*/ }; var __sendStop = function() { @@ -465,6 +465,11 @@ export function Streamer() { }); tools.slider.setOnUpDelayed($("stream-h264-bitrate-slider"), 1000, (value) => __sendParam("h264_bitrate", value)); + tools.slider.setParams($("stream-h264-gop-slider"), 0, 60, 1, 30, function(value) { + $("stream-h264-gop-value").innerHTML = value; + }); + tools.slider.setOnUpDelayed($("stream-h264-gop-slider"), 1000, (value) => __sendParam("h264_gop", value)); + tools.slider.setParams($("stream-desired-fps-slider"), 0, 120, 1, 0, function(value) { $("stream-desired-fps-value").innerHTML = (value === 0 ? "Unlimited" : value); }); @@ -562,6 +567,7 @@ export function Streamer() { if (state) { tools.feature.setEnabled($("stream-quality"), state.features.quality && (state.streamer === null || state.streamer.encoder.quality > 0)); tools.feature.setEnabled($("stream-h264-bitrate"), state.features.h264 && __janus_enabled); + tools.feature.setEnabled($("stream-h264-gop"), state.features.h264 && __janus_enabled); tools.feature.setEnabled($("stream-resolution"), state.features.resolution); if (state.streamer) { @@ -572,6 +578,10 @@ export function Streamer() { __setMinMax($("stream-h264-bitrate-slider"), state.limits.h264_bitrate); tools.el.setEnabled($("stream-h264-bitrate-slider"), true); tools.slider.setValue($("stream-h264-bitrate-slider"), state.streamer.h264.bitrate); + + __setMinMax($("stream-h264-gop-slider"), state.limits.h264_gop); + tools.el.setEnabled($("stream-h264-gop-slider"), true); + tools.slider.setValue($("stream-h264-gop-slider"), state.streamer.h264.gop); } __setMinMax($("stream-desired-fps-slider"), state.limits.desired_fps); @@ -602,6 +612,7 @@ export function Streamer() { } else { tools.el.setEnabled($("stream-quality-slider"), false); tools.el.setEnabled($("stream-h264-bitrate-slider"), false); + tools.el.setEnabled($("stream-h264-gop-slider"), false); tools.el.setEnabled($("stream-desired-fps-slider"), false); tools.el.setEnabled($("stream-resolution-selector"), false); } |