@pipecat-ai/daily-transport 1.6.0 → 1.6.2
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.d.ts.map +1 -1
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +19 -5
- package/dist/index.module.js.map +1 -1
- package/package.json +11 -4
package/dist/index.module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import $7zbD8$dailycodailyjs from "@daily-co/daily-js";
|
|
2
|
-
import {logger as $7zbD8$logger, DeviceError as $7zbD8$DeviceError, RTVIError as $7zbD8$RTVIError, TransportStartError as $7zbD8$TransportStartError, RTVIMessage as $7zbD8$RTVIMessage, Transport as $7zbD8$Transport} from "@pipecat-ai/client-js";
|
|
2
|
+
import {logger as $7zbD8$logger, DeviceError as $7zbD8$DeviceError, RTVIError as $7zbD8$RTVIError, TransportStartError as $7zbD8$TransportStartError, RTVIMessage as $7zbD8$RTVIMessage, MessageTooLargeError as $7zbD8$MessageTooLargeError, Transport as $7zbD8$Transport} from "@pipecat-ai/client-js";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
function $parcel$interopDefault(a) {
|
|
@@ -1506,7 +1506,7 @@ globalThis.WavRecorder = WavRecorder;
|
|
|
1506
1506
|
|
|
1507
1507
|
|
|
1508
1508
|
var $58d19ff082af5e5c$exports = {};
|
|
1509
|
-
$58d19ff082af5e5c$exports = JSON.parse("{\"name\":\"@pipecat-ai/daily-transport\",\"version\":\"1.6.
|
|
1509
|
+
$58d19ff082af5e5c$exports = JSON.parse("{\"name\":\"@pipecat-ai/daily-transport\",\"version\":\"1.6.2\",\"license\":\"BSD-2-Clause\",\"main\":\"dist/index.js\",\"module\":\"dist/index.module.js\",\"types\":\"dist/index.d.ts\",\"source\":\"src/index.ts\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/pipecat-ai/pipecat-client-web-transports.git\"},\"exports\":{\".\":{\"types\":\"./dist/index.d.ts\",\"import\":\"./dist/index.module.js\",\"require\":\"./dist/index.js\"}},\"files\":[\"dist\",\"package.json\",\"README.md\"],\"scripts\":{\"build\":\"parcel build --no-cache\",\"dev\":\"parcel watch\",\"lint\":\"eslint . --ext ts --report-unused-disable-directives --max-warnings 0\"},\"devDependencies\":{\"@pipecat-ai/client-js\":\"^1.7.0\",\"eslint\":\"9.39.1\",\"eslint-config-prettier\":\"^9.1.0\",\"eslint-plugin-simple-import-sort\":\"^12.1.1\"},\"peerDependencies\":{\"@pipecat-ai/client-js\":\"~1.7.0\"},\"dependencies\":{\"@daily-co/daily-js\":\"^0.89.1\"},\"description\":\"Pipecat Daily Transport Package\",\"author\":\"Daily.co\",\"bugs\":{\"url\":\"https://github.com/pipecat-ai/pipecat-client-web-transports/issues\"},\"homepage\":\"https://github.com/pipecat-ai/pipecat-client-web-transports/blob/main/transports/daily-webrtc/README.md\"}");
|
|
1510
1510
|
|
|
1511
1511
|
|
|
1512
1512
|
var $683f111f61e07358$export$ef180de88fd317cc;
|
|
@@ -1694,13 +1694,20 @@ class $683f111f61e07358$export$b1ca982aa1e488c1 extends (0, $7zbD8$Transport) {
|
|
|
1694
1694
|
return this._selectedSpeaker;
|
|
1695
1695
|
}
|
|
1696
1696
|
enableMic(enable) {
|
|
1697
|
-
|
|
1697
|
+
// Persist the caller's preference so a subsequent connect() picks it
|
|
1698
|
+
// up via initDevices()'s startCamera({ startAudioOff }) call. Without
|
|
1699
|
+
// this, pre-session toggles were silently lost. Apply live only when
|
|
1700
|
+
// joined — pre-session, daily-js can't act on the request because the
|
|
1701
|
+
// call object isn't part of a meeting yet.
|
|
1702
|
+
this._dailyFactoryOptions.startAudioOff = !enable;
|
|
1703
|
+
if (this._daily.participants()?.local) this._daily.setLocalAudio(enable);
|
|
1698
1704
|
}
|
|
1699
1705
|
get isMicEnabled() {
|
|
1700
1706
|
return this._daily.localAudio();
|
|
1701
1707
|
}
|
|
1702
1708
|
enableCam(enable) {
|
|
1703
|
-
this.
|
|
1709
|
+
this._dailyFactoryOptions.startVideoOff = !enable;
|
|
1710
|
+
if (this._daily.participants()?.local) this._daily.setLocalVideo(enable);
|
|
1704
1711
|
}
|
|
1705
1712
|
get isCamEnabled() {
|
|
1706
1713
|
return this._daily.localVideo();
|
|
@@ -1802,6 +1809,8 @@ class $683f111f61e07358$export$b1ca982aa1e488c1 extends (0, $7zbD8$Transport) {
|
|
|
1802
1809
|
throw new (0, $7zbD8$TransportStartError)();
|
|
1803
1810
|
}
|
|
1804
1811
|
if (this._abortController?.signal.aborted) return;
|
|
1812
|
+
const r = await this._daily.room();
|
|
1813
|
+
this._maxMessageSize = r?.domainConfig?.max_app_message_size || 10485760;
|
|
1805
1814
|
this.state = "connected";
|
|
1806
1815
|
this._callbacks.onConnected?.();
|
|
1807
1816
|
}
|
|
@@ -1880,7 +1889,12 @@ class $683f111f61e07358$export$b1ca982aa1e488c1 extends (0, $7zbD8$Transport) {
|
|
|
1880
1889
|
await this._daily.leave();
|
|
1881
1890
|
}
|
|
1882
1891
|
sendMessage(message) {
|
|
1883
|
-
|
|
1892
|
+
try {
|
|
1893
|
+
this._daily.sendAppMessage(message, "*");
|
|
1894
|
+
} catch (error) {
|
|
1895
|
+
if (error instanceof Error && error.message.includes("Message data too large")) throw new (0, $7zbD8$MessageTooLargeError)(error.message);
|
|
1896
|
+
throw error;
|
|
1897
|
+
}
|
|
1884
1898
|
}
|
|
1885
1899
|
handleAppMessage(ev) {
|
|
1886
1900
|
// Bubble any messages with rtvi-ai label
|