summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-03-25 03:19:20 +0200
committerMaxim Devaev <[email protected]>2024-03-25 03:19:20 +0200
commitcb97f95ad6b3390158fbcbddc1e555cd5478eb81 (patch)
treeebcecddd2adcf84e509860f936e04afc0ee70499
parent71e5e4d138ebc36644b022aa18e5990caa4bf9c5 (diff)
native tracks list for janus 1.x
-rw-r--r--web/share/js/kvm/stream_janus.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/web/share/js/kvm/stream_janus.js b/web/share/js/kvm/stream_janus.js
index ed6e92e5..d8218b81 100644
--- a/web/share/js/kvm/stream_janus.js
+++ b/web/share/js/kvm/stream_janus.js
@@ -235,8 +235,17 @@ export function JanusStreamer(__setActive, __setInactive, __setInfo, __orient, _
if (jsep) {
__logInfo("Handling SDP:", jsep);
+ let tracks = [{"type": "video", "capture": false, "recv": true, "add": true}];
+ if (__allow_audio) {
+ tracks.push({"type": "audio", "capture": false, "recv": true, "add": true});
+ }
__handle.createAnswer({
"jsep": jsep,
+
+ // Janus 1.x
+ "tracks": tracks,
+
+ // Janus 0.x
"media": {"audioSend": false, "videoSend": false, "data": false},
"success": function(jsep) {