@defcomm/meetingsdk 0.1.3 → 0.1.5
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.js +20 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1974,11 +1974,19 @@ var VideoSDKCore = class {
|
|
|
1974
1974
|
this.handleRemoteTrack(track, stream, metadata);
|
|
1975
1975
|
},
|
|
1976
1976
|
// SCREEN SHARE
|
|
1977
|
-
onScreenShareStarted: (participantId,
|
|
1977
|
+
onScreenShareStarted: (participantId, _track) => {
|
|
1978
|
+
console.log("[SFU] Screen share started", participantId);
|
|
1979
|
+
this.state.setPresenterId(participantId);
|
|
1978
1980
|
if (participantId === this.myId) {
|
|
1981
|
+
this.state.updateLocalParticipant({
|
|
1982
|
+
media: {
|
|
1983
|
+
isScreenSharing: true,
|
|
1984
|
+
screenStream: this.screenStream,
|
|
1985
|
+
screenTrack: this.screenStream?.getVideoTracks()[0]
|
|
1986
|
+
}
|
|
1987
|
+
});
|
|
1979
1988
|
return;
|
|
1980
1989
|
}
|
|
1981
|
-
console.log("[SFU] Screen share started", participantId, track);
|
|
1982
1990
|
const current = this.state.getParticipant(participantId);
|
|
1983
1991
|
if (current) {
|
|
1984
1992
|
this.state.updateParticipantMedia(participantId, {
|
|
@@ -1988,7 +1996,17 @@ var VideoSDKCore = class {
|
|
|
1988
1996
|
}
|
|
1989
1997
|
},
|
|
1990
1998
|
onScreenShareStopped: (participantId) => {
|
|
1999
|
+
if (this.state.presenterId === participantId) {
|
|
2000
|
+
this.state.setPresenterId(null);
|
|
2001
|
+
}
|
|
1991
2002
|
if (participantId === this.myId) {
|
|
2003
|
+
this.state.updateLocalParticipant({
|
|
2004
|
+
media: {
|
|
2005
|
+
isScreenSharing: false,
|
|
2006
|
+
screenStream: null,
|
|
2007
|
+
screenTrack: void 0
|
|
2008
|
+
}
|
|
2009
|
+
});
|
|
1992
2010
|
return;
|
|
1993
2011
|
}
|
|
1994
2012
|
const screen = this.remoteScreenStreams.get(participantId);
|