@streamscloud/embeddable 6.4.0 → 6.4.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.
@@ -1,6 +1,6 @@
1
1
  import { PostType, Status } from '../../core/enums';
2
2
  import { createLocalGQLClient } from '../../core/graphql';
3
- import { mapToShortVideosPlayerModel } from '../../short-videos/short-videos-player/mapper';
3
+ import { mapToShortVideoPlayerModel } from '../../short-videos/short-videos-player/mapper';
4
4
  import { GetMediaPageConfigDocument, GetShortVideosDocument } from './operations.generated';
5
5
  export class InternalMediaCenterDataProvider {
6
6
  mediaPageId;
@@ -39,7 +39,7 @@ export class InternalMediaCenterDataProvider {
39
39
  .toPromise();
40
40
  const posts = payload.data?.shortVideos?.items || [];
41
41
  return {
42
- items: posts.map(mapToShortVideosPlayerModel),
42
+ items: posts.map(mapToShortVideoPlayerModel),
43
43
  continuationToken: payload.data?.shortVideos?.continuationToken || null
44
44
  };
45
45
  };
@@ -1,10 +1,12 @@
1
1
  import { type IMediaCenterDataProvider } from '../../media-center/data-provider';
2
2
  import type { IPlayerItemsProvider } from '../../ui/player';
3
3
  import { default as ShortVideosPlayer } from './cmp.short-videos-player.svelte';
4
+ import { mapToShortVideoPlayerModel } from './mapper';
4
5
  import type { IShortVideosPlayerLocalization } from './short-videos-player-localization';
5
6
  import { type PlayerSettings, type IShortVideoAnalyticsHandler, type ShortVideoPlayerModel } from './types';
6
7
  export { ShortVideosPlayer, type ShortVideoPlayerModel };
7
8
  export type { IShortVideosPlayerLocalization, IMediaCenterDataProvider, IPlayerItemsProvider, IShortVideoAnalyticsHandler };
9
+ export { mapToShortVideoPlayerModel };
8
10
  /**
9
11
  * Opens the short videos player modal.
10
12
  *
@@ -5,9 +5,11 @@ import { ModalShadowHost } from '../../ui/shadow-dom';
5
5
  import { default as ShortVideosPlayer } from './cmp.short-videos-player.svelte';
6
6
  import { InternalShortVideoAnalyticsHandler } from './internal-short-video-analytics-handler';
7
7
  import { InternalShortVideoPlayerProvider } from './internal-short-video-player-provider';
8
+ import { mapToShortVideoPlayerModel } from './mapper';
8
9
  import {} from './types';
9
10
  import { mount, unmount } from 'svelte';
10
11
  export { ShortVideosPlayer };
12
+ export { mapToShortVideoPlayerModel };
11
13
  export function openShortVideosPlayer(init) {
12
14
  const { shortVideosProvider, ids, graphqlOrigin, initialId, initiator, socialInteractionsHandler, disableBackground, localization, showStreamsCloudWatermark } = init;
13
15
  let dataProvider = shortVideosProvider;
@@ -2,7 +2,7 @@ import { ImageScale } from '../..';
2
2
  import { ContinuationToken } from '../../core/continuation-token';
3
3
  import { CursorDataLoader } from '../../core/data-loaders';
4
4
  import { createLocalGQLClient } from '../../core/graphql';
5
- import { mapToShortVideosPlayerModel } from './mapper';
5
+ import { mapToShortVideoPlayerModel } from './mapper';
6
6
  import { GetShortVideosDocument } from './operations.generated';
7
7
  const CHUNK_SIZE = 20;
8
8
  export class InternalShortVideoPlayerProvider {
@@ -32,7 +32,7 @@ export class InternalShortVideoPlayerProvider {
32
32
  if (!data) {
33
33
  return null;
34
34
  }
35
- const items = data.items.map(mapToShortVideosPlayerModel).sort((a, b) => {
35
+ const items = data.items.map(mapToShortVideoPlayerModel).sort((a, b) => {
36
36
  const ia = this.idOrder.get(a.id) ?? Number.MAX_SAFE_INTEGER;
37
37
  const ib = this.idOrder.get(b.id) ?? Number.MAX_SAFE_INTEGER;
38
38
  return ia - ib;
@@ -1,3 +1,3 @@
1
1
  import type { GetShortVideosQuery } from './operations.generated';
2
2
  import type { ShortVideoPlayerModel } from './types';
3
- export declare const mapToShortVideosPlayerModel: (payload: GetShortVideosQuery["shortVideos"]["items"][0]) => ShortVideoPlayerModel;
3
+ export declare const mapToShortVideoPlayerModel: (payload: GetShortVideosQuery["shortVideos"]["items"][0]) => ShortVideoPlayerModel;
@@ -1,6 +1,6 @@
1
1
  import { ProfileType } from '../../core/enums';
2
2
  import { mapToShortVideoViewerModel } from '../short-video-viewer';
3
- export const mapToShortVideosPlayerModel = (payload) => {
3
+ export const mapToShortVideoPlayerModel = (payload) => {
4
4
  const viewerModel = mapToShortVideoViewerModel(payload);
5
5
  return {
6
6
  ...viewerModel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "6.4.0",
3
+ "version": "6.4.2",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",