@pipecat-ai/websocket-transport 1.2.0 → 1.3.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.
@@ -1599,6 +1599,7 @@ var $fc49a56cd8739127$export$4a0c46dbbe2ddb67 = /** @class */ function() {
1599
1599
  this._callbacks = {};
1600
1600
  this._micEnabled = true;
1601
1601
  this._camEnabled = false;
1602
+ this._supportsScreenShare = false;
1602
1603
  }
1603
1604
  MediaManager.prototype.setUserAudioCallback = function(userAudioCallback) {
1604
1605
  this._userAudioCallback = userAudioCallback;
@@ -1612,6 +1613,13 @@ var $fc49a56cd8739127$export$4a0c46dbbe2ddb67 = /** @class */ function() {
1612
1613
  this._micEnabled = (_b = options.enableMic) !== null && _b !== void 0 ? _b : true;
1613
1614
  this._camEnabled = (_c = options.enableCam) !== null && _c !== void 0 ? _c : false;
1614
1615
  };
1616
+ Object.defineProperty(MediaManager.prototype, "supportsScreenShare", {
1617
+ get: function() {
1618
+ return this._supportsScreenShare;
1619
+ },
1620
+ enumerable: false,
1621
+ configurable: true
1622
+ });
1615
1623
  return MediaManager;
1616
1624
  }();
1617
1625
  var $fc49a56cd8739127$export$45c5b9bfba2f6304 = /** @class */ function(_super) {
@@ -1912,6 +1920,10 @@ var $fc49a56cd8739127$export$45c5b9bfba2f6304 = /** @class */ function(_super) {
1912
1920
  // TODO: Video not supported yet
1913
1921
  console.warn("WavMediaManager does not support video input.");
1914
1922
  };
1923
+ WavMediaManager.prototype.enableScreenShare = function(enable) {
1924
+ // TODO: Screensharing not supported yet
1925
+ console.warn("WavMediaManager does not support screen sharing.");
1926
+ };
1915
1927
  Object.defineProperty(WavMediaManager.prototype, "isCamEnabled", {
1916
1928
  get: function() {
1917
1929
  // TODO: Video not supported yet
@@ -1927,6 +1939,14 @@ var $fc49a56cd8739127$export$45c5b9bfba2f6304 = /** @class */ function(_super) {
1927
1939
  enumerable: false,
1928
1940
  configurable: true
1929
1941
  });
1942
+ Object.defineProperty(WavMediaManager.prototype, "isSharingScreen", {
1943
+ get: function() {
1944
+ // TODO: Screensharing not supported yet
1945
+ return false;
1946
+ },
1947
+ enumerable: false,
1948
+ configurable: true
1949
+ });
1930
1950
  WavMediaManager.prototype.tracks = function() {
1931
1951
  var _a;
1932
1952
  var tracks = (_a = this._wavRecorder.stream) === null || _a === void 0 ? void 0 : _a.getTracks()[0];
@@ -2163,6 +2183,7 @@ var $22ece045290c996a$export$c95c65abc5f47125 = /** @class */ function(_super) {
2163
2183
  _this.onTrackStartedCallback = onTrackStartedCallback;
2164
2184
  _this.onTrackStoppedCallback = onTrackStoppedCallback;
2165
2185
  _this._recorderChunkSize = recorderChunkSize;
2186
+ _this._supportsScreenShare = true;
2166
2187
  _this._daily = (_a = (0, $kR6tG$dailycodailyjs).getCallInstance()) !== null && _a !== void 0 ? _a : (0, $kR6tG$dailycodailyjs).createCallObject();
2167
2188
  if (enableRecording) _this._mediaStreamRecorder = new (0, $5fc11d7bc0d20724$export$2934cf2d25c67a48)({
2168
2189
  sampleRate: recorderSampleRate
@@ -2529,6 +2550,10 @@ var $22ece045290c996a$export$c95c65abc5f47125 = /** @class */ function(_super) {
2529
2550
  this._camEnabled = enable;
2530
2551
  this._daily.setLocalVideo(enable);
2531
2552
  };
2553
+ DailyMediaManager.prototype.enableScreenShare = function(enable) {
2554
+ if (enable) this._daily.startScreenShare();
2555
+ else this._daily.stopScreenShare();
2556
+ };
2532
2557
  Object.defineProperty(DailyMediaManager.prototype, "isCamEnabled", {
2533
2558
  get: function() {
2534
2559
  return this._daily.localVideo();
@@ -2543,13 +2568,22 @@ var $22ece045290c996a$export$c95c65abc5f47125 = /** @class */ function(_super) {
2543
2568
  enumerable: false,
2544
2569
  configurable: true
2545
2570
  });
2571
+ Object.defineProperty(DailyMediaManager.prototype, "isSharingScreen", {
2572
+ get: function() {
2573
+ return this._daily.localScreenAudio() || this._daily.localScreenVideo();
2574
+ },
2575
+ enumerable: false,
2576
+ configurable: true
2577
+ });
2546
2578
  DailyMediaManager.prototype.tracks = function() {
2547
- var _a, _b, _c, _d, _e, _f;
2579
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
2548
2580
  var participants = this._daily.participants();
2549
2581
  return {
2550
2582
  local: {
2551
2583
  audio: (_c = (_b = (_a = participants === null || participants === void 0 ? void 0 : participants.local) === null || _a === void 0 ? void 0 : _a.tracks) === null || _b === void 0 ? void 0 : _b.audio) === null || _c === void 0 ? void 0 : _c.persistentTrack,
2552
- video: (_f = (_e = (_d = participants === null || participants === void 0 ? void 0 : participants.local) === null || _d === void 0 ? void 0 : _d.tracks) === null || _e === void 0 ? void 0 : _e.video) === null || _f === void 0 ? void 0 : _f.persistentTrack
2584
+ screenAudio: (_f = (_e = (_d = participants === null || participants === void 0 ? void 0 : participants.local) === null || _d === void 0 ? void 0 : _d.tracks) === null || _e === void 0 ? void 0 : _e.screenAudio) === null || _f === void 0 ? void 0 : _f.persistentTrack,
2585
+ screenVideo: (_j = (_h = (_g = participants === null || participants === void 0 ? void 0 : participants.local) === null || _g === void 0 ? void 0 : _g.tracks) === null || _h === void 0 ? void 0 : _h.screenVideo) === null || _j === void 0 ? void 0 : _j.persistentTrack,
2586
+ video: (_m = (_l = (_k = participants === null || participants === void 0 ? void 0 : participants.local) === null || _k === void 0 ? void 0 : _k.tracks) === null || _l === void 0 ? void 0 : _l.video) === null || _m === void 0 ? void 0 : _m.persistentTrack
2553
2587
  }
2554
2588
  };
2555
2589
  };