Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

Commit a8d9144

Browse files
committed
use codecPreferenceOrder and mobileCodecPreferenceOrder
1 parent 9b33a63 commit a8d9144

File tree

3 files changed

+30
-53
lines changed

3 files changed

+30
-53
lines changed

src/java/org/jivesoftware/openfire/plugin/ofmeet/ConfigServlet.java

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ public void doGet( HttpServletRequest request, HttpServletResponse response ) th
143143
boolean useNewBandwidthAllocationStrategy = JiveGlobals.getBooleanProperty( "ofmeet.use.new.bandwidth.allocation.strategy", true);
144144

145145
boolean wsBridgeChannel = JiveGlobals.getBooleanProperty( "ofmeet.bridge.ws.channel", org.jitsi.util.OSUtils.IS_WINDOWS);
146-
146+
147+
JSONArray codecPreferenceOrder = new JSONArray(JiveGlobals.getProperty( "ofmeet.codec.preference.order", "[ \"AV1\", \"VP9\", \"VP8\", \"H264\" ]"));
148+
JSONArray mobileCodecPreferenceOrder = new JSONArray(JiveGlobals.getProperty( "ofmeet.codec.preference.order", "[ \"VP8\", \"H264\", \"VP9\", \"AV1\" ]"));
149+
147150
if ( xirsysUrl != null )
148151
{
149152
Log.info( "OFMeetConfig. found xirsys Url " + xirsysUrl );
@@ -166,10 +169,8 @@ public void doGet( HttpServletRequest request, HttpServletResponse response ) th
166169

167170
final Map<String, Object> p2p = new HashMap<>();
168171
p2p.put( "enabled", ofMeetConfig.getP2pEnabled() );
169-
p2p.put( "enableUnifiedOnChrome", true);
170-
p2p.put( "preferredCodec", forceAv1 ? "AV1" : (forceVp9 ? "VP9" : "H264") );
171-
p2p.put( "preferH264", ofMeetConfig.getP2pPreferH264() );
172-
p2p.put( "disableH264", ofMeetConfig.getP2pDisableH264() );
172+
p2p.put( "codecPreferenceOrder", codecPreferenceOrder);
173+
p2p.put( "mobileCodecPreferenceOrder", mobileCodecPreferenceOrder);
173174
p2p.put( "useStunTurn", ofMeetConfig.getP2pUseStunTurn() );
174175
config.put( "enableP2P", true );
175176
config.put( "p2p", p2p );
@@ -244,39 +245,32 @@ public void doGet( HttpServletRequest request, HttpServletResponse response ) th
244245
config.put( "useNewBandwidthAllocationStrategy", useNewBandwidthAllocationStrategy );
245246

246247
final JSONObject videoQuality = new JSONObject();
247-
videoQuality.put( "preferredCodec", forceAv1 ? "AV1" : (forceVp9 ? "VP9" : "H264") );
248-
final JSONObject maxBitratesVideo = new JSONObject();
248+
videoQuality.put( "enableAdaptiveMode", true);
249+
videoQuality.put( "codecPreferenceOrder", codecPreferenceOrder);
250+
videoQuality.put( "mobileCodecPreferenceOrder", mobileCodecPreferenceOrder);
249251

250252
final JSONObject vp9 = new JSONObject();
251-
vp9.put( "low", lowMaxBitratesVideo );
252-
vp9.put( "standard", standardMaxBitratesVideo );
253-
vp9.put( "high", highMaxBitratesVideo );
254-
maxBitratesVideo.put( "VP9", vp9 );
255-
253+
vp9.put( "scalabilityModeEnabled", true );
254+
vp9.put( "useSimulcast", false );
255+
videoQuality.put( "vp9", vp9 );
256+
256257
final JSONObject h264 = new JSONObject();
257-
h264.put( "low", lowMaxBitratesVideo );
258-
h264.put( "standard", standardMaxBitratesVideo );
259-
h264.put( "high", highMaxBitratesVideo );
260-
maxBitratesVideo.put( "H264", h264 );
258+
videoQuality.put( "h264", h264 );
261259

262260
final JSONObject av1 = new JSONObject();
263-
av1.put( "low", lowMaxBitratesVideo );
264-
av1.put( "standard", standardMaxBitratesVideo );
265-
av1.put( "high", highMaxBitratesVideo );
266-
maxBitratesVideo.put( "AV1", av1 );
261+
av1.put( "useSimulcast", false );
262+
videoQuality.put( "av1", av1 );
267263

268-
videoQuality.put( "maxBitratesVideo", maxBitratesVideo );
269-
270-
final JSONObject minHeightForQualityLvl = new JSONObject();
271-
minHeightForQualityLvl.put( minHeightForQualityLvlLow, "low" );
272-
minHeightForQualityLvl.put( minHeightForQualityLvlStd, "standard" );
273-
minHeightForQualityLvl.put( minHeightForQualityLvlHigh, "high" );
274-
videoQuality.put( "minHeightForQualityLvl", minHeightForQualityLvl );
275264
config.put( "videoQuality", videoQuality );
265+
266+
final JSONObject audioQuality = new JSONObject();
267+
audioQuality.put( "enableOpusDtx", false );
268+
audioQuality.put( "stereo", enableStereo);
269+
270+
config.put( "audioQuality", audioQuality);
276271

277272
config.put( "recordingType", "colibri" );
278273
config.put( "disableAudioLevels", ! enableAudioLevels );
279-
config.put( "stereo", false );
280274
config.put( "requireDisplayName", true );
281275
config.put( "startAudioOnly", ofMeetConfig.getStartAudioOnly() );
282276

@@ -330,7 +324,7 @@ public void doGet( HttpServletRequest request, HttpServletResponse response ) th
330324
testing.put( "capScreenshareBitrate", capScreenshareBitrate ? 1 : 0 );
331325
config.put( "testing", testing );
332326

333-
config.put( "maxFullResolutionParticipants", -1);
327+
config.put( "maxFullResolutionParticipants", 1);
334328
config.put( "useRoomAsSharedDocumentName", false );
335329
config.put( "logStats", logStats );
336330
config.put( "ofmeetWinSSOEnabled", ofmeetWinSSOEnabled );
@@ -373,7 +367,6 @@ public void doGet( HttpServletRequest request, HttpServletResponse response ) th
373367
config.put( "disableAGC", true );
374368
config.put( "disableHPF", true );
375369
config.put( "enableLipSync", false );
376-
config.put( "stereo", true );
377370
config.put( "opusMaxAverageBitrate", 510000 );
378371
}
379372

