www.fgks.org   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement selectible tracks #6411

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add participantVisibilityMatrix field
  • Loading branch information
mustafaboleken committed Jun 18, 2024
commit d01369e64f42ca4db7b1fb45dabc1e3dd970f8ee
15 changes: 14 additions & 1 deletion src/main/java/io/antmedia/AppSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ public class AppSettings implements Serializable{


/**
* Encoder settings in comma separated format
* Encoder settings in JSON format
* This must be set for adaptive streaming,
* If it is empty SFU mode will be active in WebRTCAppEE,
* video height, video bitrate, and audio bitrate are set as an example,
Expand Down Expand Up @@ -2158,6 +2158,11 @@ public boolean isWriteStatsToDatastore() {
@Value("${webhookContentType:#{ T(org.apache.http.entity.ContentType).APPLICATION_JSON.getMimeType() }}")
private String webhookContentType = ContentType.APPLICATION_JSON.getMimeType();

/**
* Participant Visibility Matrix for WebRTC Clients
*/
@Value("${participantVisibilityMatrix:{\"default\": [\"default\"],\"host\":[\"attendee\",\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"],\"host_presents\": [\"attendee\",\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"],\"panelist\": [\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"],\"panelist_present\": [\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"],\"attendee_temp\": [\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"],\"attendee_temp_present\": [\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"]}}")
private String participantVisibilityMatrix = "";

public void setWriteStatsToDatastore(boolean writeStatsToDatastore) {
this.writeStatsToDatastore = writeStatsToDatastore;
Expand Down Expand Up @@ -3764,4 +3769,12 @@ public String getWebhookContentType() {
public void setWebhookContentType(String webhookContentType) {
this.webhookContentType = webhookContentType;
}

public String getParticipantVisibilityMatrix() {
return participantVisibilityMatrix;
}

public void setParticipantVisibilityMatrix(String participantVisibilityMatrix) {
this.participantVisibilityMatrix = participantVisibilityMatrix;
}
}
6 changes: 4 additions & 2 deletions src/test/java/io/antmedia/test/AppSettingsUnitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ public void testDefaultSettings()
appSettings.setHlsSegmentType("fmp4");
assertEquals("fmp4", appSettings.getHlsSegmentType());


assertEquals("{\"default\": [\"default\"],\"host\":[\"attendee\",\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"],\"host_presents\": [\"attendee\",\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"],\"panelist\": [\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"],\"panelist_present\": [\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"],\"attendee_temp\": [\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"],\"attendee_temp_present\": [\"attendee_temp\",\"attendee_temp_present\",\"host\",\"host_present\",\"panelist\",\"panelist_present\"]}", appSettings.getParticipantVisibilityMatrix());
appSettings.setParticipantVisibilityMatrix("{\"default\":[\"default\"]}");
assertEquals("{\"default\":[\"default\"]}", appSettings.getParticipantVisibilityMatrix());
}

@Test
Expand Down Expand Up @@ -570,7 +572,7 @@ public void testUnsetAppSettings(AppSettings appSettings) {
//by also checking its default value.

assertEquals("New field is added to settings. PAY ATTENTION: Please CHECK ITS DEFAULT VALUE and fix the number of fields.",
183, numberOfFields);
184, numberOfFields);


}
Expand Down