@modelnex/sdk 0.5.52 → 0.5.54
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 +10 -0
- package/dist/index.mjs +10 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4643,6 +4643,13 @@ function useTourPlayback({
|
|
|
4643
4643
|
const ownerKey = createTourPlaybackOwnerKey(serverUrl, websiteIdRef.current, experienceTypeRef.current);
|
|
4644
4644
|
if (!shouldExecuteTourCommandBatch(isActiveRef.current) || !hasTourPlaybackOwnership(ownerKey, playbackOwnerIdRef.current)) {
|
|
4645
4645
|
const activeType = experienceTypeRef.current;
|
|
4646
|
+
console.warn("[TourClient] Dropping command batch: playback not active or ownership not held", {
|
|
4647
|
+
isActive: isActiveRef.current,
|
|
4648
|
+
hasOwnership: hasTourPlaybackOwnership(ownerKey, playbackOwnerIdRef.current),
|
|
4649
|
+
experienceType: activeType,
|
|
4650
|
+
stepIndex: payload.stepIndex,
|
|
4651
|
+
commandBatchId: payload.commandBatchId ?? null
|
|
4652
|
+
});
|
|
4646
4653
|
emitSdkDebugLog("[TourClient] Ignoring command batch for inactive playback hook", {
|
|
4647
4654
|
experienceType: activeType,
|
|
4648
4655
|
stepIndex: payload.stepIndex
|
|
@@ -5373,6 +5380,9 @@ function useTourPlayback({
|
|
|
5373
5380
|
socket.on("tour:end", handleTourEndEvent);
|
|
5374
5381
|
socket.on("tour:debug_log", handleDebugLog);
|
|
5375
5382
|
emitSdkDebugLog("[ModelNex SDK] Tour playback initialized", void 0, { devMode: devModeRef.current });
|
|
5383
|
+
if (socket.connected) {
|
|
5384
|
+
handleConnect();
|
|
5385
|
+
}
|
|
5376
5386
|
return () => {
|
|
5377
5387
|
socket.off("connect", handleConnect);
|
|
5378
5388
|
socket.off("tour:server_state", handleServerState);
|
package/dist/index.mjs
CHANGED
|
@@ -3814,6 +3814,13 @@ function useTourPlayback({
|
|
|
3814
3814
|
const ownerKey = createTourPlaybackOwnerKey(serverUrl, websiteIdRef.current, experienceTypeRef.current);
|
|
3815
3815
|
if (!shouldExecuteTourCommandBatch(isActiveRef.current) || !hasTourPlaybackOwnership(ownerKey, playbackOwnerIdRef.current)) {
|
|
3816
3816
|
const activeType = experienceTypeRef.current;
|
|
3817
|
+
console.warn("[TourClient] Dropping command batch: playback not active or ownership not held", {
|
|
3818
|
+
isActive: isActiveRef.current,
|
|
3819
|
+
hasOwnership: hasTourPlaybackOwnership(ownerKey, playbackOwnerIdRef.current),
|
|
3820
|
+
experienceType: activeType,
|
|
3821
|
+
stepIndex: payload.stepIndex,
|
|
3822
|
+
commandBatchId: payload.commandBatchId ?? null
|
|
3823
|
+
});
|
|
3817
3824
|
emitSdkDebugLog("[TourClient] Ignoring command batch for inactive playback hook", {
|
|
3818
3825
|
experienceType: activeType,
|
|
3819
3826
|
stepIndex: payload.stepIndex
|
|
@@ -4544,6 +4551,9 @@ function useTourPlayback({
|
|
|
4544
4551
|
socket.on("tour:end", handleTourEndEvent);
|
|
4545
4552
|
socket.on("tour:debug_log", handleDebugLog);
|
|
4546
4553
|
emitSdkDebugLog("[ModelNex SDK] Tour playback initialized", void 0, { devMode: devModeRef.current });
|
|
4554
|
+
if (socket.connected) {
|
|
4555
|
+
handleConnect();
|
|
4556
|
+
}
|
|
4547
4557
|
return () => {
|
|
4548
4558
|
socket.off("connect", handleConnect);
|
|
4549
4559
|
socket.off("tour:server_state", handleServerState);
|