@streamscloud/embeddable 6.3.5 → 6.3.7
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/short-videos/short-video-viewer/cmp.attachments-inline.svelte +0 -1
- package/dist/short-videos/short-videos-player/index.d.ts +2 -1
- package/dist/short-videos/short-videos-player/index.js +2 -1
- package/dist/short-videos/short-videos-player/internal-short-video-analytics-handler.d.ts +1 -1
- package/dist/short-videos/short-videos-player/internal-short-video-analytics-handler.js +1 -1
- package/dist/short-videos/short-videos-player/short-videos-player-view.svelte +2 -2
- package/dist/short-videos/short-videos-player/types.d.ts +1 -1
- package/dist/streams/stream-player/internal-stream-analytics-handler.d.ts +1 -1
- package/dist/streams/stream-player/internal-stream-analytics-handler.js +1 -1
- package/dist/streams/stream-player/stream-player.svelte +1 -1
- package/dist/streams/stream-player/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts">import { Icon, IconColor } from '../../ui/icon';
|
|
2
2
|
import { ImageRounded } from '../../ui/image';
|
|
3
3
|
import IconTargetArrow from '@fluentui/svg-icons/icons/target_arrow_20_regular.svg?raw';
|
|
4
|
-
import { onMount } from 'svelte';
|
|
5
4
|
let { model, on } = $props();
|
|
6
5
|
const attachmentsToShow = $derived.by(() => {
|
|
7
6
|
const products = model.products
|
|
@@ -2,10 +2,11 @@ import { type IMediaCenterDataProvider } from '../../media-center/data-provider'
|
|
|
2
2
|
import type { ShortVideoViewerModel } from '../short-video-viewer';
|
|
3
3
|
import type { IPlayerItemsProvider } from '../../ui/player';
|
|
4
4
|
import { default as ShortVideosPlayer } from './cmp.short-videos-player.svelte';
|
|
5
|
+
import { InternalShortVideoAnalyticsHandler } from './internal-short-video-analytics-handler';
|
|
5
6
|
import type { IShortVideosPlayerLocalization } from './short-videos-player-localization';
|
|
6
7
|
import { type PlayerSettings, type IShortVideoAnalyticsHandler } from './types';
|
|
7
8
|
export { ShortVideosPlayer };
|
|
8
|
-
export type { IShortVideosPlayerLocalization, IMediaCenterDataProvider, IPlayerItemsProvider, IShortVideoAnalyticsHandler };
|
|
9
|
+
export type { IShortVideosPlayerLocalization, IMediaCenterDataProvider, IPlayerItemsProvider, IShortVideoAnalyticsHandler, InternalShortVideoAnalyticsHandler };
|
|
9
10
|
/**
|
|
10
11
|
* Opens the short videos player modal.
|
|
11
12
|
*
|
|
@@ -23,7 +23,8 @@ export function openShortVideosPlayer(init) {
|
|
|
23
23
|
mediaCenterDataProvider = new InternalMediaCenterDataProvider(init.mediaPageId, graphqlOrigin);
|
|
24
24
|
}
|
|
25
25
|
let analyticsHandler = init.analyticsHandler;
|
|
26
|
-
if (!analyticsHandler && !init.shortVideosProvider
|
|
26
|
+
if (!analyticsHandler && !init.shortVideosProvider) {
|
|
27
|
+
// Only create internal analytics handler if using internal data provider
|
|
27
28
|
analyticsHandler = new InternalShortVideoAnalyticsHandler(graphqlOrigin);
|
|
28
29
|
}
|
|
29
30
|
const shadowHost = new ModalShadowHost();
|
|
@@ -4,5 +4,5 @@ export declare class InternalShortVideoAnalyticsHandler implements IShortVideoAn
|
|
|
4
4
|
setOrganizationId: (organizationId: string) => void;
|
|
5
5
|
trackShortVideoView: (videoId: string) => void;
|
|
6
6
|
trackShortVideoProductImpression: (productId: string, videoId: string) => void;
|
|
7
|
-
|
|
7
|
+
trackShortVideoProductClick: (productId: string, videoId: string) => void;
|
|
8
8
|
}
|
|
@@ -15,7 +15,7 @@ export class InternalShortVideoAnalyticsHandler {
|
|
|
15
15
|
trackShortVideoProductImpression = (productId, videoId) => {
|
|
16
16
|
AppEventsTracker.trackShortVideoProductImpression(productId, videoId);
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
trackShortVideoProductClick = (productId, videoId) => {
|
|
19
19
|
AppEventsTracker.trackShortVideoProductClick(productId, videoId);
|
|
20
20
|
};
|
|
21
21
|
}
|
|
@@ -90,7 +90,7 @@ const onPlayerClose = () => {
|
|
|
90
90
|
(_a = on === null || on === void 0 ? void 0 : on.playerClosed) === null || _a === void 0 ? void 0 : _a.call(on);
|
|
91
91
|
};
|
|
92
92
|
const onShortVideoProductClick = (productId, videoId) => {
|
|
93
|
-
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.
|
|
93
|
+
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackShortVideoProductClick(productId, videoId);
|
|
94
94
|
};
|
|
95
95
|
const onShortVideoProductImpression = (productId, videoId) => {
|
|
96
96
|
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackShortVideoProductImpression(productId, videoId);
|
|
@@ -155,7 +155,7 @@ const onShortVideoProductImpression = (productId, videoId) => {
|
|
|
155
155
|
playerLogo={playerLogo}
|
|
156
156
|
on={{
|
|
157
157
|
closePlayer: on?.playerClosed,
|
|
158
|
-
productClick: (productId: string) => onShortVideoProductClick(productId, buffer
|
|
158
|
+
productClick: (productId: string) => onShortVideoProductClick(productId, buffer?.current?.id || ''),
|
|
159
159
|
productImpression: onShortVideoProductImpression
|
|
160
160
|
}} />
|
|
161
161
|
{:else}
|
|
@@ -6,7 +6,7 @@ export interface IShortVideoAnalyticsHandler {
|
|
|
6
6
|
setOrganizationId: (organizationId: string) => void;
|
|
7
7
|
trackShortVideoView: (videoId: string) => void;
|
|
8
8
|
trackShortVideoProductImpression: (productId: string, videoId: string) => void;
|
|
9
|
-
|
|
9
|
+
trackShortVideoProductClick: (productId: string, videoId: string) => void;
|
|
10
10
|
}
|
|
11
11
|
export type ShortVideoPlayerProps = PlayerSettings & {
|
|
12
12
|
dataProvider: IPlayerItemsProvider<ShortVideoViewerModel>;
|
|
@@ -11,6 +11,6 @@ export declare class InternalStreamAnalyticsHandler implements IStreamAnalyticsH
|
|
|
11
11
|
reportPageVideoViews: (videoId: string, streamId: string) => void;
|
|
12
12
|
trackShortVideoView: (videoId: string) => void;
|
|
13
13
|
trackShortVideoProductImpression: (productId: string, videoId: string) => void;
|
|
14
|
-
|
|
14
|
+
trackShortVideoProductClick: (productId: string, videoId: string) => void;
|
|
15
15
|
trackShortVideoProgress: (pageId: string, videoId: string, progress: number, streamId: string) => void;
|
|
16
16
|
}
|
|
@@ -16,6 +16,6 @@ export class InternalStreamAnalyticsHandler {
|
|
|
16
16
|
reportPageVideoViews = (videoId, streamId) => AppEventsTracker.reportPageVideoViews(videoId, streamId);
|
|
17
17
|
trackShortVideoView = (videoId) => AppEventsTracker.trackShortVideoView(videoId);
|
|
18
18
|
trackShortVideoProductImpression = (productId, videoId) => AppEventsTracker.trackShortVideoProductImpression(productId, videoId);
|
|
19
|
-
|
|
19
|
+
trackShortVideoProductClick = (productId, videoId) => AppEventsTracker.trackShortVideoProductClick(productId, videoId);
|
|
20
20
|
trackShortVideoProgress = (pageId, videoId, progress, streamId) => AppEventsTracker.trackShortVideoProgress(pageId, videoId, progress, streamId);
|
|
21
21
|
}
|
|
@@ -147,7 +147,7 @@ const onProductCardClick = (productId) => {
|
|
|
147
147
|
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackStreamProductClicked(productId, streamId);
|
|
148
148
|
};
|
|
149
149
|
const onShortVideoProductClick = (productId, videoId) => {
|
|
150
|
-
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.
|
|
150
|
+
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackShortVideoProductClick(productId, videoId);
|
|
151
151
|
};
|
|
152
152
|
const onStreamProductImpression = (productId) => {
|
|
153
153
|
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackStreamProductImpression(productId, streamId);
|
|
@@ -51,6 +51,6 @@ export interface IStreamAnalyticsHandler {
|
|
|
51
51
|
reportPageVideoViews: (videoId: string, streamId: string) => void;
|
|
52
52
|
trackShortVideoView: (videoId: string) => void;
|
|
53
53
|
trackShortVideoProductImpression: (productId: string, videoId: string) => void;
|
|
54
|
-
|
|
54
|
+
trackShortVideoProductClick: (productId: string, videoId: string) => void;
|
|
55
55
|
trackShortVideoProgress: (pageId: string, videoId: string, progress: number, streamId: string) => void;
|
|
56
56
|
}
|