@huddle01/web-core
Advanced tools
Comparing version 1.0.0-alpha.3 to 1.0.0-alpha.4
@@ -132,5 +132,3 @@ import { AppData, Device, Producer } from "mediasoup-client/lib/types"; | ||
admin: boolean; | ||
canConsume: boolean; /** | ||
* Turn Server used for this client | ||
*/ | ||
canConsume: boolean; | ||
canProduce: boolean; | ||
@@ -137,0 +135,0 @@ canProduceSources: ("cam" | "mic" | "screen")[]; |
@@ -1168,3 +1168,3 @@ import { Device, detectDevice, } from "mediasoup-client/lib/types"; | ||
const { peerId } = data; | ||
const remotePeer = new RemotePeer({ peerId }); | ||
const remotePeer = new RemotePeer({ peerId, metadata: data.metadata }); | ||
this.__remotePeers.set(peerId, remotePeer); | ||
@@ -1372,3 +1372,6 @@ const lobbyPeers = this.room.lobbyPeerSet; | ||
continue; | ||
const remotePeer = new RemotePeer({ peerId: peer.peerId }); | ||
const remotePeer = new RemotePeer({ | ||
peerId: peer.peerId, | ||
metadata: peer.metadata, | ||
}); | ||
const producers = peer.producers; | ||
@@ -1375,0 +1378,0 @@ this.__remotePeers.set(peer.peerId, remotePeer); |
@@ -85,2 +85,3 @@ import Consumer from "./Consumer"; | ||
peerId: string; | ||
metadata?: string; | ||
}); | ||
@@ -87,0 +88,0 @@ /** |
@@ -14,3 +14,3 @@ import LocalPeer from "./LocalPeer"; | ||
*/ | ||
__metadata = null; | ||
__metadata = "{}"; | ||
/** | ||
@@ -65,2 +65,3 @@ * Labels are the unique identifier for the media stream that the remote peer is producing | ||
getMetadata() { | ||
logger.info({ xxx: this.__metadata }); | ||
const data = JSON.parse(this.__metadata || "{}"); | ||
@@ -93,2 +94,5 @@ return data; | ||
this.peerId = data.peerId; | ||
if (data.metadata) { | ||
this.metadata = JSON.parse(data.metadata); | ||
} | ||
} | ||
@@ -95,0 +99,0 @@ /** |
{ | ||
"name": "@huddle01/web-core", | ||
"version": "1.0.0-alpha.3", | ||
"version": "1.0.0-alpha.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221297
5408