@streamscloud/embeddable 7.0.1 → 7.0.2-1759149696160
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/ads/ad-card/cmp.ad-card.svelte +13 -12
- package/dist/ads/ad-card/cmp.ad-card.svelte.d.ts +2 -2
- package/dist/content-player/cmp.content-player.svelte +224 -0
- package/dist/content-player/cmp.content-player.svelte.d.ts +33 -0
- package/dist/content-player/content-player-config.svelte.d.ts +49 -0
- package/dist/content-player/content-player-config.svelte.js +43 -0
- package/dist/content-player/controls-and-attachments.svelte +275 -0
- package/dist/content-player/controls-and-attachments.svelte.d.ts +28 -0
- package/dist/content-player/fade-mixins.scss +12 -0
- package/dist/content-player/index.d.ts +2 -0
- package/dist/content-player/index.js +2 -0
- package/dist/content-player/overview-panel.svelte +85 -0
- package/dist/content-player/overview-panel.svelte.d.ts +10 -0
- package/dist/{streams/stream-player → content-player}/ui-manager.svelte.d.ts +10 -9
- package/dist/content-player/ui-manager.svelte.js +68 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/media-center/config/internal-media-center-config.js +2 -1
- package/dist/media-center/config/types.d.ts +1 -1
- package/dist/media-center/media-center/cmp.media-center.svelte +13 -9
- package/dist/media-center/media-center/overview.svelte +3 -2
- package/dist/media-center/media-center/short-video-resources-generator.d.ts +1 -1
- package/dist/media-center/model/types.d.ts +12 -0
- package/dist/posts/attachments/cmp.attachments.svelte +50 -0
- package/dist/{short-videos/short-video-viewer → posts/attachments}/cmp.attachments.svelte.d.ts +3 -3
- package/dist/posts/attachments/index.d.ts +1 -0
- package/dist/posts/attachments/index.js +1 -0
- package/dist/{short-videos/short-video-viewer/cmp.short-video-controls.svelte → posts/controls/cmp.controls.svelte} +21 -26
- package/dist/posts/controls/cmp.controls.svelte.d.ts +11 -0
- package/dist/posts/controls/index.d.ts +1 -0
- package/dist/posts/controls/index.js +1 -0
- package/dist/posts/index.d.ts +4 -0
- package/dist/posts/index.js +2 -0
- package/dist/posts/model/types.d.ts +13 -0
- package/dist/posts/model/types.js +1 -0
- package/dist/{short-videos/short-video-viewer/cmp.attachments-horizontal.svelte → posts/post-viewer/attachments-horizontal.svelte} +2 -3
- package/dist/posts/post-viewer/attachments-horizontal.svelte.d.ts +13 -0
- package/dist/posts/post-viewer/cmp.post-viewer.svelte +120 -0
- package/dist/{short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts → posts/post-viewer/cmp.post-viewer.svelte.d.ts} +3 -2
- package/dist/posts/post-viewer/heading.svelte +76 -0
- package/dist/posts/post-viewer/heading.svelte.d.ts +9 -0
- package/dist/posts/post-viewer/index.d.ts +4 -0
- package/dist/posts/post-viewer/index.js +3 -0
- package/dist/posts/post-viewer/mapper.d.ts +3 -0
- package/dist/{short-videos/short-video-viewer → posts/post-viewer}/mapper.js +33 -17
- package/dist/{short-videos/short-video-viewer → posts/post-viewer}/operations.generated.d.ts +2 -2
- package/dist/{short-videos/short-video-viewer → posts/post-viewer}/operations.generated.js +2 -2
- package/dist/{short-videos/short-video-viewer → posts/post-viewer}/operations.graphql +1 -1
- package/dist/posts/post-viewer/post-media.svelte +20 -0
- package/dist/posts/post-viewer/post-media.svelte.d.ts +12 -0
- package/dist/{short-videos/short-video-viewer/short-video-viewer-localization.d.ts → posts/post-viewer/post-viewer-localization.d.ts} +2 -3
- package/dist/{short-videos/short-video-viewer/short-video-viewer-localization.js → posts/post-viewer/post-viewer-localization.js} +3 -5
- package/dist/{short-videos/short-video-viewer → posts/post-viewer}/types.d.ts +24 -25
- package/dist/{short-videos/short-video-viewer → posts/post-viewer}/ui-manager.svelte.d.ts +5 -3
- package/dist/{short-videos/short-video-viewer → posts/post-viewer}/ui-manager.svelte.js +11 -4
- package/dist/posts/post-viewer/utils.d.ts +2 -0
- package/dist/posts/post-viewer/utils.js +13 -0
- package/dist/posts/social-interactions/index.d.ts +1 -0
- package/dist/posts/social-interactions/index.js +1 -0
- package/dist/posts/social-interactions/types.d.ts +9 -0
- package/dist/posts/social-interactions/types.js +1 -0
- package/dist/products/product-card/cmp.product-card.svelte +27 -8
- package/dist/products/product-card/cmp.product-card.svelte.d.ts +2 -1
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +11 -17
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +1 -5
- package/dist/short-videos/short-videos-player/index.d.ts +20 -5
- 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/internal-short-video-player-provider.d.ts +1 -1
- package/dist/short-videos/short-videos-player/mapper.js +2 -2
- package/dist/short-videos/short-videos-player/short-videos-player-view.svelte +50 -216
- package/dist/short-videos/short-videos-player/short-videos-player-view.svelte.d.ts +2 -9
- package/dist/short-videos/short-videos-player/types.d.ts +6 -7
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +3 -3
- package/dist/streams/layout/models/index.d.ts +1 -1
- package/dist/streams/layout/models/index.js +1 -1
- package/dist/streams/layout/models/mapper.d.ts +2 -2
- package/dist/streams/layout/models/mapper.js +6 -6
- package/dist/streams/stream-player/index.d.ts +25 -4
- package/dist/streams/stream-player/internal-stream-analytics-handler.d.ts +2 -0
- package/dist/streams/stream-player/internal-stream-analytics-handler.js +2 -0
- package/dist/streams/stream-player/stream-overview.svelte +47 -122
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +1 -4
- package/dist/streams/stream-player/stream-player-buffer.svelte.d.ts +1 -1
- package/dist/streams/stream-player/stream-player-localization.d.ts +1 -5
- package/dist/streams/stream-player/stream-player-localization.js +2 -10
- package/dist/streams/stream-player/stream-player-view.svelte +229 -0
- package/dist/streams/stream-player/stream-player-view.svelte.d.ts +8 -0
- package/dist/streams/stream-player/types.d.ts +4 -4
- package/dist/ui/{player → player-slider}/cmp.player-slider.svelte.d.ts +2 -10
- package/dist/ui/{player → player-slider}/types.d.ts +9 -0
- package/dist/ui/player-slider/types.js +1 -0
- package/package.json +1 -1
- package/dist/short-videos/short-video-viewer/cmp.attachments-horizontal.svelte.d.ts +0 -13
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +0 -52
- package/dist/short-videos/short-video-viewer/cmp.short-video-controls.svelte.d.ts +0 -19
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +0 -89
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +0 -9
- package/dist/short-videos/short-video-viewer/cmp.short-video-product-card.svelte +0 -26
- package/dist/short-videos/short-video-viewer/cmp.short-video-product-card.svelte.d.ts +0 -16
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +0 -146
- package/dist/short-videos/short-video-viewer/index.d.ts +0 -5
- package/dist/short-videos/short-video-viewer/index.js +0 -4
- package/dist/short-videos/short-video-viewer/mapper.d.ts +0 -3
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.d.ts +0 -5
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.js +0 -7
- package/dist/short-videos/short-videos-player/controls.svelte +0 -261
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +0 -22
- package/dist/short-videos/short-videos-player/fade-mixins.scss +0 -12
- package/dist/short-videos/short-videos-player/short-videos-player-localization.d.ts +0 -7
- package/dist/short-videos/short-videos-player/short-videos-player-localization.js +0 -11
- package/dist/short-videos/short-videos-player/ui-manager.svelte.d.ts +0 -24
- package/dist/short-videos/short-videos-player/ui-manager.svelte.js +0 -47
- package/dist/streams/cmp.stream-product-card.svelte +0 -25
- package/dist/streams/cmp.stream-product-card.svelte.d.ts +0 -16
- package/dist/streams/stream-player/controls.svelte +0 -301
- package/dist/streams/stream-player/controls.svelte.d.ts +0 -20
- package/dist/streams/stream-player/fade-mixins.scss +0 -12
- package/dist/streams/stream-player/stream-player.svelte +0 -393
- package/dist/streams/stream-player/stream-player.svelte.d.ts +0 -16
- package/dist/streams/stream-player/ui-manager.svelte.js +0 -63
- /package/dist/{streams/stream-player → content-player}/button-mixins.scss +0 -0
- /package/dist/{ui/player → media-center/model}/types.js +0 -0
- /package/dist/{short-videos/short-video-viewer → posts/post-viewer}/types.js +0 -0
- /package/dist/ui/{player → player-slider}/cmp.player-slider.svelte +0 -0
- /package/dist/ui/{player → player-slider}/index.d.ts +0 -0
- /package/dist/ui/{player → player-slider}/index.js +0 -0
- /package/dist/ui/{player → player-slider}/player-buffer.svelte.d.ts +0 -0
- /package/dist/ui/{player → player-slider}/player-buffer.svelte.js +0 -0
- /package/dist/ui/{player → player-slider}/prevent-slider-scroll.d.ts +0 -0
- /package/dist/ui/{player → player-slider}/prevent-slider-scroll.js +0 -0
- /package/dist/ui/{player → player-slider}/wheel-gestures-adapter.d.ts +0 -0
- /package/dist/ui/{player → player-slider}/wheel-gestures-adapter.js +0 -0
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const CONTROLS_PADDING_HORIZONTAL = 28;
|
|
2
|
-
const CONTROLS_PADDING_VERTICAL = 28;
|
|
3
|
-
const CONTROLS_ATTACHMENTS_MAX_WIDTH = 176;
|
|
4
|
-
const PLAYER_PADDING_VERTICAL = 10;
|
|
5
|
-
export class ShortVideosPlayerUiManager {
|
|
6
|
-
showAttachments = $state(true);
|
|
7
|
-
globalCssVariables = $derived.by(() => {
|
|
8
|
-
const values = [
|
|
9
|
-
`--short-videos-player--controls--attachments--max-width: ${CONTROLS_ATTACHMENTS_MAX_WIDTH}px`,
|
|
10
|
-
`--short-videos-player--controls--available-space: ${this._controlsAvailableSpace}px`,
|
|
11
|
-
`--short-videos-player--controls--padding: ${this._mediaCenterHeaderHeight ? 0 : CONTROLS_PADDING_VERTICAL}px ${CONTROLS_PADDING_HORIZONTAL}px ${CONTROLS_PADDING_VERTICAL}px`,
|
|
12
|
-
`--short-videos-player--media-center-header--height: ${this._mediaCenterHeaderHeight || 72}px`,
|
|
13
|
-
`--short-videos-player--padding: ${this._mediaCenterHeaderHeight ? this._mediaCenterHeaderHeight : PLAYER_PADDING_VERTICAL}px 0 ${PLAYER_PADDING_VERTICAL}px`
|
|
14
|
-
];
|
|
15
|
-
return values.join(';');
|
|
16
|
-
});
|
|
17
|
-
isMobileView = $derived.by(() => this._viewTotalWidth <= 576);
|
|
18
|
-
viewInitialized = $derived.by(() => !!this._viewTotalWidth && !!this._mainViewColumnWidth);
|
|
19
|
-
showShortVideoOverlayAttachments = $derived.by(() => this.viewInitialized && this._controlsAttachmentsPanelWidth < CONTROLS_ATTACHMENTS_MAX_WIDTH + 10);
|
|
20
|
-
showShortVideoOverlayControls = $derived.by(() => this.viewInitialized && this._controlsContentWidth < this._controlsNavigationButtonsWidth);
|
|
21
|
-
_viewTotalWidth = $state(0);
|
|
22
|
-
_mainViewColumnWidth = $state(0);
|
|
23
|
-
_mediaCenterHeaderHeight = $state(0);
|
|
24
|
-
_controlsAttachmentsPanelWidth = $state(0);
|
|
25
|
-
_controlsNavigationButtonsWidth = $state(0);
|
|
26
|
-
_controlsAvailableSpace = $derived.by(() => (this._viewTotalWidth - this._mainViewColumnWidth) / 2);
|
|
27
|
-
_controlsContentWidth = $derived.by(() => this._controlsAvailableSpace - CONTROLS_PADDING_HORIZONTAL * 2);
|
|
28
|
-
get viewTotalWidth() {
|
|
29
|
-
return this._viewTotalWidth;
|
|
30
|
-
}
|
|
31
|
-
get mainViewColumnWidth() {
|
|
32
|
-
return this._mainViewColumnWidth;
|
|
33
|
-
}
|
|
34
|
-
updateDimensions = (dimensions) => {
|
|
35
|
-
this._viewTotalWidth = dimensions.viewTotalWidth;
|
|
36
|
-
this._mainViewColumnWidth = dimensions.mainViewColumnWidth;
|
|
37
|
-
};
|
|
38
|
-
updateMediaCenterHeaderHeight = (height) => {
|
|
39
|
-
this._mediaCenterHeaderHeight = height;
|
|
40
|
-
};
|
|
41
|
-
setAttachmentsPanelWidth = (width) => {
|
|
42
|
-
this._controlsAttachmentsPanelWidth = width;
|
|
43
|
-
};
|
|
44
|
-
setNavigationButtonsBlockWidth = (width) => {
|
|
45
|
-
this._controlsNavigationButtonsWidth = width;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { ProductCard } from '../products/product-card';
|
|
2
|
-
import { onMount } from 'svelte';
|
|
3
|
-
let { product, streamId, locale, includeBeforeNowPrefix, inert = false, on } = $props();
|
|
4
|
-
let productElement;
|
|
5
|
-
onMount(() => {
|
|
6
|
-
if (productElement && (on === null || on === void 0 ? void 0 : on.impression)) {
|
|
7
|
-
const observer = new IntersectionObserver((entries) => {
|
|
8
|
-
entries.forEach((entry) => {
|
|
9
|
-
if (entry.isIntersecting && entry.intersectionRatio >= 0.5) {
|
|
10
|
-
on.impression(product.id, streamId);
|
|
11
|
-
observer.unobserve(entry.target);
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
}, { threshold: 0.5 });
|
|
15
|
-
observer.observe(productElement);
|
|
16
|
-
return () => {
|
|
17
|
-
observer.disconnect();
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<div bind:this={productElement}>
|
|
24
|
-
<ProductCard product={product} locale={locale} includeBeforeNowPrefix={includeBeforeNowPrefix} inert={inert} on={on} />
|
|
25
|
-
</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Locale } from '../core/locale';
|
|
2
|
-
import type { ProductCardModel } from '../products/product-card/types';
|
|
3
|
-
type Props = {
|
|
4
|
-
product: ProductCardModel;
|
|
5
|
-
streamId: string;
|
|
6
|
-
locale?: Locale;
|
|
7
|
-
includeBeforeNowPrefix?: boolean;
|
|
8
|
-
inert?: boolean;
|
|
9
|
-
on?: {
|
|
10
|
-
productClick?: (id: string) => void;
|
|
11
|
-
impression?: (productId: string, streamId: string) => void;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
15
|
-
type Cmp = ReturnType<typeof Cmp>;
|
|
16
|
-
export default Cmp;
|
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
<script lang="ts">var _a, _b;
|
|
2
|
-
import { slideHorizontally } from '../../core/transitions';
|
|
3
|
-
import { ShortVideoViewerAttachments } from '../../short-videos/short-video-viewer';
|
|
4
|
-
import { ShortVideoControls } from '../../short-videos/short-video-viewer/index.js';
|
|
5
|
-
import { StreamElementType } from '../layout/enums';
|
|
6
|
-
import { mapToShortVideoViewerModel } from '../layout/models';
|
|
7
|
-
import { Icon } from '../../ui/icon';
|
|
8
|
-
import { StreamPlayerLocalization } from './stream-player-localization';
|
|
9
|
-
import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_28_regular.svg?raw';
|
|
10
|
-
import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_28_regular.svg?raw';
|
|
11
|
-
import IconDismiss from '@fluentui/svg-icons/icons/dismiss_28_regular.svg?raw';
|
|
12
|
-
let { buffer, uiManager, postSocialInteractionsHandler, localization, on, playerLogo, showCloseButton } = $props();
|
|
13
|
-
const shortVideo = $derived(((_a = buffer.current) === null || _a === void 0 ? void 0 : _a.type) === 'short-video' && ((_b = buffer.current) === null || _b === void 0 ? void 0 : _b.shortVideo) ? mapToShortVideoViewerModel(buffer.current.shortVideo) : null);
|
|
14
|
-
const singleWebViewPage = $derived.by(() => {
|
|
15
|
-
var _a;
|
|
16
|
-
if (((_a = buffer.current) === null || _a === void 0 ? void 0 : _a.type) !== 'general') {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
const layout = buffer.current.layout;
|
|
20
|
-
const collectRenderableElements = (elements) => {
|
|
21
|
-
const renderableElements = [];
|
|
22
|
-
for (const element of elements) {
|
|
23
|
-
if (element.type === StreamElementType.Container) {
|
|
24
|
-
if (element.elements) {
|
|
25
|
-
renderableElements.push(...collectRenderableElements(element.elements));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
renderableElements.push(element);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return renderableElements;
|
|
33
|
-
};
|
|
34
|
-
const allRenderableElements = [];
|
|
35
|
-
for (const slot of layout.slots) {
|
|
36
|
-
for (const component of slot.components) {
|
|
37
|
-
if (component.elements) {
|
|
38
|
-
allRenderableElements.push(...collectRenderableElements(component.elements));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return allRenderableElements.length === 1 && allRenderableElements[0].type === StreamElementType.WebView;
|
|
43
|
-
});
|
|
44
|
-
const changeShowShortVideoAttachments = () => {
|
|
45
|
-
uiManager.showShortVideoAttachments = !uiManager.showShortVideoAttachments;
|
|
46
|
-
};
|
|
47
|
-
const trackAttachmentsPanelSize = (node) => {
|
|
48
|
-
const resizeObserver = new ResizeObserver(([entry]) => {
|
|
49
|
-
const width = entry.contentRect.width;
|
|
50
|
-
uiManager.setAttachmentsPanelWidth(width);
|
|
51
|
-
});
|
|
52
|
-
resizeObserver.observe(node);
|
|
53
|
-
return {
|
|
54
|
-
destroy() {
|
|
55
|
-
resizeObserver.unobserve(node);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
const trackNavigationButtonsSize = (node) => {
|
|
60
|
-
const resizeObserver = new ResizeObserver(([entry]) => {
|
|
61
|
-
const width = entry.contentRect.width;
|
|
62
|
-
uiManager.setNavigationButtonsBlockWidth(width);
|
|
63
|
-
});
|
|
64
|
-
resizeObserver.observe(node);
|
|
65
|
-
return {
|
|
66
|
-
destroy() {
|
|
67
|
-
resizeObserver.unobserve(node);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
</script>
|
|
72
|
-
|
|
73
|
-
{#if uiManager.viewInitialized && (!uiManager.showShortVideoOverlayAttachments || !uiManager.showShortVideoOverlayControls)}
|
|
74
|
-
<div class="stream-player-controls" class:stream-player-controls--with-logo={!!playerLogo}>
|
|
75
|
-
{#if !uiManager.showShortVideoOverlayControls}
|
|
76
|
-
<div class="stream-player-controls__left">
|
|
77
|
-
{#if shortVideo}
|
|
78
|
-
<div class="stream-player-controls__short-video-controls">
|
|
79
|
-
<ShortVideoControls
|
|
80
|
-
model={shortVideo}
|
|
81
|
-
socialInteractionsHandler={postSocialInteractionsHandler}
|
|
82
|
-
on={{ attachmentsClicked: changeShowShortVideoAttachments }} />
|
|
83
|
-
</div>
|
|
84
|
-
{/if}
|
|
85
|
-
<div
|
|
86
|
-
class="stream-player-controls__navigation-buttons"
|
|
87
|
-
class:stream-player-controls__navigation-buttons--single-web-view-page={singleWebViewPage}
|
|
88
|
-
use:trackNavigationButtonsSize>
|
|
89
|
-
<button type="button" class="navigation-button" disabled={!buffer.canLoadPrevious} onclick={buffer.loadPrevious}>
|
|
90
|
-
<span class="navigation-button__icon">
|
|
91
|
-
<Icon src={IconChevronUp} />
|
|
92
|
-
</span>
|
|
93
|
-
</button>
|
|
94
|
-
<button type="button" class="navigation-button" disabled={!buffer.canLoadNext} onclick={buffer.loadNext}>
|
|
95
|
-
<span class="navigation-button__icon">
|
|
96
|
-
<Icon src={IconChevronDown} />
|
|
97
|
-
</span>
|
|
98
|
-
</button>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
{/if}
|
|
102
|
-
<div class="stream-player-controls__right" use:trackAttachmentsPanelSize>
|
|
103
|
-
{#if !uiManager.showShortVideoOverlayAttachments}
|
|
104
|
-
{#if playerLogo}
|
|
105
|
-
<div class="stream-player-controls__player-logo">
|
|
106
|
-
<img src={playerLogo} class="stream-player-controls__logo-img" alt="Player Logo" />
|
|
107
|
-
</div>
|
|
108
|
-
{/if}
|
|
109
|
-
{#if shortVideo?.hasAttachments && uiManager.showShortVideoAttachments}
|
|
110
|
-
<div class="stream-player-controls__short-video-attachments" transition:slideHorizontally|local>
|
|
111
|
-
<ShortVideoViewerAttachments
|
|
112
|
-
shortVideo={shortVideo}
|
|
113
|
-
locale={localization.shortVideoAttachmentsLocale}
|
|
114
|
-
on={{
|
|
115
|
-
productClick: on.productClick,
|
|
116
|
-
productImpression: on.productImpression
|
|
117
|
-
}} />
|
|
118
|
-
</div>
|
|
119
|
-
{/if}
|
|
120
|
-
{/if}
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
{/if}
|
|
124
|
-
|
|
125
|
-
{#if showCloseButton}
|
|
126
|
-
<button type="button" class="close-button" onclick={on.closePlayer}>
|
|
127
|
-
<Icon src={IconDismiss} />
|
|
128
|
-
</button>
|
|
129
|
-
{/if}
|
|
130
|
-
|
|
131
|
-
<style>@keyframes fadeIn {
|
|
132
|
-
0% {
|
|
133
|
-
opacity: 1;
|
|
134
|
-
}
|
|
135
|
-
50% {
|
|
136
|
-
opacity: 0.4;
|
|
137
|
-
}
|
|
138
|
-
100% {
|
|
139
|
-
opacity: 1;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
.stream-player-controls {
|
|
143
|
-
position: absolute;
|
|
144
|
-
top: 0;
|
|
145
|
-
right: 0;
|
|
146
|
-
height: 100%;
|
|
147
|
-
width: var(--stream-player--controls--available-space);
|
|
148
|
-
display: flex;
|
|
149
|
-
justify-content: space-between;
|
|
150
|
-
padding: var(--stream-player--controls--padding);
|
|
151
|
-
container-type: inline-size;
|
|
152
|
-
}
|
|
153
|
-
.stream-player-controls--with-logo {
|
|
154
|
-
padding-top: 0;
|
|
155
|
-
}
|
|
156
|
-
.stream-player-controls__left {
|
|
157
|
-
display: flex;
|
|
158
|
-
flex-direction: column;
|
|
159
|
-
gap: 2.3125rem;
|
|
160
|
-
justify-content: flex-end;
|
|
161
|
-
align-items: center;
|
|
162
|
-
padding-top: var(--stream-player--media-center-header--height);
|
|
163
|
-
opacity: var(--stream-player--elements-opacity);
|
|
164
|
-
transition: opacity 0.3s ease-in-out;
|
|
165
|
-
}
|
|
166
|
-
.stream-player-controls__right {
|
|
167
|
-
flex: 1;
|
|
168
|
-
display: flex;
|
|
169
|
-
justify-content: space-between;
|
|
170
|
-
align-items: flex-end;
|
|
171
|
-
flex-direction: column;
|
|
172
|
-
overflow-x: hidden;
|
|
173
|
-
overflow-y: auto;
|
|
174
|
-
scrollbar-color: transparent transparent;
|
|
175
|
-
scrollbar-width: thin;
|
|
176
|
-
scrollbar-gutter: stable;
|
|
177
|
-
}
|
|
178
|
-
.stream-player-controls__right::-webkit-scrollbar {
|
|
179
|
-
width: 3px;
|
|
180
|
-
height: 3px;
|
|
181
|
-
background: transparent;
|
|
182
|
-
}
|
|
183
|
-
.stream-player-controls__right::-webkit-scrollbar-thumb {
|
|
184
|
-
background: transparent;
|
|
185
|
-
}
|
|
186
|
-
.stream-player-controls__right:hover {
|
|
187
|
-
scrollbar-color: var(--custom-scrollbar-color, #7d7d7d) var(--custom-scrollbar-background, transparent);
|
|
188
|
-
scrollbar-width: thin;
|
|
189
|
-
}
|
|
190
|
-
.stream-player-controls__right:hover::-webkit-scrollbar {
|
|
191
|
-
width: 3px;
|
|
192
|
-
height: 3px;
|
|
193
|
-
background: var(--custom-scrollbar-background, transparent);
|
|
194
|
-
}
|
|
195
|
-
.stream-player-controls__right:hover::-webkit-scrollbar-thumb {
|
|
196
|
-
background: var(--custom-scrollbar-color, #7d7d7d);
|
|
197
|
-
}
|
|
198
|
-
.stream-player-controls__short-video-controls {
|
|
199
|
-
gap: 2.5rem;
|
|
200
|
-
display: flex;
|
|
201
|
-
flex: 1;
|
|
202
|
-
min-height: 0;
|
|
203
|
-
flex-direction: column;
|
|
204
|
-
align-items: flex-start;
|
|
205
|
-
justify-content: flex-end;
|
|
206
|
-
--short-video-controls--icon--size: 1.75rem;
|
|
207
|
-
}
|
|
208
|
-
.stream-player-controls__player-logo {
|
|
209
|
-
width: var(--stream-player--controls--attachments--max-width);
|
|
210
|
-
max-width: var(--stream-player--controls--attachments--max-width);
|
|
211
|
-
height: var(--stream-player--media-center-header--height);
|
|
212
|
-
min-height: var(--stream-player--media-center-header--height);
|
|
213
|
-
max-height: var(--stream-player--media-center-header--height);
|
|
214
|
-
display: flex;
|
|
215
|
-
justify-content: center;
|
|
216
|
-
align-items: center;
|
|
217
|
-
}
|
|
218
|
-
.stream-player-controls__logo-img {
|
|
219
|
-
width: 6.25rem;
|
|
220
|
-
min-width: 6.25rem;
|
|
221
|
-
max-width: 6.25rem;
|
|
222
|
-
}
|
|
223
|
-
.stream-player-controls__short-video-attachments {
|
|
224
|
-
flex: 1;
|
|
225
|
-
width: var(--stream-player--controls--attachments--max-width);
|
|
226
|
-
max-width: var(--stream-player--controls--attachments--max-width);
|
|
227
|
-
opacity: var(--stream-player--elements-opacity);
|
|
228
|
-
transition: opacity 0.3s ease-in-out;
|
|
229
|
-
}
|
|
230
|
-
.stream-player-controls__navigation-buttons {
|
|
231
|
-
display: flex;
|
|
232
|
-
flex-direction: column;
|
|
233
|
-
gap: 1rem;
|
|
234
|
-
z-index: 1;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.close-button {
|
|
238
|
-
width: 3rem;
|
|
239
|
-
min-width: 3rem;
|
|
240
|
-
max-width: 3rem;
|
|
241
|
-
height: 3rem;
|
|
242
|
-
min-height: 3rem;
|
|
243
|
-
max-height: 3rem;
|
|
244
|
-
background-color: rgba(0, 0, 0, 0.6);
|
|
245
|
-
border: 1px solid #1c1c1c;
|
|
246
|
-
border-radius: 50%;
|
|
247
|
-
text-align: center;
|
|
248
|
-
--icon--color: #ffffff;
|
|
249
|
-
--icon--size: 1.75rem;
|
|
250
|
-
position: absolute;
|
|
251
|
-
top: 0.9375rem;
|
|
252
|
-
left: calc(var(--stream-player--overview--width) + 0.625rem);
|
|
253
|
-
z-index: 1;
|
|
254
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
255
|
-
}
|
|
256
|
-
.close-button:hover {
|
|
257
|
-
background-color: rgba(0, 0, 0, 0.9);
|
|
258
|
-
transition: background-color 0.5s;
|
|
259
|
-
}
|
|
260
|
-
.close-button:disabled {
|
|
261
|
-
opacity: 0.5;
|
|
262
|
-
cursor: default;
|
|
263
|
-
}
|
|
264
|
-
@container (width < 576px) {
|
|
265
|
-
.close-button {
|
|
266
|
-
left: unset;
|
|
267
|
-
right: 0.625rem;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.navigation-button {
|
|
272
|
-
--_icon-scale: 1;
|
|
273
|
-
width: 3rem;
|
|
274
|
-
min-width: 3rem;
|
|
275
|
-
max-width: 3rem;
|
|
276
|
-
height: 3rem;
|
|
277
|
-
min-height: 3rem;
|
|
278
|
-
max-height: 3rem;
|
|
279
|
-
background-color: rgba(0, 0, 0, 0.6);
|
|
280
|
-
border: 1px solid #1c1c1c;
|
|
281
|
-
border-radius: 50%;
|
|
282
|
-
text-align: center;
|
|
283
|
-
--icon--color: #ffffff;
|
|
284
|
-
--icon--size: 1.75rem;
|
|
285
|
-
}
|
|
286
|
-
.navigation-button:hover {
|
|
287
|
-
background-color: rgba(0, 0, 0, 0.9);
|
|
288
|
-
transition: background-color 0.5s;
|
|
289
|
-
}
|
|
290
|
-
.navigation-button:disabled {
|
|
291
|
-
opacity: 0.5;
|
|
292
|
-
cursor: default;
|
|
293
|
-
}
|
|
294
|
-
.navigation-button:hover:not(:disabled) {
|
|
295
|
-
--_icon-scale: 1.2;
|
|
296
|
-
}
|
|
297
|
-
.navigation-button__icon {
|
|
298
|
-
display: block;
|
|
299
|
-
transform: scale(var(--_icon-scale));
|
|
300
|
-
transition: 0.3s;
|
|
301
|
-
}</style>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type IPostSocialInteractionsHandler } from '../../short-videos/short-video-viewer';
|
|
2
|
-
import type { StreamPlayerBuffer } from './stream-player-buffer.svelte';
|
|
3
|
-
import { StreamPlayerLocalization } from './stream-player-localization';
|
|
4
|
-
import type { StreamPlayerUiManager } from './ui-manager.svelte';
|
|
5
|
-
type Props = {
|
|
6
|
-
buffer: StreamPlayerBuffer;
|
|
7
|
-
uiManager: StreamPlayerUiManager;
|
|
8
|
-
postSocialInteractionsHandler?: IPostSocialInteractionsHandler;
|
|
9
|
-
localization: StreamPlayerLocalization;
|
|
10
|
-
playerLogo: string | null;
|
|
11
|
-
showCloseButton: boolean;
|
|
12
|
-
on: {
|
|
13
|
-
closePlayer: () => void;
|
|
14
|
-
productClick?: (productId: string) => void;
|
|
15
|
-
productImpression?: (productId: string) => void;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
declare const Controls: import("svelte").Component<Props, {}, "">;
|
|
19
|
-
type Controls = ReturnType<typeof Controls>;
|
|
20
|
-
export default Controls;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
@mixin default-opacity {
|
|
2
|
-
--stream-player--elements-opacity: 1;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
@mixin fade-opacity {
|
|
6
|
-
--stream-player--elements-opacity: 0;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@mixin handle-fade {
|
|
10
|
-
opacity: var(--stream-player--elements-opacity);
|
|
11
|
-
transition: opacity 0.3s ease-in-out;
|
|
12
|
-
}
|