Skip to content

Commit

Permalink
squash: Update to use "connect".
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev committed Oct 24, 2024
1 parent da3ff8b commit 5106167
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import org.jitsi.xmpp.extensions.colibri2.Colibri2Error
import org.jitsi.xmpp.extensions.colibri2.Colibri2Relay
import org.jitsi.xmpp.extensions.colibri2.ConferenceModifiedIQ
import org.jitsi.xmpp.extensions.colibri2.ConferenceModifyIQ
import org.jitsi.xmpp.extensions.colibri2.Connect
import org.jitsi.xmpp.extensions.colibri2.Endpoints
import org.jitsi.xmpp.extensions.colibri2.Export
import org.jitsi.xmpp.extensions.colibri2.InitialLastN
import org.jitsi.xmpp.extensions.colibri2.Media
import org.jitsi.xmpp.extensions.colibri2.Sctp
Expand All @@ -59,7 +59,7 @@ class Colibri2Session(
val bridge: Bridge,
// Whether the session was constructed for the purpose of visitor nodes
val visitor: Boolean,
val audioExportUrl: URI?,
val audioRecordUrl: URI?,
parentLogger: Logger
) : CascadeNode<Colibri2Session, Colibri2Session.Relay> {
private val logger = createChildLogger(parentLogger).apply {
Expand Down Expand Up @@ -199,9 +199,16 @@ class Colibri2Session(
setCreate(true)
setConferenceName(colibriSessionManager.conferenceName)
setRtcstatsEnabled(colibriSessionManager.rtcStatsEnabled)
audioExportUrl?.let {
logger.warn("XXX adding export to colibri iq url=$it")
addExport(Export(it, audio = true))
audioRecordUrl?.let {
logger.warn("Adding export to colibri iq url=$it")
addConnect(
Connect(
url = it,
type = Connect.Types.RECORDER,
protocol = Connect.Protocols.MEDIAJSON,
audio = true
)
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ColibriV2SessionManager(
*/
internal val meetingId: String,
internal val rtcStatsEnabled: Boolean,
private val audioExportUrl: URI?,
private val audioRecordUrl: URI?,
private val bridgeVersion: String?,
parentLogger: Logger
) : ColibriSessionManager, Cascade<Colibri2Session, Colibri2Session.Relay> {
Expand Down Expand Up @@ -249,10 +249,10 @@ class ColibriV2SessionManager(
this,
bridge,
visitor,
if (audioExportUrl != null && sessionForAudioRecording == null) audioExportUrl else null,
if (audioRecordUrl != null && sessionForAudioRecording == null) audioRecordUrl else null,
logger
)
if (audioExportUrl != null && sessionForAudioRecording == null) {
if (audioRecordUrl != null && sessionForAudioRecording == null) {
sessionForAudioRecording = session
}
return Pair(session, true)
Expand Down
4 changes: 3 additions & 1 deletion jicofo-selector/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,9 @@ jicofo {
enable-live-room = false
}
recording {
multi-track-recorder-url-template = "wss://example.com/recorder/MEETING_ID"
# A templated URL to use for audio recording. The string "MEEETING_ID" will be replaced with the actual meeting ID.
# Note: if this is set all conferences will automatically be recorded using the specified URL.
//multi-track-recorder-url-template = "wss://example.com/recorder/MEETING_ID"
}

xmpp {
Expand Down
2 changes: 1 addition & 1 deletion jicofo/src/main/kotlin/org/jitsi/jicofo/RecordingConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.jitsi.metaconfig.optionalconfig
import java.net.URI

class RecordingConfig private constructor() {
val multiTrackRecorderUrlTemplate: String? by optionalconfig {
private val multiTrackRecorderUrlTemplate: String? by optionalconfig {
"jicofo.recording.multi-track-recorder-url-template".from(JitsiConfig.newConfig)
}

Expand Down

0 comments on commit 5106167

Please sign in to comment.