File tree Expand file tree Collapse file tree 2 files changed +35
-6
lines changed
src/main/java/org/jitsi/jigasi Expand file tree Collapse file tree 2 files changed +35
-6
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,17 @@ public void startWithServices(final BundleContext bundleContext)
236
236
new DefaultPacketExtensionProvider <>(RecordingStatus .class )
237
237
);
238
238
239
+ ProviderManager .addExtensionProvider (
240
+ ConferenceProperties .ELEMENT ,
241
+ ConferenceProperties .NAMESPACE ,
242
+ new DefaultPacketExtensionProvider <>(ConferenceProperties .class )
243
+ );
244
+ ProviderManager .addExtensionProvider (
245
+ ConferenceProperties .ConferenceProperty .ELEMENT ,
246
+ ConferenceProperties .NAMESPACE ,
247
+ new DefaultPacketExtensionProvider <>(ConferenceProperties .ConferenceProperty .class )
248
+ );
249
+
239
250
logger .info ("initialized SipGateway" );
240
251
sipGateway = new SipGateway (bundleContext )
241
252
{
Original file line number Diff line number Diff line change 30
30
import org .jitsi .utils .*;
31
31
import org .jitsi .utils .logging .Logger ;
32
32
import org .jitsi .xmpp .extensions .jibri .*;
33
+ import org .jitsi .xmpp .extensions .jitsimeet .*;
33
34
import org .jivesoftware .smack .packet .*;
34
35
35
36
import java .util .*;
@@ -232,13 +233,30 @@ private CallContext getCallContext()
232
233
*/
233
234
public void process (Presence presence )
234
235
{
235
- RecordingStatus rs = presence .getExtension (RecordingStatus .class );
236
-
237
- if (rs != null
238
- && gatewaySession .getFocusResourceAddr ().equals (
239
- presence .getFrom ().getResourceOrEmpty ().toString ()))
236
+ if (gatewaySession .getFocusResourceAddr ().equals (presence .getFrom ().getResourceOrEmpty ().toString ()))
240
237
{
241
- notifyRecordingStatusChanged (rs .getRecordingMode (), rs .getStatus ());
238
+ RecordingStatus rs = presence .getExtension (RecordingStatus .class );
239
+
240
+ if (rs != null )
241
+ {
242
+ notifyRecordingStatusChanged (rs .getRecordingMode (), rs .getStatus ());
243
+
244
+ return ;
245
+ }
246
+
247
+ ConferenceProperties props = presence .getExtension (ConferenceProperties .class );
248
+ if (props != null )
249
+ {
250
+ props .getProperties ().stream ()
251
+ .filter (p -> ConferenceProperties .KEY_AUDIO_RECORDING_ENABLED .equals (p .getKey ()))
252
+ .findFirst ().ifPresent (p ->
253
+ {
254
+ if (p .getValue ().equals (Boolean .TRUE .toString ()))
255
+ {
256
+ notifyRecordingStatusChanged (JibriIq .RecordingMode .FILE , JibriIq .Status .ON );
257
+ }
258
+ });
259
+ }
242
260
}
243
261
}
244
262
You can’t perform that action at this time.
0 commit comments