@whereby.com/media 1.3.9 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2469,6 +2469,11 @@ function rtcStatsConnection(wsURL, logger = console) {
2469
2469
  let connectionAttempt = 0;
2470
2470
  let hasPassedOnRoomSessionId = false;
2471
2471
  let getStatsBufferUsed = 0;
2472
+ let deviceId;
2473
+ let roomProduct;
2474
+ let roomMode;
2475
+ let sfuServer;
2476
+ let featureFlags;
2472
2477
  const connection = {
2473
2478
  connected: false,
2474
2479
  trace: (...args) => {
@@ -2500,6 +2505,21 @@ function rtcStatsConnection(wsURL, logger = console) {
2500
2505
  else if (args[0] === "customEvent" && args[2].type === "userRole") {
2501
2506
  userRole = args;
2502
2507
  }
2508
+ else if (args[0] === "customEvent" && args[2].type === "deviceId") {
2509
+ deviceId = args;
2510
+ }
2511
+ else if (args[0] === "customEvent" && args[2].type === "roomProduct") {
2512
+ roomProduct = args;
2513
+ }
2514
+ else if (args[0] === "customEvent" && args[2].type === "roomMode") {
2515
+ roomMode = args;
2516
+ }
2517
+ else if (args[0] === "customEvent" && args[2].type === "sfuServer") {
2518
+ sfuServer = args;
2519
+ }
2520
+ else if (args[0] === "customEvent" && args[2].type === "featureFlags") {
2521
+ featureFlags = args;
2522
+ }
2503
2523
  if (ws.readyState === WebSocket.OPEN) {
2504
2524
  connectionAttempt = 0;
2505
2525
  ws.send(JSON.stringify(args));
@@ -2563,6 +2583,21 @@ function rtcStatsConnection(wsURL, logger = console) {
2563
2583
  if (userRole) {
2564
2584
  ws.send(JSON.stringify(userRole));
2565
2585
  }
2586
+ if (deviceId) {
2587
+ ws.send(JSON.stringify(deviceId));
2588
+ }
2589
+ if (roomMode) {
2590
+ ws.send(JSON.stringify(roomMode));
2591
+ }
2592
+ if (roomProduct) {
2593
+ ws.send(JSON.stringify(roomProduct));
2594
+ }
2595
+ if (sfuServer) {
2596
+ ws.send(JSON.stringify(sfuServer));
2597
+ }
2598
+ if (featureFlags) {
2599
+ ws.send(JSON.stringify(featureFlags));
2600
+ }
2566
2601
  while (buffer.length) {
2567
2602
  ws.send(JSON.stringify(buffer.shift()));
2568
2603
  }
package/dist/index.mjs CHANGED
@@ -2448,6 +2448,11 @@ function rtcStatsConnection(wsURL, logger = console) {
2448
2448
  let connectionAttempt = 0;
2449
2449
  let hasPassedOnRoomSessionId = false;
2450
2450
  let getStatsBufferUsed = 0;
2451
+ let deviceId;
2452
+ let roomProduct;
2453
+ let roomMode;
2454
+ let sfuServer;
2455
+ let featureFlags;
2451
2456
  const connection = {
2452
2457
  connected: false,
2453
2458
  trace: (...args) => {
@@ -2479,6 +2484,21 @@ function rtcStatsConnection(wsURL, logger = console) {
2479
2484
  else if (args[0] === "customEvent" && args[2].type === "userRole") {
2480
2485
  userRole = args;
2481
2486
  }
2487
+ else if (args[0] === "customEvent" && args[2].type === "deviceId") {
2488
+ deviceId = args;
2489
+ }
2490
+ else if (args[0] === "customEvent" && args[2].type === "roomProduct") {
2491
+ roomProduct = args;
2492
+ }
2493
+ else if (args[0] === "customEvent" && args[2].type === "roomMode") {
2494
+ roomMode = args;
2495
+ }
2496
+ else if (args[0] === "customEvent" && args[2].type === "sfuServer") {
2497
+ sfuServer = args;
2498
+ }
2499
+ else if (args[0] === "customEvent" && args[2].type === "featureFlags") {
2500
+ featureFlags = args;
2501
+ }
2482
2502
  if (ws.readyState === WebSocket.OPEN) {
2483
2503
  connectionAttempt = 0;
2484
2504
  ws.send(JSON.stringify(args));
@@ -2542,6 +2562,21 @@ function rtcStatsConnection(wsURL, logger = console) {
2542
2562
  if (userRole) {
2543
2563
  ws.send(JSON.stringify(userRole));
2544
2564
  }
2565
+ if (deviceId) {
2566
+ ws.send(JSON.stringify(deviceId));
2567
+ }
2568
+ if (roomMode) {
2569
+ ws.send(JSON.stringify(roomMode));
2570
+ }
2571
+ if (roomProduct) {
2572
+ ws.send(JSON.stringify(roomProduct));
2573
+ }
2574
+ if (sfuServer) {
2575
+ ws.send(JSON.stringify(sfuServer));
2576
+ }
2577
+ if (featureFlags) {
2578
+ ws.send(JSON.stringify(featureFlags));
2579
+ }
2545
2580
  while (buffer.length) {
2546
2581
  ws.send(JSON.stringify(buffer.shift()));
2547
2582
  }
@@ -2448,6 +2448,11 @@ function rtcStatsConnection(wsURL, logger = console) {
2448
2448
  let connectionAttempt = 0;
2449
2449
  let hasPassedOnRoomSessionId = false;
2450
2450
  let getStatsBufferUsed = 0;
2451
+ let deviceId;
2452
+ let roomProduct;
2453
+ let roomMode;
2454
+ let sfuServer;
2455
+ let featureFlags;
2451
2456
  const connection = {
2452
2457
  connected: false,
2453
2458
  trace: (...args) => {
@@ -2479,6 +2484,21 @@ function rtcStatsConnection(wsURL, logger = console) {
2479
2484
  else if (args[0] === "customEvent" && args[2].type === "userRole") {
2480
2485
  userRole = args;
2481
2486
  }
2487
+ else if (args[0] === "customEvent" && args[2].type === "deviceId") {
2488
+ deviceId = args;
2489
+ }
2490
+ else if (args[0] === "customEvent" && args[2].type === "roomProduct") {
2491
+ roomProduct = args;
2492
+ }
2493
+ else if (args[0] === "customEvent" && args[2].type === "roomMode") {
2494
+ roomMode = args;
2495
+ }
2496
+ else if (args[0] === "customEvent" && args[2].type === "sfuServer") {
2497
+ sfuServer = args;
2498
+ }
2499
+ else if (args[0] === "customEvent" && args[2].type === "featureFlags") {
2500
+ featureFlags = args;
2501
+ }
2482
2502
  if (ws.readyState === WebSocket.OPEN) {
2483
2503
  connectionAttempt = 0;
2484
2504
  ws.send(JSON.stringify(args));
@@ -2542,6 +2562,21 @@ function rtcStatsConnection(wsURL, logger = console) {
2542
2562
  if (userRole) {
2543
2563
  ws.send(JSON.stringify(userRole));
2544
2564
  }
2565
+ if (deviceId) {
2566
+ ws.send(JSON.stringify(deviceId));
2567
+ }
2568
+ if (roomMode) {
2569
+ ws.send(JSON.stringify(roomMode));
2570
+ }
2571
+ if (roomProduct) {
2572
+ ws.send(JSON.stringify(roomProduct));
2573
+ }
2574
+ if (sfuServer) {
2575
+ ws.send(JSON.stringify(sfuServer));
2576
+ }
2577
+ if (featureFlags) {
2578
+ ws.send(JSON.stringify(featureFlags));
2579
+ }
2545
2580
  while (buffer.length) {
2546
2581
  ws.send(JSON.stringify(buffer.shift()));
2547
2582
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whereby.com/media",
3
3
  "description": "Media library for Whereby",
4
- "version": "1.3.9",
4
+ "version": "1.4.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/whereby/sdk",
7
7
  "repository": {