mirror of https://github.com/OpenVidu/openvidu.git
openvidu-test-e2e: enable tests (one-to-one audio and video only, massive room)
parent
28a0574d99
commit
71598c2d7d
|
@ -20,7 +20,6 @@ package io.openvidu.test.browsers;
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -164,83 +163,23 @@ public class BrowserUser {
|
||||||
((JavascriptExecutor) driver).executeScript(script);
|
((JavascriptExecutor) driver).executeScript(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean assertMediaTracks(WebElement videoElement, boolean audioTransmission, boolean videoTransmission,
|
public boolean assertAllElementsHaveTracks(String querySelector, boolean hasAudio, boolean hasVideo) {
|
||||||
String parentSelector) {
|
String calculateReturnValue = "returnValue && ";
|
||||||
return this.assertMediaTracks(Collections.singleton(videoElement), audioTransmission, videoTransmission,
|
if (hasAudio) {
|
||||||
parentSelector);
|
calculateReturnValue += "el.srcObject.getAudioTracks().length === 1 && el.srcObject.getAudioTracks()[0].enabled";
|
||||||
|
} else {
|
||||||
|
calculateReturnValue += "el.srcObject.getAudioTracks().length === 0";
|
||||||
}
|
}
|
||||||
|
calculateReturnValue += " && ";
|
||||||
public boolean assertMediaTracks(Iterable<WebElement> mediaElements, boolean audioTransmission,
|
if (hasVideo) {
|
||||||
boolean videoTransmission) {
|
calculateReturnValue += "el.srcObject.getVideoTracks().length === 1 && el.srcObject.getVideoTracks()[0].enabled";
|
||||||
boolean success = true;
|
} else {
|
||||||
for (WebElement mediaElement : mediaElements) {
|
calculateReturnValue += "el.srcObject.getVideoTracks().length === 0";
|
||||||
if (!waitUntilSrcObjectDefined(mediaElement, "", 5000)) {
|
|
||||||
System.err.println("srcObject of HTMLVideoElement was not defined!");
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
success = success && (audioTransmission == this.hasAudioTracks(mediaElement, ""))
|
String script = "var returnValue = true; document.querySelectorAll('" + querySelector
|
||||||
&& (videoTransmission == this.hasVideoTracks(mediaElement, ""));
|
+ "').forEach(el => { returnValue = " + calculateReturnValue + " }); return returnValue;";
|
||||||
if (!success)
|
boolean tracks = (boolean) ((JavascriptExecutor) driver).executeScript(script);
|
||||||
break;
|
return tracks;
|
||||||
}
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean assertMediaTracks(Iterable<WebElement> videoElements, boolean audioTransmission,
|
|
||||||
boolean videoTransmission, String parentSelector) {
|
|
||||||
boolean success = true;
|
|
||||||
for (WebElement video : videoElements) {
|
|
||||||
if (!waitUntilSrcObjectDefined(video, "", 5000)) {
|
|
||||||
System.err.println("srcObject of HTMLVideoElement was not defined!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
success = success && (audioTransmission == this.hasAudioTracks(video, parentSelector))
|
|
||||||
&& (videoTransmission == this.hasVideoTracks(video, parentSelector));
|
|
||||||
if (!success)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean hasAudioTracks(WebElement mediaElement, String parentSelector) {
|
|
||||||
String script = "return ((document.querySelector('" + parentSelector + (parentSelector.isEmpty() ? "" : " ")
|
|
||||||
+ "#" + mediaElement.getAttribute("id") + "').srcObject.getAudioTracks().length === 1)"
|
|
||||||
+ " && (document.querySelector('" + parentSelector + (parentSelector.isEmpty() ? "" : " ") + "#"
|
|
||||||
+ mediaElement.getAttribute("id") + "').srcObject.getAudioTracks()[0].enabled))";
|
|
||||||
boolean audioTracks = (boolean) ((JavascriptExecutor) driver).executeScript(script);
|
|
||||||
return audioTracks;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean hasVideoTracks(WebElement mediaElement, String parentSelector) {
|
|
||||||
String script = "return ((document.querySelector('" + parentSelector + (parentSelector.isEmpty() ? "" : " ")
|
|
||||||
+ "#" + mediaElement.getAttribute("id") + "').srcObject.getVideoTracks().length === 1)"
|
|
||||||
+ " && (document.querySelector('" + parentSelector + (parentSelector.isEmpty() ? "" : " ") + "#"
|
|
||||||
+ mediaElement.getAttribute("id") + "').srcObject.getVideoTracks()[0].enabled))";
|
|
||||||
boolean videoTracks = (boolean) ((JavascriptExecutor) driver).executeScript(script);
|
|
||||||
return videoTracks;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean waitUntilSrcObjectDefined(WebElement videoElement, String parentSelector, int maxMsWait) {
|
|
||||||
final int sleepInterval = 50;
|
|
||||||
int maxIterations = maxMsWait / sleepInterval;
|
|
||||||
int counter = 0;
|
|
||||||
boolean defined = srcObjectDefined(videoElement, parentSelector);
|
|
||||||
while (!defined && counter < maxIterations) {
|
|
||||||
try {
|
|
||||||
Thread.sleep(sleepInterval);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
}
|
|
||||||
defined = srcObjectDefined(videoElement, parentSelector);
|
|
||||||
counter++;
|
|
||||||
}
|
|
||||||
return defined;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean srcObjectDefined(WebElement videoElement, String parentSelector) {
|
|
||||||
String script = "return (!!(document.querySelector('" + parentSelector + (parentSelector.isEmpty() ? "" : " ")
|
|
||||||
+ "#" + videoElement.getAttribute("id") + "').srcObject))";
|
|
||||||
boolean defined = (boolean) ((JavascriptExecutor) driver).executeScript(script);
|
|
||||||
return defined;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -44,9 +44,9 @@ public class OpenViduTestE2e {
|
||||||
|
|
||||||
protected static String MEDIA_SERVER_IMAGE = "livekit-server:latest";
|
protected static String MEDIA_SERVER_IMAGE = "livekit-server:latest";
|
||||||
|
|
||||||
protected static String LIVEKIT_API_KEY = "key1";
|
protected static String LIVEKIT_API_KEY = "devkey";
|
||||||
protected static String LIVEKIT_API_SECRET = "abcdefghijklmnopqrstuvwxyz123456";
|
protected static String LIVEKIT_API_SECRET = "secret";
|
||||||
protected static String LIVEKIT_URL = "wss://localhost:1880/";
|
protected static String LIVEKIT_URL = "ws://localhost:7880/";
|
||||||
protected static String APP_URL = "https://localhost:4200/";
|
protected static String APP_URL = "https://localhost:4200/";
|
||||||
|
|
||||||
protected static String OPENVIDU_PRO_LICENSE = "not_valid";
|
protected static String OPENVIDU_PRO_LICENSE = "not_valid";
|
||||||
|
|
|
@ -24,7 +24,6 @@ import java.util.function.BiFunction;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Disabled;
|
|
||||||
import org.junit.jupiter.api.DisplayName;
|
import org.junit.jupiter.api.DisplayName;
|
||||||
import org.junit.jupiter.api.Tag;
|
import org.junit.jupiter.api.Tag;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
@ -102,20 +101,15 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
||||||
Assertions.assertEquals(4, numberOfVideos, "Wrong number of videos");
|
Assertions.assertEquals(4, numberOfVideos, "Wrong number of videos");
|
||||||
Assertions.assertEquals(4, numberOfAudios, "Wrong number of audios");
|
Assertions.assertEquals(4, numberOfAudios, "Wrong number of audios");
|
||||||
|
|
||||||
Assertions.assertTrue(user.getBrowserUser()
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("video", false, true),
|
||||||
.assertMediaTracks(user.getDriver().findElements(By.tagName("video")), false, true),
|
|
||||||
"HTMLVideoElements were expected to have only one video track");
|
"HTMLVideoElements were expected to have only one video track");
|
||||||
Assertions
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("audio.remote", true, false),
|
||||||
.assertTrue(
|
|
||||||
user.getBrowserUser().assertMediaTracks(
|
|
||||||
user.getDriver().findElements(By.cssSelector("audio.remote")), true, false),
|
|
||||||
"HTMLAudioElements were expected to have only one audio track");
|
"HTMLAudioElements were expected to have only one audio track");
|
||||||
gracefullyLeaveParticipants(user, 2);
|
gracefullyLeaveParticipants(user, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@DisplayName("One2One only audio")
|
@DisplayName("One2One only audio")
|
||||||
@Disabled
|
|
||||||
void oneToOneOnlyAudioSession() throws Exception {
|
void oneToOneOnlyAudioSession() throws Exception {
|
||||||
|
|
||||||
OpenViduTestappUser user = setupBrowserAndConnectToOpenViduTestapp("chrome");
|
OpenViduTestappUser user = setupBrowserAndConnectToOpenViduTestapp("chrome");
|
||||||
|
@ -124,26 +118,33 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
||||||
|
|
||||||
user.getDriver().findElement(By.id("one2one-btn")).click();
|
user.getDriver().findElement(By.id("one2one-btn")).click();
|
||||||
|
|
||||||
user.getDriver().findElements(By.className("send-video-checkbox")).forEach(el -> el.click());
|
for (int n = 0; n < 2; n++) {
|
||||||
|
user.getDriver().findElement(By.id("room-options-btn-" + n)).click();
|
||||||
|
Thread.sleep(300);
|
||||||
|
user.getDriver().findElement(By.id("video-capture-false")).click();
|
||||||
|
user.getDriver().findElement(By.id("close-dialog-btn")).click();
|
||||||
|
Thread.sleep(300);
|
||||||
|
}
|
||||||
|
|
||||||
user.getDriver().findElements(By.className("connect-btn")).forEach(el -> el.sendKeys(Keys.ENTER));
|
user.getDriver().findElements(By.className("connect-btn")).forEach(el -> el.sendKeys(Keys.ENTER));
|
||||||
|
|
||||||
user.getEventManager().waitUntilEventReaches("connectionCreated", "RoomEvent", 4);
|
user.getEventManager().waitUntilEventReaches("connected", "RoomEvent", 2);
|
||||||
user.getEventManager().waitUntilEventReaches("accessAllowed", "RoomEvent", 2);
|
user.getEventManager().waitUntilEventReaches("localTrackPublished", "RoomEvent", 2);
|
||||||
user.getEventManager().waitUntilEventReaches("streamCreated", "RoomEvent", 4);
|
user.getEventManager().waitUntilEventReaches("trackSubscribed", "RoomEvent", 2);
|
||||||
user.getEventManager().waitUntilEventReaches("streamPlaying", "RoomEvent", 4);
|
|
||||||
|
|
||||||
final int numberOfVideos = user.getDriver().findElements(By.tagName("video")).size();
|
final int numberOfVideos = user.getDriver().findElements(By.tagName("video")).size();
|
||||||
Assertions.assertEquals(4, numberOfVideos, "Wrong number of videos");
|
Assertions.assertEquals(0, numberOfVideos, "Wrong number of videos");
|
||||||
Assertions.assertTrue(user.getBrowserUser()
|
final int numberOfAudios = user.getDriver().findElements(By.tagName("audio")).size();
|
||||||
.assertMediaTracks(user.getDriver().findElements(By.tagName("video")), true, false),
|
Assertions.assertEquals(4, numberOfAudios, "Wrong number of audios");
|
||||||
"Videos were expected to only have audio tracks");
|
|
||||||
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("audio.remote", true, false),
|
||||||
|
"HTMLAudioElements were expected to have only one audio track");
|
||||||
|
|
||||||
gracefullyLeaveParticipants(user, 2);
|
gracefullyLeaveParticipants(user, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@DisplayName("One2One only video")
|
@DisplayName("One2One only video")
|
||||||
@Disabled
|
|
||||||
void oneToOneOnlyVideoSession() throws Exception {
|
void oneToOneOnlyVideoSession() throws Exception {
|
||||||
|
|
||||||
OpenViduTestappUser user = setupBrowserAndConnectToOpenViduTestapp("chrome");
|
OpenViduTestappUser user = setupBrowserAndConnectToOpenViduTestapp("chrome");
|
||||||
|
@ -152,19 +153,27 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
||||||
|
|
||||||
user.getDriver().findElement(By.id("one2one-btn")).click();
|
user.getDriver().findElement(By.id("one2one-btn")).click();
|
||||||
|
|
||||||
user.getDriver().findElements(By.className("send-audio-checkbox")).forEach(el -> el.click());
|
for (int n = 0; n < 2; n++) {
|
||||||
|
user.getDriver().findElement(By.id("room-options-btn-" + n)).click();
|
||||||
|
Thread.sleep(300);
|
||||||
|
user.getDriver().findElement(By.id("audio-capture-false")).click();
|
||||||
|
user.getDriver().findElement(By.id("close-dialog-btn")).click();
|
||||||
|
Thread.sleep(300);
|
||||||
|
}
|
||||||
|
|
||||||
user.getDriver().findElements(By.className("connect-btn")).forEach(el -> el.sendKeys(Keys.ENTER));
|
user.getDriver().findElements(By.className("connect-btn")).forEach(el -> el.sendKeys(Keys.ENTER));
|
||||||
|
|
||||||
user.getEventManager().waitUntilEventReaches("connectionCreated", "RoomEvent", 4);
|
user.getEventManager().waitUntilEventReaches("connected", "RoomEvent", 2);
|
||||||
user.getEventManager().waitUntilEventReaches("accessAllowed", "RoomEvent", 2);
|
user.getEventManager().waitUntilEventReaches("localTrackPublished", "RoomEvent", 2);
|
||||||
user.getEventManager().waitUntilEventReaches("streamCreated", "RoomEvent", 4);
|
user.getEventManager().waitUntilEventReaches("trackSubscribed", "RoomEvent", 2);
|
||||||
user.getEventManager().waitUntilEventReaches("streamPlaying", "RoomEvent", 4);
|
|
||||||
|
|
||||||
|
final int numberOfAudios = user.getDriver().findElements(By.tagName("audio")).size();
|
||||||
|
Assertions.assertEquals(0, numberOfAudios, "Wrong number of audios");
|
||||||
final int numberOfVideos = user.getDriver().findElements(By.tagName("video")).size();
|
final int numberOfVideos = user.getDriver().findElements(By.tagName("video")).size();
|
||||||
Assertions.assertEquals(4, numberOfVideos, "Wrong number of videos");
|
Assertions.assertEquals(4, numberOfVideos, "Wrong number of videos");
|
||||||
Assertions.assertTrue(user.getBrowserUser()
|
|
||||||
.assertMediaTracks(user.getDriver().findElements(By.tagName("video")), false, true),
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("video", false, true),
|
||||||
"Videos were expected to only have video tracks");
|
"HTMLVideoElements were expected to have only one audio track");
|
||||||
|
|
||||||
gracefullyLeaveParticipants(user, 2);
|
gracefullyLeaveParticipants(user, 2);
|
||||||
}
|
}
|
||||||
|
@ -177,34 +186,33 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
||||||
|
|
||||||
log.info("One2Many [Video + Audio]");
|
log.info("One2Many [Video + Audio]");
|
||||||
|
|
||||||
|
final int SUBSCRIBERS = 7;
|
||||||
|
final int USERS = SUBSCRIBERS + 1;
|
||||||
|
|
||||||
WebElement one2ManyInput = user.getDriver().findElement(By.id("one2many-input"));
|
WebElement one2ManyInput = user.getDriver().findElement(By.id("one2many-input"));
|
||||||
one2ManyInput.clear();
|
one2ManyInput.clear();
|
||||||
one2ManyInput.sendKeys("3");
|
one2ManyInput.sendKeys(Integer.toString(SUBSCRIBERS));
|
||||||
user.getDriver().findElement(By.id("auto-join-checkbox")).click();
|
user.getDriver().findElement(By.id("auto-join-checkbox")).click();
|
||||||
user.getDriver().findElement(By.id("one2many-btn")).click();
|
user.getDriver().findElement(By.id("one2many-btn")).click();
|
||||||
|
|
||||||
user.getEventManager().waitUntilEventReaches("signalConnected", "RoomEvent", 4);
|
user.getEventManager().waitUntilEventReaches("signalConnected", "RoomEvent", USERS);
|
||||||
user.getEventManager().waitUntilEventReaches("connected", "RoomEvent", 4);
|
user.getEventManager().waitUntilEventReaches("connected", "RoomEvent", USERS);
|
||||||
user.getEventManager().waitUntilEventReaches("localTrackPublished", "RoomEvent", 2);
|
user.getEventManager().waitUntilEventReaches("localTrackPublished", "RoomEvent", 2);
|
||||||
user.getEventManager().waitUntilEventReaches("trackSubscribed", "RoomEvent", 6);
|
user.getEventManager().waitUntilEventReaches("trackSubscribed", "RoomEvent", (SUBSCRIBERS) * 2);
|
||||||
|
|
||||||
user.getWaiter().until(ExpectedConditions.numberOfElementsToBe(By.tagName("video"), 4));
|
user.getWaiter().until(ExpectedConditions.numberOfElementsToBe(By.tagName("video"), USERS));
|
||||||
user.getWaiter().until(ExpectedConditions.numberOfElementsToBe(By.tagName("audio"), 4));
|
user.getWaiter().until(ExpectedConditions.numberOfElementsToBe(By.tagName("audio"), USERS));
|
||||||
final int numberOfVideos = user.getDriver().findElements(By.tagName("video")).size();
|
final int numberOfVideos = user.getDriver().findElements(By.tagName("video")).size();
|
||||||
final int numberOfAudios = user.getDriver().findElements(By.tagName("audio")).size();
|
final int numberOfAudios = user.getDriver().findElements(By.tagName("audio")).size();
|
||||||
Assertions.assertEquals(4, numberOfVideos, "Wrong number of videos");
|
Assertions.assertEquals(USERS, numberOfVideos, "Wrong number of videos");
|
||||||
Assertions.assertEquals(4, numberOfAudios, "Wrong number of audios");
|
Assertions.assertEquals(USERS, numberOfAudios, "Wrong number of audios");
|
||||||
|
|
||||||
Assertions.assertTrue(user.getBrowserUser()
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("video", false, true),
|
||||||
.assertMediaTracks(user.getDriver().findElements(By.tagName("video")), false, true),
|
|
||||||
"HTMLVideoElements were expected to have only one video track");
|
"HTMLVideoElements were expected to have only one video track");
|
||||||
Assertions
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("audio.remote", true, false),
|
||||||
.assertTrue(
|
|
||||||
user.getBrowserUser().assertMediaTracks(
|
|
||||||
user.getDriver().findElements(By.cssSelector("audio.remote")), true, false),
|
|
||||||
"HTMLAudioElements were expected to have only one audio track");
|
"HTMLAudioElements were expected to have only one audio track");
|
||||||
|
|
||||||
gracefullyLeaveParticipants(user, 4);
|
gracefullyLeaveParticipants(user, USERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -234,13 +242,9 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
||||||
Assertions.assertEquals(16, numberOfVideos, "Wrong number of videos");
|
Assertions.assertEquals(16, numberOfVideos, "Wrong number of videos");
|
||||||
Assertions.assertEquals(16, numberOfAudios, "Wrong number of audios");
|
Assertions.assertEquals(16, numberOfAudios, "Wrong number of audios");
|
||||||
|
|
||||||
Assertions.assertTrue(user.getBrowserUser()
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("video", false, true),
|
||||||
.assertMediaTracks(user.getDriver().findElements(By.tagName("video")), false, true),
|
|
||||||
"HTMLVideoElements were expected to have only one video track");
|
"HTMLVideoElements were expected to have only one video track");
|
||||||
Assertions
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("audio.remote", true, false),
|
||||||
.assertTrue(
|
|
||||||
user.getBrowserUser().assertMediaTracks(
|
|
||||||
user.getDriver().findElements(By.cssSelector("audio.remote")), true, false),
|
|
||||||
"HTMLAudioElements were expected to have only one audio track");
|
"HTMLAudioElements were expected to have only one audio track");
|
||||||
|
|
||||||
gracefullyLeaveParticipants(user, 4);
|
gracefullyLeaveParticipants(user, 4);
|
||||||
|
@ -248,32 +252,38 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@DisplayName("Massive session")
|
@DisplayName("Massive session")
|
||||||
@Disabled
|
|
||||||
void massiveSessionTest() throws Exception {
|
void massiveSessionTest() throws Exception {
|
||||||
|
|
||||||
OpenViduTestappUser user = setupBrowserAndConnectToOpenViduTestapp("chrome");
|
OpenViduTestappUser user = setupBrowserAndConnectToOpenViduTestapp("chrome");
|
||||||
|
|
||||||
log.info("Massive session");
|
log.info("Massive session");
|
||||||
|
|
||||||
final Integer NUMBER_OF_USERS = 7;
|
final Integer NUMBER_OF_USERS = 8;
|
||||||
|
|
||||||
user.getDriver().findElement(By.id("toolbar-scenarios")).sendKeys(Keys.ENTER);
|
user.getDriver().findElement(By.id("toolbar-scenarios")).sendKeys(Keys.ENTER);
|
||||||
|
|
||||||
WebElement one2ManyInput = user.getDriver().findElement(By.id("one2many-input"));
|
WebElement many2ManyInput = user.getDriver().findElement(By.id("m2m-input"));
|
||||||
one2ManyInput.clear();
|
many2ManyInput.clear();
|
||||||
one2ManyInput.sendKeys(NUMBER_OF_USERS.toString());
|
many2ManyInput.sendKeys(NUMBER_OF_USERS.toString());
|
||||||
|
|
||||||
user.getDriver().findElement(By.id("one2many-btn")).click();
|
user.getDriver().findElement(By.id("m2m-btn")).click();
|
||||||
|
|
||||||
|
user.getEventManager().waitUntilEventReaches("signalConnected", "RoomEvent", NUMBER_OF_USERS);
|
||||||
|
user.getEventManager().waitUntilEventReaches("connected", "RoomEvent", NUMBER_OF_USERS);
|
||||||
|
user.getEventManager().waitUntilEventReaches("localTrackPublished", "RoomEvent", NUMBER_OF_USERS * 2);
|
||||||
|
user.getEventManager().waitUntilEventReaches("trackPublished", "RoomEvent",
|
||||||
|
(NUMBER_OF_USERS) * (NUMBER_OF_USERS - 1) * 2);
|
||||||
|
user.getEventManager().waitUntilEventReaches("trackSubscribed", "RoomEvent",
|
||||||
|
(NUMBER_OF_USERS) * (NUMBER_OF_USERS - 1) * 2);
|
||||||
|
|
||||||
user.getWaiter()
|
user.getWaiter()
|
||||||
.until(ExpectedConditions.numberOfElementsToBe(By.tagName("video"), NUMBER_OF_USERS * NUMBER_OF_USERS));
|
.until(ExpectedConditions.numberOfElementsToBe(By.tagName("video"), NUMBER_OF_USERS * NUMBER_OF_USERS));
|
||||||
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("video", true, true),
|
||||||
|
"HTMLVideoElements were expected to have a video track and an audio track attached");
|
||||||
|
|
||||||
user.getEventManager().waitUntilEventReaches("streamCreated", "RoomEvent", NUMBER_OF_USERS * NUMBER_OF_USERS);
|
user.getDriver().findElement(By.id("finish-btn")).click();
|
||||||
user.getEventManager().waitUntilEventReaches("streamPlaying", "RoomEvent", NUMBER_OF_USERS * NUMBER_OF_USERS);
|
|
||||||
|
|
||||||
this.stopMediaServer();
|
user.getEventManager().waitUntilEventReaches("disconnected", "RoomEvent", NUMBER_OF_USERS);
|
||||||
|
|
||||||
user.getEventManager().waitUntilEventReaches("sessionDisconnected", "RoomEvent", NUMBER_OF_USERS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -315,14 +325,9 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
||||||
Assertions.assertEquals(3, numberOfVideos, "Wrong number of videos");
|
Assertions.assertEquals(3, numberOfVideos, "Wrong number of videos");
|
||||||
Assertions.assertEquals(3, numberOfAudios, "Wrong number of audios");
|
Assertions.assertEquals(3, numberOfAudios, "Wrong number of audios");
|
||||||
|
|
||||||
Assertions
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("video", false, true),
|
||||||
.assertTrue(
|
|
||||||
user.getBrowserUser().assertMediaTracks(
|
|
||||||
user.getDriver().findElements(By.tagName("video")), false, true),
|
|
||||||
"HTMLVideoElements were expected to have only one video track");
|
"HTMLVideoElements were expected to have only one video track");
|
||||||
Assertions.assertTrue(
|
Assertions.assertTrue(user.getBrowserUser().assertAllElementsHaveTracks("audio.remote", true, false),
|
||||||
user.getBrowserUser().assertMediaTracks(
|
|
||||||
user.getDriver().findElements(By.cssSelector("audio.remote")), true, false),
|
|
||||||
"HTMLAudioElements were expected to have only one audio track");
|
"HTMLAudioElements were expected to have only one audio track");
|
||||||
|
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
|
|
|
@ -63,13 +63,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@angular-devkit/architect": {
|
"node_modules/@angular-devkit/architect": {
|
||||||
"version": "0.1602.15",
|
"version": "0.1602.16",
|
||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1602.15.tgz",
|
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1602.16.tgz",
|
||||||
"integrity": "sha512-+yPlUG5c8l7Z/A6dyeV7NQjj4WDWnWWQt+8eW/KInwVwoYiM32ntTJ0M4uU/aDdHuwKQnMLly28AcSWPWKYf2Q==",
|
"integrity": "sha512-aWEeGU4UlbrSKpcAZsldVNxNXAWEeu9hM2BPk77GftbRC8PBMWpgYyrJWTz2ryn8aSmGKT3T8OyBH4gZA/667w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/core": "16.2.15",
|
"@angular-devkit/core": "16.2.16",
|
||||||
"rxjs": "7.8.1"
|
"rxjs": "7.8.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -79,16 +79,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@angular-devkit/build-angular": {
|
"node_modules/@angular-devkit/build-angular": {
|
||||||
"version": "16.2.15",
|
"version": "16.2.16",
|
||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-16.2.15.tgz",
|
"resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-16.2.16.tgz",
|
||||||
"integrity": "sha512-gw9wQENYVNUCB2bnzk0yKd6YGlemDwuwKnrPnSm4myyMuScZpW+e+zliGW+JXRuVWZqiTJNcdd58e4CrrreILg==",
|
"integrity": "sha512-gEni21kza41xaRnVWP1sMuiWHS/rdoym5FEEGDo9PG60LwRC4lekIgT09GpTlmMu007UEfo0ccQnGroD6+MqWg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ampproject/remapping": "2.2.1",
|
"@ampproject/remapping": "2.2.1",
|
||||||
"@angular-devkit/architect": "0.1602.15",
|
"@angular-devkit/architect": "0.1602.16",
|
||||||
"@angular-devkit/build-webpack": "0.1602.15",
|
"@angular-devkit/build-webpack": "0.1602.16",
|
||||||
"@angular-devkit/core": "16.2.15",
|
"@angular-devkit/core": "16.2.16",
|
||||||
"@babel/core": "7.22.9",
|
"@babel/core": "7.22.9",
|
||||||
"@babel/generator": "7.22.9",
|
"@babel/generator": "7.22.9",
|
||||||
"@babel/helper-annotate-as-pure": "7.22.5",
|
"@babel/helper-annotate-as-pure": "7.22.5",
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
"@babel/runtime": "7.22.6",
|
"@babel/runtime": "7.22.6",
|
||||||
"@babel/template": "7.22.5",
|
"@babel/template": "7.22.5",
|
||||||
"@discoveryjs/json-ext": "0.5.7",
|
"@discoveryjs/json-ext": "0.5.7",
|
||||||
"@ngtools/webpack": "16.2.15",
|
"@ngtools/webpack": "16.2.16",
|
||||||
"@vitejs/plugin-basic-ssl": "1.0.1",
|
"@vitejs/plugin-basic-ssl": "1.0.1",
|
||||||
"ansi-colors": "4.1.3",
|
"ansi-colors": "4.1.3",
|
||||||
"autoprefixer": "10.4.14",
|
"autoprefixer": "10.4.14",
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
"text-table": "0.2.0",
|
"text-table": "0.2.0",
|
||||||
"tree-kill": "1.2.2",
|
"tree-kill": "1.2.2",
|
||||||
"tslib": "2.6.1",
|
"tslib": "2.6.1",
|
||||||
"vite": "4.5.3",
|
"vite": "4.5.5",
|
||||||
"webpack": "5.94.0",
|
"webpack": "5.94.0",
|
||||||
"webpack-dev-middleware": "6.1.2",
|
"webpack-dev-middleware": "6.1.2",
|
||||||
"webpack-dev-server": "4.15.1",
|
"webpack-dev-server": "4.15.1",
|
||||||
|
@ -209,13 +209,13 @@
|
||||||
"license": "0BSD"
|
"license": "0BSD"
|
||||||
},
|
},
|
||||||
"node_modules/@angular-devkit/build-webpack": {
|
"node_modules/@angular-devkit/build-webpack": {
|
||||||
"version": "0.1602.15",
|
"version": "0.1602.16",
|
||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1602.15.tgz",
|
"resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1602.16.tgz",
|
||||||
"integrity": "sha512-ms1+vCDdV0KX8BplJ7JoKH3wKjWHxxZTOX+mSPIjt4wS1uAk5DnezXHIjpBiJ3HY9XVHFI9C0HT4n7o6kFIOEQ==",
|
"integrity": "sha512-b99Sj0btI0C2GIfzoyP8epDMIOLqSTqXOxw6klGtBLaGZfM5KAxqFzekXh8cAnHxWCj20WdNhezS1eUTLOkaIA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/architect": "0.1602.15",
|
"@angular-devkit/architect": "0.1602.16",
|
||||||
"rxjs": "7.8.1"
|
"rxjs": "7.8.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -229,9 +229,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@angular-devkit/core": {
|
"node_modules/@angular-devkit/core": {
|
||||||
"version": "16.2.15",
|
"version": "16.2.16",
|
||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-16.2.15.tgz",
|
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-16.2.16.tgz",
|
||||||
"integrity": "sha512-68BgPWpcjNKz++uvLFG8IZaOH3ti2BWQVqaE3yTIYaMoNt0y0A0X2MUVd7EGbAGUk2JdloWJv5LTPVZMzCuK4w==",
|
"integrity": "sha512-5xHs9JFmp78sydrOAg0UGErxfMVv5c2f3RXoikS7eBOOXTWEi5pmnOkOvSJ3loQFGVs3Y7i+u02G3VrF5ZxOrA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -257,13 +257,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@angular-devkit/schematics": {
|
"node_modules/@angular-devkit/schematics": {
|
||||||
"version": "16.2.15",
|
"version": "16.2.16",
|
||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-16.2.15.tgz",
|
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-16.2.16.tgz",
|
||||||
"integrity": "sha512-C/j2EwapdBMf1HWDuH89bA9B2e511iEYImkyZ+vCSXRwGiWUaZCrhl18bvztpErTrdOLM3mCwNXWEAMXI4zUXA==",
|
"integrity": "sha512-pF6fdtJh6yLmgA7Gs45JIdxPl2MsTAhYcZIMrX1a6ID64dfwtF0MP8fDE6vrWInV1zXbzzf7l7PeKuqVtTSzKg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/core": "16.2.15",
|
"@angular-devkit/core": "16.2.16",
|
||||||
"jsonc-parser": "3.2.0",
|
"jsonc-parser": "3.2.0",
|
||||||
"magic-string": "0.30.1",
|
"magic-string": "0.30.1",
|
||||||
"ora": "5.4.1",
|
"ora": "5.4.1",
|
||||||
|
@ -308,16 +308,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@angular/cli": {
|
"node_modules/@angular/cli": {
|
||||||
"version": "16.2.15",
|
"version": "16.2.16",
|
||||||
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-16.2.15.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-16.2.16.tgz",
|
||||||
"integrity": "sha512-nNUmt0ZRj2xHH8tGXSJUiusP5rmakAz0f6cc6T4p03OyeShOKdvs9+/F4hzzsM79/ylZofBlFfwYVCBTbOtMqw==",
|
"integrity": "sha512-aqfNYZ45ndrf36i+7AhQ9R8BCm025j7TtYaUmvvjT4LwiUg6f6KtlZPB/ivBlXmd1g9oXqW4advL0AIi8A/Ozg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/architect": "0.1602.15",
|
"@angular-devkit/architect": "0.1602.16",
|
||||||
"@angular-devkit/core": "16.2.15",
|
"@angular-devkit/core": "16.2.16",
|
||||||
"@angular-devkit/schematics": "16.2.15",
|
"@angular-devkit/schematics": "16.2.16",
|
||||||
"@schematics/angular": "16.2.15",
|
"@schematics/angular": "16.2.16",
|
||||||
"@yarnpkg/lockfile": "1.1.0",
|
"@yarnpkg/lockfile": "1.1.0",
|
||||||
"ansi-colors": "4.1.3",
|
"ansi-colors": "4.1.3",
|
||||||
"ini": "4.1.1",
|
"ini": "4.1.1",
|
||||||
|
@ -4051,9 +4051,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ngtools/webpack": {
|
"node_modules/@ngtools/webpack": {
|
||||||
"version": "16.2.15",
|
"version": "16.2.16",
|
||||||
"resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-16.2.15.tgz",
|
"resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-16.2.16.tgz",
|
||||||
"integrity": "sha512-rD4IHt3nS6PdIKvmoqwIadMIGKsemBSz412kD8Deetl0TiCVhD/Tn1M00dxXzMSHSFCQcOKxdZAeD53yRwTOOA==",
|
"integrity": "sha512-4gm2allK0Pjy/Lxb9IGRnhEZNEOJSOTWwy09VOdHouV2ODRK7Tto2LgteaFJUUSLkuvWRsI7pfuA6yrz8KDfHw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -4293,14 +4293,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@schematics/angular": {
|
"node_modules/@schematics/angular": {
|
||||||
"version": "16.2.15",
|
"version": "16.2.16",
|
||||||
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-16.2.15.tgz",
|
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-16.2.16.tgz",
|
||||||
"integrity": "sha512-T7wEGYxidpLAkis+hO5nsVfnWsy6sXf1T9GS8uztC8IYYsnqB9jTVfjVyfhASugZasdmx7+jWv3oCGy6Z5ZehA==",
|
"integrity": "sha512-V4cE4R5MbusKaNW9DWsisiSRUoQzbAaBIeJh42yCkg5H/lUdf18hUB7DG6Pl7yH6/tjzzz4SqIVD7N64uCDC2A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/core": "16.2.15",
|
"@angular-devkit/core": "16.2.16",
|
||||||
"@angular-devkit/schematics": "16.2.15",
|
"@angular-devkit/schematics": "16.2.16",
|
||||||
"jsonc-parser": "3.2.0"
|
"jsonc-parser": "3.2.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -4578,9 +4578,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/estree": {
|
"node_modules/@types/estree": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
|
||||||
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
|
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
@ -4656,9 +4656,9 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/lodash": {
|
"node_modules/@types/lodash": {
|
||||||
"version": "4.17.7",
|
"version": "4.17.9",
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.9.tgz",
|
||||||
"integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==",
|
"integrity": "sha512-w9iWudx1XWOHW5lQRS9iKpK/XuRhnN+0T7HvdCCd802FYkT1AMTnxndJHGrNJwRoRHkslGr4S29tjm1cT7x/7w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
@ -6128,9 +6128,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001660",
|
"version": "1.0.30001663",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001663.tgz",
|
||||||
"integrity": "sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==",
|
"integrity": "sha512-o9C3X27GLKbLeTYZ6HBOLU1tsAcBZsLis28wrVzddShCS16RujjHp9GDHKZqrB3meE0YjhawvMFsGb/igqiPzA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -7288,9 +7288,9 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.23",
|
"version": "1.5.27",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.23.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.27.tgz",
|
||||||
"integrity": "sha512-mBhODedOXg4v5QWwl21DjM5amzjmI1zw9EPrPK/5Wx7C8jt33bpZNrC7OhHUG3pxRtbLpr3W2dXT+Ph1SsfRZA==",
|
"integrity": "sha512-o37j1vZqCoEgBuWWXLHQgTN/KDKe7zwpiY5CPeq2RvUqOyJw9xnrULzZAEVQ5p4h+zjMk7hgtOoPdnLxr7m/jw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
|
@ -7368,9 +7368,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/engine.io": {
|
"node_modules/engine.io": {
|
||||||
"version": "6.5.5",
|
"version": "6.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.1.tgz",
|
||||||
"integrity": "sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA==",
|
"integrity": "sha512-NEpDCw9hrvBW+hVEOK4T7v0jFJ++KgtPl4jKFwsZVfG1XhS0dCrSb3VMb9gPAd7VAdW52VT1EnaNiU2vM8C0og==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -9635,9 +9635,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jose": {
|
"node_modules/jose": {
|
||||||
"version": "5.9.2",
|
"version": "5.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/jose/-/jose-5.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/jose/-/jose-5.9.3.tgz",
|
||||||
"integrity": "sha512-ILI2xx/I57b20sd7rHZvgiiQrmp2mcotwsAH+5ajbpFQbrYVQdNHYlQhoA5cFb78CgtBOxtC05TeA+mcgkuCqQ==",
|
"integrity": "sha512-egLIoYSpcd+QUF+UHgobt5YzI2Pkw/H39ou9suW687MY6PmCwPmkNV/4TNjn1p2tX5xO3j0d0sq5hiYE24bSlg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/panva"
|
"url": "https://github.com/sponsors/panva"
|
||||||
|
@ -13031,9 +13031,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rollup": {
|
"node_modules/rollup": {
|
||||||
"version": "3.29.4",
|
"version": "3.29.5",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz",
|
||||||
"integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
|
"integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -13720,9 +13720,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/socket.io": {
|
"node_modules/socket.io": {
|
||||||
"version": "4.7.5",
|
"version": "4.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz",
|
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.0.tgz",
|
||||||
"integrity": "sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==",
|
"integrity": "sha512-8U6BEgGjQOfGz3HHTYaC/L1GaxDCJ/KM0XTkJly0EhZ5U/du9uNEZy4ZgYzEzIqlx2CMm25CrCqr1ck899eLNA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -13730,7 +13730,7 @@
|
||||||
"base64id": "~2.0.0",
|
"base64id": "~2.0.0",
|
||||||
"cors": "~2.8.5",
|
"cors": "~2.8.5",
|
||||||
"debug": "~4.3.2",
|
"debug": "~4.3.2",
|
||||||
"engine.io": "~6.5.2",
|
"engine.io": "~6.6.0",
|
||||||
"socket.io-adapter": "~2.5.2",
|
"socket.io-adapter": "~2.5.2",
|
||||||
"socket.io-parser": "~4.2.4"
|
"socket.io-parser": "~4.2.4"
|
||||||
},
|
},
|
||||||
|
@ -14373,9 +14373,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/terser-webpack-plugin/node_modules/terser": {
|
"node_modules/terser-webpack-plugin/node_modules/terser": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/terser/-/terser-5.33.0.tgz",
|
||||||
"integrity": "sha512-v3Gtw3IzpBJ0ugkxEX8U0W6+TnPKRRCWGh1jC/iM/e3Ki5+qvO1L1EAZ56bZasc64aXHwRHNIQEzm6//i5cemQ==",
|
"integrity": "sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -14973,9 +14973,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "4.5.3",
|
"version": "4.5.5",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz",
|
||||||
"integrity": "sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==",
|
"integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
<div *ngIf="createLocalTracksOptions.video !== undefined">
|
<div *ngIf="createLocalTracksOptions.video !== undefined">
|
||||||
<a href="https://docs.livekit.io/client-sdk-js/interfaces/VideoCaptureOptions.html" target="_blank">VideoCaptureOptions</a>
|
<a href="https://docs.livekit.io/client-sdk-js/interfaces/VideoCaptureOptions.html" target="_blank">VideoCaptureOptions</a>
|
||||||
<mat-radio-group [(ngModel)]="videoOption">
|
<mat-radio-group [(ngModel)]="videoOption">
|
||||||
<mat-radio-button [value]="true">True (default)</mat-radio-button>
|
<mat-radio-button [value]="true" id="video-capture-true">True (default)</mat-radio-button>
|
||||||
<mat-radio-button *ngIf="allowDisablingVideo" [value]="false">False (no video)</mat-radio-button>
|
<mat-radio-button *ngIf="allowDisablingVideo" [value]="false" id="video-capture-false">False (no video)</mat-radio-button>
|
||||||
<mat-radio-button [value]="'custom'">Custom</mat-radio-button>
|
<mat-radio-button [value]="'custom'" id="video-capture-custom">Custom</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
<div *ngIf="videoOption === 'custom'">
|
<div *ngIf="videoOption === 'custom'">
|
||||||
<mat-form-field class="inner-text-input">
|
<mat-form-field class="inner-text-input">
|
||||||
|
@ -43,9 +43,9 @@
|
||||||
<div *ngIf="createLocalTracksOptions.audio !== undefined" style="margin-top: 16px">
|
<div *ngIf="createLocalTracksOptions.audio !== undefined" style="margin-top: 16px">
|
||||||
<label class="label"><a href="https://docs.livekit.io/client-sdk-js/interfaces/AudioCaptureOptions.html" target="_blank">AudioCaptureOptions</a></label>
|
<label class="label"><a href="https://docs.livekit.io/client-sdk-js/interfaces/AudioCaptureOptions.html" target="_blank">AudioCaptureOptions</a></label>
|
||||||
<mat-radio-group [(ngModel)]="audioOption">
|
<mat-radio-group [(ngModel)]="audioOption">
|
||||||
<mat-radio-button [value]="true">True (default)</mat-radio-button>
|
<mat-radio-button [value]="true" id="audio-capture-true">True (default)</mat-radio-button>
|
||||||
<mat-radio-button *ngIf="allowDisablingAudio" [value]="false">False (no audio)</mat-radio-button>
|
<mat-radio-button *ngIf="allowDisablingAudio" [value]="false" id="audio-capture-false">False (no audio)</mat-radio-button>
|
||||||
<mat-radio-button [value]="'custom'">Custom</mat-radio-button>
|
<mat-radio-button [value]="'custom'" id="audio-capture-custom">Custom</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
<div *ngIf="audioOption === 'custom'">
|
<div *ngIf="audioOption === 'custom'">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
import { TestFeedService } from '../../services/test-feed.service';
|
import {
|
||||||
|
TestAppEvent,
|
||||||
|
TestFeedService,
|
||||||
|
} from '../../services/test-feed.service';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CreateLocalTracksOptions,
|
CreateLocalTracksOptions,
|
||||||
|
@ -15,6 +18,9 @@ import {
|
||||||
RoomOptions,
|
RoomOptions,
|
||||||
LocalTrack,
|
LocalTrack,
|
||||||
TrackPublishOptions,
|
TrackPublishOptions,
|
||||||
|
ParticipantEvent,
|
||||||
|
LocalTrackPublication,
|
||||||
|
RemoteTrack,
|
||||||
} from 'livekit-client';
|
} from 'livekit-client';
|
||||||
import { LivekitParamsService } from 'src/app/services/livekit-params.service';
|
import { LivekitParamsService } from 'src/app/services/livekit-params.service';
|
||||||
import { RoomApiService } from 'src/app/services/room-api.service';
|
import { RoomApiService } from 'src/app/services/room-api.service';
|
||||||
|
@ -60,12 +66,12 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
|
||||||
createLocalTracksOptions: CreateLocalTracksOptions = {
|
createLocalTracksOptions: CreateLocalTracksOptions = {
|
||||||
video: {
|
video: {
|
||||||
resolution: {
|
resolution: {
|
||||||
frameRate: 1,
|
frameRate: 6,
|
||||||
height: 30,
|
height: 144,
|
||||||
width: 40,
|
width: 256,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
audio: false,
|
audio: true,
|
||||||
};
|
};
|
||||||
trackPublishOptions: TrackPublishOptions;
|
trackPublishOptions: TrackPublishOptions;
|
||||||
|
|
||||||
|
@ -156,6 +162,16 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private updateEventList(eventType: RoomEvent) {
|
||||||
|
const event: TestAppEvent = {
|
||||||
|
eventType,
|
||||||
|
eventCategory: 'RoomEvent',
|
||||||
|
eventContent: {},
|
||||||
|
eventDescription: '',
|
||||||
|
};
|
||||||
|
this.testFeedService.pushNewEvent({ user: 0, event });
|
||||||
|
}
|
||||||
|
|
||||||
private async startSession() {
|
private async startSession() {
|
||||||
let promises = [];
|
let promises = [];
|
||||||
let i = -1;
|
let i = -1;
|
||||||
|
@ -174,7 +190,12 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
|
||||||
);
|
);
|
||||||
const room: Room = user.room;
|
const room: Room = user.room;
|
||||||
|
|
||||||
room!.on(RoomEvent.Connected, () => {
|
room.on(RoomEvent.SignalConnected, () => {
|
||||||
|
this.updateEventList(RoomEvent.SignalConnected);
|
||||||
|
});
|
||||||
|
|
||||||
|
room.on(RoomEvent.Connected, () => {
|
||||||
|
this.updateEventList(RoomEvent.Connected);
|
||||||
room.remoteParticipants.forEach(
|
room.remoteParticipants.forEach(
|
||||||
(remoteParticipant: RemoteParticipant) => {
|
(remoteParticipant: RemoteParticipant) => {
|
||||||
if (user.subscriber) {
|
if (user.subscriber) {
|
||||||
|
@ -189,9 +210,18 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
room.on(RoomEvent.ParticipantConnected, () => {
|
||||||
|
this.updateEventList(RoomEvent.ParticipantConnected);
|
||||||
|
});
|
||||||
|
|
||||||
|
room.on(RoomEvent.ParticipantConnected, () => {
|
||||||
|
this.updateEventList(RoomEvent.ParticipantConnected);
|
||||||
|
});
|
||||||
|
|
||||||
room.on(
|
room.on(
|
||||||
RoomEvent.TrackPublished,
|
RoomEvent.TrackPublished,
|
||||||
(publication: RemoteTrackPublication) => {
|
(publication: RemoteTrackPublication) => {
|
||||||
|
this.updateEventList(RoomEvent.TrackPublished);
|
||||||
if (user.subscriber) {
|
if (user.subscriber) {
|
||||||
// Subscribe to new tracks
|
// Subscribe to new tracks
|
||||||
publication.setSubscribed(true);
|
publication.setSubscribed(true);
|
||||||
|
@ -199,6 +229,18 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
room.on(RoomEvent.LocalTrackPublished, () => {
|
||||||
|
this.updateEventList(RoomEvent.LocalTrackPublished);
|
||||||
|
});
|
||||||
|
|
||||||
|
room.on(RoomEvent.TrackSubscribed, () => {
|
||||||
|
this.updateEventList(RoomEvent.TrackSubscribed);
|
||||||
|
});
|
||||||
|
|
||||||
|
room.on(RoomEvent.Disconnected, () => {
|
||||||
|
this.updateEventList(RoomEvent.Disconnected);
|
||||||
|
});
|
||||||
|
|
||||||
await room.connect(
|
await room.connect(
|
||||||
this.livekitParamsService.getParams().livekitUrl,
|
this.livekitParamsService.getParams().livekitUrl,
|
||||||
token,
|
token,
|
||||||
|
|
Loading…
Reference in New Issue