@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.js
CHANGED
|
@@ -2010,11 +2010,19 @@ var VideoSDKCore = class {
|
|
|
2010
2010
|
this.handleRemoteTrack(track, stream, metadata);
|
|
2011
2011
|
},
|
|
2012
2012
|
// SCREEN SHARE
|
|
2013
|
-
onScreenShareStarted: (participantId,
|
|
2013
|
+
onScreenShareStarted: (participantId, _track) => {
|
|
2014
|
+
console.log("[SFU] Screen share started", participantId);
|
|
2015
|
+
this.state.setPresenterId(participantId);
|
|
2014
2016
|
if (participantId === this.myId) {
|
|
2017
|
+
this.state.updateLocalParticipant({
|
|
2018
|
+
media: {
|
|
2019
|
+
isScreenSharing: true,
|
|
2020
|
+
screenStream: this.screenStream,
|
|
2021
|
+
screenTrack: this.screenStream?.getVideoTracks()[0]
|
|
2022
|
+
}
|
|
2023
|
+
});
|
|
2015
2024
|
return;
|
|
2016
2025
|
}
|
|
2017
|
-
console.log("[SFU] Screen share started", participantId, track);
|
|
2018
2026
|
const current = this.state.getParticipant(participantId);
|
|
2019
2027
|
if (current) {
|
|
2020
2028
|
this.state.updateParticipantMedia(participantId, {
|
|
@@ -2024,7 +2032,17 @@ var VideoSDKCore = class {
|
|
|
2024
2032
|
}
|
|
2025
2033
|
},
|
|
2026
2034
|
onScreenShareStopped: (participantId) => {
|
|
2035
|
+
if (this.state.presenterId === participantId) {
|
|
2036
|
+
this.state.setPresenterId(null);
|
|
2037
|
+
}
|
|
2027
2038
|
if (participantId === this.myId) {
|
|
2039
|
+
this.state.updateLocalParticipant({
|
|
2040
|
+
media: {
|
|
2041
|
+
isScreenSharing: false,
|
|
2042
|
+
screenStream: null,
|
|
2043
|
+
screenTrack: void 0
|
|
2044
|
+
}
|
|
2045
|
+
});
|
|
2028
2046
|
return;
|
|
2029
2047
|
}
|
|
2030
2048
|
const screen = this.remoteScreenStreams.get(participantId);
|