@streamscloud/embeddable 7.0.1 → 7.0.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.
- package/dist/media-center/config/internal-media-center-config.js +2 -1
- package/dist/short-videos/short-videos-player/button-mixins.scss +24 -0
- package/dist/short-videos/short-videos-player/controls.svelte +10 -2
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +1 -0
- package/dist/short-videos/short-videos-player/short-videos-player-view.svelte +33 -1
- package/dist/short-videos/short-videos-player/short-videos-player-view.svelte.d.ts +1 -0
- package/dist/streams/stream-player/stream-overview.svelte +3 -2
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +1 -0
- package/dist/streams/stream-player/stream-player.svelte +2 -0
- package/package.json +1 -1
|
@@ -48,7 +48,8 @@ export class InternalMediaCenterConfig {
|
|
|
48
48
|
mediaPageId: this.mediaPageId,
|
|
49
49
|
categoryId: filter.categoryId,
|
|
50
50
|
excludeIds: filter.excludeIds,
|
|
51
|
-
statuses: [StreamStatus.Published]
|
|
51
|
+
statuses: [StreamStatus.Published],
|
|
52
|
+
showInFeed: true
|
|
52
53
|
},
|
|
53
54
|
limit,
|
|
54
55
|
continuationToken
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use 'src/styles/functions';
|
|
2
|
+
@use 'src/styles/mixins';
|
|
3
|
+
@use 'src/styles/colors';
|
|
4
|
+
|
|
5
|
+
@mixin button() {
|
|
6
|
+
@include mixins.width(functions.rem(48));
|
|
7
|
+
@include mixins.height(functions.rem(48));
|
|
8
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
9
|
+
border: 1px solid colors.$color-gray-900;
|
|
10
|
+
border-radius: 50%;
|
|
11
|
+
text-align: center;
|
|
12
|
+
--icon--color: #{colors.$color-white};
|
|
13
|
+
--icon--size: #{functions.rem(28)};
|
|
14
|
+
|
|
15
|
+
&:hover {
|
|
16
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
17
|
+
transition: background-color 0.5s;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:disabled {
|
|
21
|
+
opacity: 0.5;
|
|
22
|
+
cursor: default;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -5,7 +5,7 @@ import { ShortVideosPlayerLocalization } from './short-videos-player-localizatio
|
|
|
5
5
|
import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg?raw';
|
|
6
6
|
import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg?raw';
|
|
7
7
|
import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg?raw';
|
|
8
|
-
let { buffer, uiManager, localization, socialInteractionsHandler, playerLogo, on } = $props();
|
|
8
|
+
let { buffer, uiManager, localization, socialInteractionsHandler, playerLogo, showCloseButton, on } = $props();
|
|
9
9
|
const shortVideo = $derived(buffer.current);
|
|
10
10
|
const changeShowAttachments = () => {
|
|
11
11
|
uiManager.showAttachments = !uiManager.showAttachments;
|
|
@@ -85,7 +85,7 @@ const trackNavigationButtonsSize = (node) => {
|
|
|
85
85
|
</div>
|
|
86
86
|
{/if}
|
|
87
87
|
|
|
88
|
-
{#if on.closePlayer}
|
|
88
|
+
{#if on.closePlayer && showCloseButton}
|
|
89
89
|
<button type="button" class="close-button" onclick={on.closePlayer}>
|
|
90
90
|
<Icon src={IconDismiss} />
|
|
91
91
|
</button>
|
|
@@ -217,6 +217,10 @@ const trackNavigationButtonsSize = (node) => {
|
|
|
217
217
|
z-index: 1;
|
|
218
218
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
219
219
|
}
|
|
220
|
+
.close-button:hover {
|
|
221
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
222
|
+
transition: background-color 0.5s;
|
|
223
|
+
}
|
|
220
224
|
.close-button:disabled {
|
|
221
225
|
opacity: 0.5;
|
|
222
226
|
cursor: default;
|
|
@@ -247,6 +251,10 @@ const trackNavigationButtonsSize = (node) => {
|
|
|
247
251
|
--icon--color: #ffffff;
|
|
248
252
|
--icon--size: 1.75rem;
|
|
249
253
|
}
|
|
254
|
+
.navigation-button:hover {
|
|
255
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
256
|
+
transition: background-color 0.5s;
|
|
257
|
+
}
|
|
250
258
|
.navigation-button:disabled {
|
|
251
259
|
opacity: 0.5;
|
|
252
260
|
cursor: default;
|
|
@@ -9,6 +9,7 @@ type Props = {
|
|
|
9
9
|
localization: ShortVideosPlayerLocalization;
|
|
10
10
|
socialInteractionsHandler?: IPostSocialInteractionsHandler;
|
|
11
11
|
playerLogo: string | null;
|
|
12
|
+
showCloseButton: boolean;
|
|
12
13
|
on: {
|
|
13
14
|
closePlayer?: () => void;
|
|
14
15
|
productClick?: (productId: string) => void;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { handleEsc } from '../../core/document.event-handlers';
|
|
11
11
|
import { preloadImage } from '../../core/image-preloader';
|
|
12
12
|
import { ShortVideoViewer } from '../short-video-viewer';
|
|
13
|
+
import { Icon } from '../../ui/icon';
|
|
13
14
|
import { Loading } from '../../ui/loading';
|
|
14
15
|
import { PlayerBuffer, PlayerSlider } from '../../ui/player';
|
|
15
16
|
import { SpotlightLayout } from '../../ui/spotlight-layout';
|
|
@@ -18,6 +19,7 @@ import { default as Controls } from './controls.svelte';
|
|
|
18
19
|
import { InternalShortVideoPlayerProvider } from './internal-short-video-player-provider';
|
|
19
20
|
import { ShortVideosPlayerLocalization } from './short-videos-player-localization';
|
|
20
21
|
import { ShortVideosPlayerUiManager } from './ui-manager.svelte';
|
|
22
|
+
import IconDismiss from '@fluentui/svg-icons/icons/dismiss_28_regular.svg?raw';
|
|
21
23
|
import { untrack } from 'svelte';
|
|
22
24
|
let { dataProvider, socialInteractionsHandler, locale = 'en', showStreamsCloudWatermark, disableBackground, analyticsHandler, on, categoriesSwitcher, playerLogo = null, fadeContent = false } = $props();
|
|
23
25
|
const localization = $derived(new ShortVideosPlayerLocalization(locale));
|
|
@@ -114,10 +116,16 @@ const onShortVideoAdImpression = (adId) => {
|
|
|
114
116
|
class:short-videos-player-container--faded={fadeContent}
|
|
115
117
|
style={background && !disableBackground ? `--background-image: url(${background})` : null}>
|
|
116
118
|
{#if categoriesSwitcher}
|
|
119
|
+
{#snippet closeButton()}
|
|
120
|
+
<button type="button" class="close-button" onclick={onPlayerClose}>
|
|
121
|
+
<Icon src={IconDismiss} />
|
|
122
|
+
</button>
|
|
123
|
+
{/snippet}
|
|
117
124
|
<div class="short-videos-player-container__media-center">
|
|
118
125
|
{@render categoriesSwitcher({
|
|
119
126
|
maxItemsWidth: Math.min(uiManager.mainViewColumnWidth * 1.4, uiManager.viewTotalWidth),
|
|
120
|
-
onMounted: onMediaCenterHeaderMounted
|
|
127
|
+
onMounted: onMediaCenterHeaderMounted,
|
|
128
|
+
closeButton: on?.playerClosed && closeButton
|
|
121
129
|
})}
|
|
122
130
|
</div>
|
|
123
131
|
{/if}
|
|
@@ -165,6 +173,7 @@ const onShortVideoAdImpression = (adId) => {
|
|
|
165
173
|
localization={localization}
|
|
166
174
|
socialInteractionsHandler={socialInteractionsHandler}
|
|
167
175
|
playerLogo={playerLogo}
|
|
176
|
+
showCloseButton={!categoriesSwitcher}
|
|
168
177
|
on={{
|
|
169
178
|
closePlayer: on?.playerClosed,
|
|
170
179
|
productClick: (productId) => onShortVideoProductClick(productId, buffer?.current?.id || ''),
|
|
@@ -246,4 +255,27 @@ const onShortVideoAdImpression = (adId) => {
|
|
|
246
255
|
height: 100%;
|
|
247
256
|
opacity: var(--short-videos-player--elements-opacity);
|
|
248
257
|
transition: opacity 0.3s ease-in-out;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.close-button {
|
|
261
|
+
width: 3rem;
|
|
262
|
+
min-width: 3rem;
|
|
263
|
+
max-width: 3rem;
|
|
264
|
+
height: 3rem;
|
|
265
|
+
min-height: 3rem;
|
|
266
|
+
max-height: 3rem;
|
|
267
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
268
|
+
border: 1px solid #1c1c1c;
|
|
269
|
+
border-radius: 50%;
|
|
270
|
+
text-align: center;
|
|
271
|
+
--icon--color: #ffffff;
|
|
272
|
+
--icon--size: 1.75rem;
|
|
273
|
+
}
|
|
274
|
+
.close-button:hover {
|
|
275
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
276
|
+
transition: background-color 0.5s;
|
|
277
|
+
}
|
|
278
|
+
.close-button:disabled {
|
|
279
|
+
opacity: 0.5;
|
|
280
|
+
cursor: default;
|
|
249
281
|
}</style>
|
|
@@ -7,7 +7,7 @@ import { ProportionalContainer } from '../../ui/proportional-container';
|
|
|
7
7
|
import { TimeAgo } from '../../ui/time-ago';
|
|
8
8
|
import { StreamPlayerLocalization } from './stream-player-localization';
|
|
9
9
|
import IconPanelLeftText from '@fluentui/svg-icons/icons/panel_left_text_20_regular.svg?raw';
|
|
10
|
-
let { model, buffer, activePageId, on, uiManager, localization } = $props();
|
|
10
|
+
let { model, buffer, activePageId, contentFaded, on, uiManager, localization } = $props();
|
|
11
11
|
const overviewAttached = (node) => {
|
|
12
12
|
const resizeObserver = new ResizeObserver(() => {
|
|
13
13
|
on.widthChanged(node.clientWidth);
|
|
@@ -16,12 +16,13 @@ const overviewAttached = (node) => {
|
|
|
16
16
|
return {
|
|
17
17
|
destroy() {
|
|
18
18
|
resizeObserver.disconnect();
|
|
19
|
+
on.widthChanged(0);
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
};
|
|
22
23
|
</script>
|
|
23
24
|
|
|
24
|
-
{#if !uiManager.overviewCollapsed}
|
|
25
|
+
{#if !uiManager.overviewCollapsed && !contentFaded}
|
|
25
26
|
<div class="stream-overview" transition:slideHorizontally|local use:overviewAttached>
|
|
26
27
|
<div class="stream-overview-info">
|
|
27
28
|
<div class="stream-overview-owner">
|
|
@@ -52,6 +52,7 @@ const resetInactivityTimer = () => {
|
|
|
52
52
|
};
|
|
53
53
|
$effect(() => {
|
|
54
54
|
void dataProvider;
|
|
55
|
+
void streamId;
|
|
55
56
|
untrack(() => {
|
|
56
57
|
initBuffer(dataProvider);
|
|
57
58
|
});
|
|
@@ -273,6 +274,7 @@ const onProgress = (pageId, videoId, progress) => {
|
|
|
273
274
|
<Overview
|
|
274
275
|
model={model}
|
|
275
276
|
buffer={buffer}
|
|
277
|
+
contentFaded={fadeContent}
|
|
276
278
|
activePageId={activePageId}
|
|
277
279
|
uiManager={uiManager}
|
|
278
280
|
localization={localization}
|