summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/stream_janus.js
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-03-17 10:46:26 +0200
committerMaxim Devaev <[email protected]>2024-03-17 10:46:26 +0200
commitaf68aba4b745f10a3e2aed64dc3aa66807cc94cc (patch)
tree597be39cd8869b988b88c2e24d60d6a2416a7fa7 /web/share/js/kvm/stream_janus.js
parent13b43355ca131e333b1a326817161ec68b67df6a (diff)
Issue #1076: Orientation options for H.264
Diffstat (limited to 'web/share/js/kvm/stream_janus.js')
-rw-r--r--web/share/js/kvm/stream_janus.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/web/share/js/kvm/stream_janus.js b/web/share/js/kvm/stream_janus.js
index eff7b18b..8cc7744f 100644
--- a/web/share/js/kvm/stream_janus.js
+++ b/web/share/js/kvm/stream_janus.js
@@ -29,7 +29,7 @@ import {tools, $} from "../tools.js";
var _Janus = null;
-export function JanusStreamer(__setActive, __setInactive, __setInfo, __allow_audio) {
+export function JanusStreamer(__setActive, __setInactive, __setInfo, __orient, __allow_audio) {
var self = this;
var __stop = false;
@@ -45,6 +45,7 @@ export function JanusStreamer(__setActive, __setInactive, __setInfo, __allow_aud
var __state = null;
var __frames = 0;
+ self.getOrientation = () => __orient;
self.isAudioAllowed = () => __allow_audio;
self.getName = () => (__allow_audio ? "H.264 + Audio" : "H.264");
@@ -329,9 +330,12 @@ export function JanusStreamer(__setActive, __setInactive, __setInfo, __allow_aud
var __sendWatch = function() {
if (__handle) {
- __logInfo(`Sending WATCH(audio=${__allow_audio}) + FEATURES ...`);
+ __logInfo(`Sending WATCH(orient=${__orient}, audio=${__allow_audio}) + FEATURES ...`);
__handle.send({"message": {"request": "features"}});
- __handle.send({"message": {"request": "watch", "params": {"audio": __allow_audio}}});
+ __handle.send({"message": {"request": "watch", "params": {
+ "orientation": __orient,
+ "audio": __allow_audio,
+ }}});
}
};