@signalwire/js 4.0.0-dev-20260911182554 → 4.0.0-dev-20260911195739
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/browser.mjs +13 -6
- package/dist/browser.mjs.map +1 -1
- package/dist/browser.umd.js +13 -6
- package/dist/browser.umd.js.map +1 -1
- package/dist/index.cjs +13 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +22 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +13 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/browser.mjs
CHANGED
|
@@ -14248,6 +14248,8 @@ var SelfParticipant = class extends Participant {
|
|
|
14248
14248
|
*
|
|
14249
14249
|
* The call is unaffected when acquisition fails.
|
|
14250
14250
|
*
|
|
14251
|
+
* @param options - Pass `{ audio: true }` to also request the shared
|
|
14252
|
+
* surface's audio. Defaults to video only.
|
|
14251
14253
|
* @throws {ScreenShareAlreadyActiveError} When this call is already
|
|
14252
14254
|
* sharing a screen. Call {@link stopScreenShare} before starting another.
|
|
14253
14255
|
* @throws {AuxiliaryLegCancelledError} When {@link stopScreenShare} removes
|
|
@@ -14256,9 +14258,9 @@ var SelfParticipant = class extends Participant {
|
|
|
14256
14258
|
* permission denial rejects with a `NotAllowedError` `DOMException` —
|
|
14257
14259
|
* inspect `error.name` to tell benign cancels apart from real failures.
|
|
14258
14260
|
*/
|
|
14259
|
-
async startScreenShare() {
|
|
14261
|
+
async startScreenShare(options) {
|
|
14260
14262
|
try {
|
|
14261
|
-
await this.vertoManager.addScreenMedia();
|
|
14263
|
+
await this.vertoManager.addScreenMedia(options);
|
|
14262
14264
|
} catch (error) {
|
|
14263
14265
|
if (error instanceof AuxiliaryLegCancelledError) logger$25.debug("[Participant.startScreenShare] Screen share cancelled before connecting.");
|
|
14264
14266
|
else logger$25.error("[Participant.startScreenShare] Screen share error:", error);
|
|
@@ -15608,10 +15610,11 @@ var LocalStreamController = class extends Destroyable {
|
|
|
15608
15610
|
stream = new MediaStream(tracks);
|
|
15609
15611
|
this.tagTracks(tracks, "application");
|
|
15610
15612
|
} else if (this.options.propose === "screenshare") {
|
|
15611
|
-
|
|
15613
|
+
const audio = this.options.screenShareAudio ?? false;
|
|
15614
|
+
logger$19.debug("[LocalStreamController] Requesting display media for screen sharing with audio:", audio);
|
|
15612
15615
|
stream = await this.options.getDisplayMedia({
|
|
15613
15616
|
video: true,
|
|
15614
|
-
audio
|
|
15617
|
+
audio
|
|
15615
15618
|
});
|
|
15616
15619
|
logger$19.debug("[LocalStreamController] Screen share media obtained:", stream);
|
|
15617
15620
|
this.tagTracks(stream.getTracks(), "display");
|
|
@@ -16123,6 +16126,7 @@ var RTCPeerConnectionController = class extends Destroyable {
|
|
|
16123
16126
|
inputVideoStream: this.options.inputVideoStream,
|
|
16124
16127
|
inputAudioDeviceConstraints: this.inputAudioDeviceConstraints,
|
|
16125
16128
|
inputVideoDeviceConstraints: this.inputVideoDeviceConstraints,
|
|
16129
|
+
screenShareAudio: this.options.screenShareAudio,
|
|
16126
16130
|
getUserMedia: async (constraints) => this.getUserMedia(constraints),
|
|
16127
16131
|
getDisplayMedia: async (options$1) => this.getDisplayMedia(options$1)
|
|
16128
16132
|
});
|
|
@@ -17855,8 +17859,11 @@ var WebRTCVertoManager = class extends VertoManager {
|
|
|
17855
17859
|
throw error;
|
|
17856
17860
|
}
|
|
17857
17861
|
}
|
|
17858
|
-
async addScreenMedia(options = {
|
|
17859
|
-
await this.initAdditionalPeerConnection("screenshare",
|
|
17862
|
+
async addScreenMedia(options = {}) {
|
|
17863
|
+
await this.initAdditionalPeerConnection("screenshare", {
|
|
17864
|
+
audio: false,
|
|
17865
|
+
screenShareAudio: options.audio ?? false
|
|
17866
|
+
});
|
|
17860
17867
|
}
|
|
17861
17868
|
async initAdditionalPeerConnection(propose, options) {
|
|
17862
17869
|
const isScreenShare = propose === "screenshare";
|