summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-11-06 00:05:15 +0300
committerMaxim Devaev <[email protected]>2022-11-06 00:05:15 +0300
commit7235d44303338aa8a40942fb655b24c02128fd59 (patch)
tree2a7512c11a07f420f3ab61109d810d248883ac8a /web
parent81f507d0dd14f60f9e954b75ee7b2d4b2e139545 (diff)
no-keyframe experiment
Diffstat (limited to 'web')
-rw-r--r--web/kvm/index.html7
-rw-r--r--web/kvm/navbar-system.pug4
-rw-r--r--web/share/js/kvm/stream.js15
3 files changed, 24 insertions, 2 deletions
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);
}