@scalemule/nextjs 0.1.11 → 0.1.12

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.mts CHANGED
@@ -436,9 +436,17 @@ interface ScaleMuleMediaProps {
436
436
  alt?: string;
437
437
  /**
438
438
  * Polling interval while waiting for the media pipeline to complete.
439
- * Defaults to 2000ms; set to `null` to disable polling. Polling stops
440
- * automatically once scan is clean. When `conversationId` is set the
441
- * component receives push updates and you can usually pass `null`.
439
+ *
440
+ * Default behaviour:
441
+ * - With `conversationId` set: polling **off** (the realtime
442
+ * conversation channel pushes `file_status_changed` events;
443
+ * a poll loop on top would just be wasted requests).
444
+ * - Without `conversationId`: 2000ms.
445
+ *
446
+ * Override either way by passing a number (belt-and-suspenders if you
447
+ * don't trust your websocket) or `null` (disable explicitly).
448
+ * Polling stops automatically once both scan and any expected
449
+ * pipeline (optimize / transcode) have settled.
442
450
  */
443
451
  pollIntervalMs?: number | null;
444
452
  /**
package/dist/index.d.ts CHANGED
@@ -436,9 +436,17 @@ interface ScaleMuleMediaProps {
436
436
  alt?: string;
437
437
  /**
438
438
  * Polling interval while waiting for the media pipeline to complete.
439
- * Defaults to 2000ms; set to `null` to disable polling. Polling stops
440
- * automatically once scan is clean. When `conversationId` is set the
441
- * component receives push updates and you can usually pass `null`.
439
+ *
440
+ * Default behaviour:
441
+ * - With `conversationId` set: polling **off** (the realtime
442
+ * conversation channel pushes `file_status_changed` events;
443
+ * a poll loop on top would just be wasted requests).
444
+ * - Without `conversationId`: 2000ms.
445
+ *
446
+ * Override either way by passing a number (belt-and-suspenders if you
447
+ * don't trust your websocket) or `null` (disable explicitly).
448
+ * Polling stops automatically once both scan and any expected
449
+ * pipeline (optimize / transcode) have settled.
442
450
  */
443
451
  pollIntervalMs?: number | null;
444
452
  /**
package/dist/index.js CHANGED
@@ -9257,17 +9257,18 @@ function ScaleMuleMedia(props) {
9257
9257
  className,
9258
9258
  style,
9259
9259
  alt,
9260
- pollIntervalMs = 2e3,
9260
+ pollIntervalMs,
9261
9261
  conversationId = null,
9262
9262
  conversationKind,
9263
9263
  renderPlaceholder,
9264
9264
  renderBlocked,
9265
9265
  renderOverride
9266
9266
  } = props;
9267
+ const effectivePollIntervalMs = pollIntervalMs !== void 0 ? pollIntervalMs : conversationId ? null : 2e3;
9267
9268
  const { gatewayUrl } = useScaleMule();
9268
9269
  const { status, isReady } = useFileStatus({
9269
9270
  fileId,
9270
- pollIntervalMs,
9271
+ pollIntervalMs: effectivePollIntervalMs,
9271
9272
  conversationId,
9272
9273
  conversationKind
9273
9274
  });
package/dist/index.mjs CHANGED
@@ -9237,17 +9237,18 @@ function ScaleMuleMedia(props) {
9237
9237
  className,
9238
9238
  style,
9239
9239
  alt,
9240
- pollIntervalMs = 2e3,
9240
+ pollIntervalMs,
9241
9241
  conversationId = null,
9242
9242
  conversationKind,
9243
9243
  renderPlaceholder,
9244
9244
  renderBlocked,
9245
9245
  renderOverride
9246
9246
  } = props;
9247
+ const effectivePollIntervalMs = pollIntervalMs !== void 0 ? pollIntervalMs : conversationId ? null : 2e3;
9247
9248
  const { gatewayUrl } = useScaleMule();
9248
9249
  const { status, isReady } = useFileStatus({
9249
9250
  fileId,
9250
- pollIntervalMs,
9251
+ pollIntervalMs: effectivePollIntervalMs,
9251
9252
  conversationId,
9252
9253
  conversationKind
9253
9254
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalemule/nextjs",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "ScaleMule SDK for Next.js applications - authentication, storage, and user management",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",