src/java/org/jivesoftware/openfire/plugin/ofmeet/JitsiJicofoWrapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ public synchronized void initialize( File pluginDirectory) throws Exception
113113
props.setProperty( "org.jitsi.jicofo.SERVICE_REDISCOVERY_INTERVAL", "60000" );
114114
props.setProperty( "org.jitsi.jicofo.DISABLE_AUTO_OWNER", Boolean.toString( !JiveGlobals.getBooleanProperty( "ofmeet.conference.auto-moderator", true ) ) );
115115

116-
props.setProperty( "org.jitsi.jicofo.ENABLE_H264", Boolean.toString( !JiveGlobals.getBooleanProperty( "ofmeet.jicofo.force.vp9", false ) && !JiveGlobals.getBooleanProperty( "ofmeet.jicofo.force.av1", true ) ) );
117-
props.setProperty( "org.jitsi.jicofo.ENABLE_VP8", Boolean.toString( !JiveGlobals.getBooleanProperty( "ofmeet.jicofo.force.vp9", false ) && !JiveGlobals.getBooleanProperty( "ofmeet.jicofo.force.av1", true ) ) );
118-
props.setProperty( "org.jitsi.jicofo.ENABLE_VP9", Boolean.toString( JiveGlobals.getBooleanProperty( "ofmeet.jicofo.force.vp9", false ) && !JiveGlobals.getBooleanProperty( "ofmeet.jicofo.force.av1", true ) ) );
119-
props.setProperty( "org.jitsi.jicofo.ENABLE_AV1", Boolean.toString( JiveGlobals.getBooleanProperty( "ofmeet.jicofo.force.av1", true ) && !JiveGlobals.getBooleanProperty( "ofmeet.jicofo.force.vp9", false ) ) );
116+
props.setProperty( "org.jitsi.jicofo.ENABLE_H264", "true");
117+
props.setProperty( "org.jitsi.jicofo.ENABLE_VP8", "true");
118+
props.setProperty( "org.jitsi.jicofo.ENABLE_VP9", "true");
119+
props.setProperty( "org.jitsi.jicofo.ENABLE_AV1", "true");
120120

