@streamscloud/embeddable 6.0.2 → 6.0.4

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.
@@ -5,7 +5,7 @@ export declare class ContinuationToken {
5
5
  static init(): ContinuationToken;
6
6
  static fromPayload(value: string | null): ContinuationToken;
7
7
  static preventLoading(): ContinuationToken;
8
- toRawFormat(): string | null | undefined;
8
+ toNextChunkString(): string | null | undefined;
9
9
  toString(): string | null;
10
10
  toJSON(): string | null;
11
11
  }
@@ -23,7 +23,7 @@ export class ContinuationToken {
23
23
  // additional initilizer, to block further loading
24
24
  return new ContinuationToken(false, null);
25
25
  }
26
- toRawFormat() {
26
+ toNextChunkString() {
27
27
  return this.canLoadMore ? this.value || undefined : this.value;
28
28
  }
29
29
  toString() {
@@ -6,7 +6,7 @@ export const makeShortVideosProvider = (data) => {
6
6
  loadPage: async (continuationToken) => {
7
7
  const result = await dataProvider.getShortVideosCursor({
8
8
  filter: { categoryId, excludeIds: prefetchedItems.length ? prefetchedItems.map((i) => i.id) : undefined },
9
- continuationToken: continuationToken.toRawFormat(),
9
+ continuationToken: continuationToken.toNextChunkString(),
10
10
  limit: 20
11
11
  });
12
12
  const items = result.items;
@@ -4,7 +4,7 @@ import { shouldUseSalePrice } from '../../products/price-helper';
4
4
  export const mapToShortVideoViewerModel = (payload) => {
5
5
  const mediaBlob = payload.postData.media[0];
6
6
  if (!mediaBlob) {
7
- console.warn('Short video media is missing. Unexpected behavior.');
7
+ console.warn(`Short video '${payload.id}' media is missing. Unexpected behavior.`);
8
8
  }
9
9
  return {
10
10
  id: payload.id,
@@ -17,7 +17,7 @@ export class StreamPlayerBuffer {
17
17
  const { streamId, dataProvider } = init;
18
18
  this._pagesLoader = new CursorDataLoader({
19
19
  loadPage: async (continuationToken) => {
20
- const result = await dataProvider.getStreamPages(streamId, continuationToken.toRawFormat());
20
+ const result = await dataProvider.getStreamPages(streamId, continuationToken.toNextChunkString());
21
21
  const items = result.items;
22
22
  this._loaded = [...this._loaded, ...items];
23
23
  return {
@@ -28,7 +28,6 @@ $effect(() => {
28
28
  }
29
29
  });
30
30
  });
31
- const id = Math.random();
32
31
  let opened = $state(false);
33
32
  $effect(() => {
34
33
  var _a, _b;
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "6.0.2",
3
+ "version": "6.0.4",
4
4
  "author": "StreamsCloud",
5
- "repository": "https://github.com/StreamsCloud/streamscloud-frontend-packages.git",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/StreamsCloud/streamscloud-frontend-packages.git"
8
+ },
6
9
  "type": "module",
7
10
  "scripts": {
8
11
  "dev": "vite dev --port 3010",