From cb97f95ad6b3390158fbcbddc1e555cd5478eb81 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Mon, 25 Mar 2024 03:19:20 +0200 Subject: native tracks list for janus 1.x --- web/share/js/kvm/stream_janus.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'web/share/js/kvm/stream_janus.js') 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) { -- cgit v1.2.3