121121
Log.debug("sip-communicator.properties");
122122

src/web/ofmeet-settings.jsp

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@
4848
final boolean conferenceadmin = ParamUtils.getBooleanParameter( request, "conferenceadmin" );
4949
final boolean securityenabled = ParamUtils.getBooleanParameter( request, "securityenabled" );
5050
final boolean webauthn_enabled = ParamUtils.getBooleanParameter( request, "webauthn_enabled" );
51-
final boolean disableRtx = !ParamUtils.getBooleanParameter( request, "enableRtx" );
52-
final boolean forceVp9 = ParamUtils.getBooleanParameter( request, "forceVp9" );
53-
final boolean forceAv1 = ParamUtils.getBooleanParameter( request, "forceAv1" );
51+
final boolean disableRtx = !ParamUtils.getBooleanParameter( request, "enableRtx" );
5452
final String authusername = request.getParameter( "authusername" );
5553
final String sippassword = request.getParameter( "sippassword" );
5654
final String server = request.getParameter( "server" );
@@ -227,9 +225,7 @@
227225
JiveGlobals.setProperty( "org.jitsi.videobridge.ofmeet.jvb.jvm.customOptions", jvmJvb );
228226
JiveGlobals.setProperty( "org.jitsi.videobridge.ofmeet.focus.jvm.customOptions", jvmJicofo );
229227
JiveGlobals.setProperty( "org.jitsi.videobridge.ofmeet.jigasi.jvm.customOptions", jvmJigasi );
230-
231-
JiveGlobals.setProperty( "ofmeet.jicofo.force.vp9", Boolean.toString( forceVp9 ) );
232-
JiveGlobals.setProperty( "ofmeet.jicofo.force.av1", Boolean.toString( forceAv1 ) );
228+
233229
JiveGlobals.setProperty( "ofmeet.desktop.sharing.framerate.min", desktopSharingFrameRateMin);
234230
JiveGlobals.setProperty( "ofmeet.desktop.sharing.framerate.max", desktopSharingFrameRateMax);
235231
JiveGlobals.setProperty( "ofmeet.max.full.resolution.participants", maxFullResolutionParticipants );
@@ -431,19 +427,7 @@
431427
<input type="checkbox" name="websockets" ${admin:getBooleanProperty( "org.jitsi.videobridge.ofmeet.websockets", false) ? "checked" : ""}>
432428
<fmt:message key="config.page.configuration.ofmeet.websockets.enabled" />
433429
</td>
434-
</tr>
435-
<tr>
436-
<td nowrap colspan="2">
437-
<input type="checkbox" name="forceVp9" ${admin:getBooleanProperty( "ofmeet.jicofo.force.vp9", false) ? "checked" : ""}>
438-
<fmt:message key="config.page.configuration.ofmeet.jicofo.force.vp9" />
439-
</td>
440-
</tr>
441-
<tr>
442-
<td nowrap colspan="2">
443-
<input type="checkbox" name="forceAv1" ${admin:getBooleanProperty( "ofmeet.jicofo.force.av1", true) ? "checked" : ""}>
444-
<fmt:message key="config.page.configuration.ofmeet.jicofo.force.av1" />
445-
</td>
446-
</tr>
430+
</tr>
447431
<tr>
448432
<td nowrap colspan="2">
449433
<input type="checkbox" name="enableRtx" ${ofmeetConfig.disableRtx ? "" : "checked"}>

0 commit comments

Comments
 (0)