realtime-avatar 0.24.0 → 0.24.1
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/{chunk-FUJI3KIH.js → chunk-4PWWEERK.js} +1 -1
- package/dist/{chunk-ZXPLFSG7.js → chunk-EODL5S3A.js} +1 -1
- package/dist/express.js +2 -2
- package/dist/hono.js +2 -2
- package/dist/index.js +1 -1
- package/dist/nextjs.js +2 -2
- package/dist/react-native.js +28 -25
- package/dist/react.js +28 -25
- package/dist/server.js +1 -1
- package/dist/tanstack-start.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RealtimeAvatar, isQueued, RealtimeAvatarHttpError } from './chunk-
|
|
1
|
+
import { RealtimeAvatar, isQueued, RealtimeAvatarHttpError } from './chunk-EODL5S3A.js';
|
|
2
2
|
|
|
3
3
|
// ../proxy/src/config.ts
|
|
4
4
|
var json = (body, status = 200) => new Response(JSON.stringify(body), {
|
package/dist/express.js
CHANGED
package/dist/hono.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript } from './chunk-
|
|
1
|
+
export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript } from './chunk-EODL5S3A.js';
|
|
2
2
|
import './chunk-MCIXU6XP.js';
|
package/dist/nextjs.js
CHANGED
package/dist/react-native.js
CHANGED
|
@@ -706,32 +706,35 @@ function useLiveKitAvatarGrant(input) {
|
|
|
706
706
|
warmLiveKitHost(serverUrlHintRef.current ?? readLiveKitUrlHint());
|
|
707
707
|
setState({ status: "requesting", grant: null, busy: null, error: null });
|
|
708
708
|
}
|
|
709
|
-
|
|
710
|
-
if (cancelled) {
|
|
711
|
-
if (result.status !== "busy") {
|
|
712
|
-
void client.releaseLiveKitSession(result.grant.session_id, "superseded");
|
|
713
|
-
}
|
|
714
|
-
return;
|
|
715
|
-
}
|
|
716
|
-
if (result.status === "busy") {
|
|
717
|
-
queueTicketRef.current = result.busy.queue_ticket_id ?? queueTicketRef.current;
|
|
718
|
-
setState({ status: "busy", grant: null, busy: result.busy, error: null });
|
|
719
|
-
return;
|
|
720
|
-
}
|
|
721
|
-
queueTicketRef.current = null;
|
|
722
|
-
if (heldSessionRef.current && heldSessionRef.current !== result.grant.session_id) {
|
|
723
|
-
releaseHeld("superseded", false);
|
|
724
|
-
}
|
|
725
|
-
heldSessionRef.current = result.grant.session_id;
|
|
726
|
-
writeLiveKitUrlHint(result.grant.livekit_url);
|
|
727
|
-
setState({ status: "ready", grant: result.grant, busy: null, error: null });
|
|
728
|
-
}).catch((error) => {
|
|
709
|
+
queueMicrotask(() => {
|
|
729
710
|
if (cancelled) return;
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
711
|
+
void client.createLiveKitSessionOrBusy(request, requestOptions).then((result) => {
|
|
712
|
+
if (cancelled) {
|
|
713
|
+
if (result.status !== "busy") {
|
|
714
|
+
void client.releaseLiveKitSession(result.grant.session_id, "superseded");
|
|
715
|
+
}
|
|
716
|
+
return;
|
|
717
|
+
}
|
|
718
|
+
if (result.status === "busy") {
|
|
719
|
+
queueTicketRef.current = result.busy.queue_ticket_id ?? queueTicketRef.current;
|
|
720
|
+
setState({ status: "busy", grant: null, busy: result.busy, error: null });
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
queueTicketRef.current = null;
|
|
724
|
+
if (heldSessionRef.current && heldSessionRef.current !== result.grant.session_id) {
|
|
725
|
+
releaseHeld("superseded", false);
|
|
726
|
+
}
|
|
727
|
+
heldSessionRef.current = result.grant.session_id;
|
|
728
|
+
writeLiveKitUrlHint(result.grant.livekit_url);
|
|
729
|
+
setState({ status: "ready", grant: result.grant, busy: null, error: null });
|
|
730
|
+
}).catch((error) => {
|
|
731
|
+
if (cancelled) return;
|
|
732
|
+
setState({
|
|
733
|
+
status: "failed",
|
|
734
|
+
grant: null,
|
|
735
|
+
busy: null,
|
|
736
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
737
|
+
});
|
|
735
738
|
});
|
|
736
739
|
});
|
|
737
740
|
return () => {
|
package/dist/react.js
CHANGED
|
@@ -860,32 +860,35 @@ function useLiveKitAvatarGrant(input) {
|
|
|
860
860
|
warmLiveKitHost(serverUrlHintRef.current ?? readLiveKitUrlHint());
|
|
861
861
|
setState({ status: "requesting", grant: null, busy: null, error: null });
|
|
862
862
|
}
|
|
863
|
-
|
|
864
|
-
if (cancelled) {
|
|
865
|
-
if (result.status !== "busy") {
|
|
866
|
-
void client.releaseLiveKitSession(result.grant.session_id, "superseded");
|
|
867
|
-
}
|
|
868
|
-
return;
|
|
869
|
-
}
|
|
870
|
-
if (result.status === "busy") {
|
|
871
|
-
queueTicketRef.current = result.busy.queue_ticket_id ?? queueTicketRef.current;
|
|
872
|
-
setState({ status: "busy", grant: null, busy: result.busy, error: null });
|
|
873
|
-
return;
|
|
874
|
-
}
|
|
875
|
-
queueTicketRef.current = null;
|
|
876
|
-
if (heldSessionRef.current && heldSessionRef.current !== result.grant.session_id) {
|
|
877
|
-
releaseHeld("superseded", false);
|
|
878
|
-
}
|
|
879
|
-
heldSessionRef.current = result.grant.session_id;
|
|
880
|
-
writeLiveKitUrlHint(result.grant.livekit_url);
|
|
881
|
-
setState({ status: "ready", grant: result.grant, busy: null, error: null });
|
|
882
|
-
}).catch((error) => {
|
|
863
|
+
queueMicrotask(() => {
|
|
883
864
|
if (cancelled) return;
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
865
|
+
void client.createLiveKitSessionOrBusy(request, requestOptions).then((result) => {
|
|
866
|
+
if (cancelled) {
|
|
867
|
+
if (result.status !== "busy") {
|
|
868
|
+
void client.releaseLiveKitSession(result.grant.session_id, "superseded");
|
|
869
|
+
}
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
if (result.status === "busy") {
|
|
873
|
+
queueTicketRef.current = result.busy.queue_ticket_id ?? queueTicketRef.current;
|
|
874
|
+
setState({ status: "busy", grant: null, busy: result.busy, error: null });
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
queueTicketRef.current = null;
|
|
878
|
+
if (heldSessionRef.current && heldSessionRef.current !== result.grant.session_id) {
|
|
879
|
+
releaseHeld("superseded", false);
|
|
880
|
+
}
|
|
881
|
+
heldSessionRef.current = result.grant.session_id;
|
|
882
|
+
writeLiveKitUrlHint(result.grant.livekit_url);
|
|
883
|
+
setState({ status: "ready", grant: result.grant, busy: null, error: null });
|
|
884
|
+
}).catch((error) => {
|
|
885
|
+
if (cancelled) return;
|
|
886
|
+
setState({
|
|
887
|
+
status: "failed",
|
|
888
|
+
grant: null,
|
|
889
|
+
busy: null,
|
|
890
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
891
|
+
});
|
|
889
892
|
});
|
|
890
893
|
});
|
|
891
894
|
return () => {
|
package/dist/server.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript } from './chunk-
|
|
1
|
+
export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript } from './chunk-EODL5S3A.js';
|
|
2
2
|
import './chunk-MCIXU6XP.js';
|
package/dist/tanstack-start.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "realtime-avatar",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.1",
|
|
4
4
|
"description": "Realtime Avatar SDK. `realtime-avatar` and the route adapters hold your API key and are server-only; `realtime-avatar/react`, `/browser` and `/tools` never can — importing a server entry into a browser build throws at bundle time.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "The Influence Company",
|