@streamscloud/embeddable 15.0.1 → 15.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/ads/ad-card/cmp.ad-card.svelte +7 -9
- package/dist/external-api/data-providers/internal-media-center-analytics-handler.d.ts +14 -14
- package/dist/external-api/data-providers/internal-post-analytics-handler.d.ts +6 -6
- package/dist/external-api/data-providers/internal-stream-analytics-handler.d.ts +13 -13
- package/dist/media-center/media-center/cmp.media-center-proxy.svelte +4 -5
- package/dist/media-center/media-center/discover/community-features.svelte +12 -21
- package/dist/media-center/media-center/discover/discover-view.svelte +44 -35
- package/dist/media-center/media-center/handlers/categories-handler.svelte.js +2 -1
- package/dist/media-center/media-center/header/media-center-header-mobile.svelte +2 -4
- package/dist/media-center/media-center/header/media-center-header.svelte +4 -6
- package/dist/media-center/media-center/media-center-context.svelte.js +2 -1
- package/dist/media-center/media-center/media-center-view.svelte +5 -14
- package/dist/media-center/media-center/menu/category-following-wrapper.svelte +7 -16
- package/dist/media-center/media-center/menu/menu.svelte +5 -3
- package/dist/media-center/media-center/moments/cmp.moments-circle.svelte +1 -1
- package/dist/media-center/media-center/moments/moments-state.svelte.js +2 -1
- package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte +6 -2
- package/dist/media-page/cmp.media-page.svelte +6 -15
- package/dist/posts/controls/post-actions-generator.svelte.js +2 -1
- package/dist/posts/post-viewer/attachments-horizontal.svelte +23 -26
- package/dist/posts/post-viewer/media/post-media.svelte +5 -3
- package/dist/posts/posts-player/cmp.posts-player.svelte +4 -13
- package/dist/posts/posts-player/posts-player-proxy.svelte +2 -3
- package/dist/posts/posts-player/posts-player-view.svelte +36 -47
- package/dist/products/product-card/cmp.product-card.svelte +6 -7
- package/dist/short-videos/short-video-card/cmp.short-video-card.svelte +1 -1
- package/dist/streams/controls/stream-actions-generator.svelte.js +2 -1
- package/dist/streams/layout/cmp.slot-content.svelte +5 -6
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +2 -3
- package/dist/streams/layout/element-views/cmp.products-slider-stream-element.svelte +1 -1
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +4 -7
- package/dist/streams/layout/element-views/price-element-view.svelte +14 -27
- package/dist/streams/streams-player/cmp.streams-player.svelte +4 -13
- package/dist/streams/streams-player/streams-player-proxy.svelte +2 -3
- package/dist/streams/streams-player/streams-player-view.svelte +44 -57
- package/dist/ui/button/resources/button-theme.svelte +4 -2
- package/dist/ui/dropdown/cmp.dropdown.svelte +4 -6
- package/dist/ui/icon/cmp.icon.svelte +1 -1
- package/dist/ui/image/cmp.image.svelte +2 -2
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte +6 -15
- package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte +2 -2
- package/dist/ui/media-item-view/cmp.media-item-view.svelte +1 -1
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +6 -15
- package/dist/ui/player/button/cmp.player-button.svelte +3 -1
- package/dist/ui/player/button/cmp.player-buttons-group.svelte +3 -1
- package/dist/ui/player/close-orchestrator/close-orchestrator.svelte.js +2 -1
- package/dist/ui/player/player/cmp.player.svelte +2 -3
- package/dist/ui/player/player/cmp.player.svelte.d.ts +1 -1
- package/dist/ui/player/player/controls-and-attachments.svelte +2 -2
- package/dist/ui/player/player/overview-panel.svelte +3 -1
- package/dist/ui/player/slider/cmp.player-slider.svelte +6 -7
- package/dist/ui/player/slider-horizontal/cmp.slider.svelte +14 -11
- package/dist/ui/seek-bar/cmp.seek-bar.svelte +7 -9
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte +2 -2
- package/dist/ui/video/cmp.video.svelte +17 -29
- package/package.json +41 -39
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
<script lang="ts">import { handleEsc } from '../../../core/document.event-handlers';
|
|
1
|
+
<script lang="ts" generics="T extends { id: string }">import { handleEsc } from '../../../core/document.event-handlers';
|
|
2
2
|
import { Loading } from '../../loading';
|
|
3
3
|
import { PlayerSlider } from '../slider';
|
|
4
4
|
import { SwipeIndicator } from '../../swipe-indicator';
|
|
5
5
|
import { default as ControlsAndAttachments } from './controls-and-attachments.svelte';
|
|
6
6
|
import { default as OverviewPanel } from './overview-panel.svelte';
|
|
7
|
-
import {} from 'svelte';
|
|
8
7
|
let { config, itemActions, itemView, attachmentsView, overviewPanelContent } = $props();
|
|
9
8
|
let everTouched = $state(false);
|
|
10
9
|
let overviewPosition = $state({
|
|
@@ -12,7 +11,7 @@ let overviewPosition = $state({
|
|
|
12
11
|
bottom: 0,
|
|
13
12
|
right: 0
|
|
14
13
|
});
|
|
15
|
-
const uiManager = config.uiManager;
|
|
14
|
+
const uiManager = $derived(config.uiManager);
|
|
16
15
|
const handlePlayerMounted = (node) => {
|
|
17
16
|
const markAsTouched = () => {
|
|
18
17
|
everTouched = true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script lang="ts">import { slideHorizontally } from '../../../core/transitions';
|
|
1
|
+
<script lang="ts" generics="T extends { id: string }">import { slideHorizontally } from '../../../core/transitions';
|
|
2
2
|
import { PlayerButton, ResponsivePlayerButtonsGroup } from '../button';
|
|
3
3
|
import { PlayerConfig } from './player-config.svelte.js';
|
|
4
4
|
import IconCalendarWeekNumbers from '@fluentui/svg-icons/icons/calendar_week_numbers_24_regular.svg?raw';
|
|
@@ -6,7 +6,7 @@ import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_28_regular.s
|
|
|
6
6
|
import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_28_regular.svg?raw';
|
|
7
7
|
import IconDismiss from '@fluentui/svg-icons/icons/dismiss_28_regular.svg?raw';
|
|
8
8
|
let { config, hasOverview, itemActions, attachmentsView } = $props();
|
|
9
|
-
const uiManager = config.uiManager;
|
|
9
|
+
const uiManager = $derived(config.uiManager);
|
|
10
10
|
let closeButtonAreaHeight = $state(0);
|
|
11
11
|
const allActions = $derived.by(() => {
|
|
12
12
|
const actions = [...itemActions];
|
|
@@ -59,7 +59,6 @@ const styles = $derived.by(() => {
|
|
|
59
59
|
z-index: 0;
|
|
60
60
|
border-radius: 0.5rem 0 0 0.5rem;
|
|
61
61
|
background: var(--_overview-panel--background);
|
|
62
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
63
62
|
}
|
|
64
63
|
.overview-panel__content {
|
|
65
64
|
width: 100%;
|
|
@@ -71,6 +70,9 @@ const styles = $derived.by(() => {
|
|
|
71
70
|
overflow: hidden;
|
|
72
71
|
container-type: inline-size;
|
|
73
72
|
}
|
|
73
|
+
.overview-panel {
|
|
74
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
75
|
+
}
|
|
74
76
|
@container (width < 576px) {
|
|
75
77
|
.overview-panel {
|
|
76
78
|
width: 100%;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<script lang="ts">import { TouchSynchronizer } from '../utils';
|
|
1
|
+
<script lang="ts" generics="T extends { id: string }">import { TouchSynchronizer } from '../utils';
|
|
2
2
|
import { createWheelAdapter } from './wheel-gestures-adapter';
|
|
3
3
|
import { onDestroy, onMount, untrack } from 'svelte';
|
|
4
4
|
let { buffer, on, children } = $props();
|
|
5
5
|
let slidesRef;
|
|
6
6
|
let sliderHeight = $state(0);
|
|
7
7
|
let swipeTransition = $state(0);
|
|
8
|
-
let cssAnimationDuration = $
|
|
8
|
+
let cssAnimationDuration = $derived(buffer.animationDuration * 0.55);
|
|
9
9
|
let resizeObserver;
|
|
10
|
-
let sliderIndex = $state.raw(buffer.currentIndex);
|
|
10
|
+
let sliderIndex = $state.raw(untrack(() => buffer.currentIndex));
|
|
11
11
|
const actualTransition = $derived(-sliderHeight * sliderIndex);
|
|
12
12
|
const onKeyPress = (e) => {
|
|
13
13
|
if (e.key === 'ArrowUp' || e.key === 'PageUp') {
|
|
@@ -30,13 +30,12 @@ $effect(() => {
|
|
|
30
30
|
sliderIndex = buffer.currentIndex;
|
|
31
31
|
});
|
|
32
32
|
const notifyOnItemChanged = () => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
(_b = on === null || on === void 0 ? void 0 : on.itemDeactivated) === null || _b === void 0 ? void 0 : _b.call(on, active.id);
|
|
33
|
+
if (active && buffer.current?.id !== active.id) {
|
|
34
|
+
on?.itemDeactivated?.(active.id);
|
|
36
35
|
}
|
|
37
36
|
active = buffer.current;
|
|
38
37
|
if (active) {
|
|
39
|
-
|
|
38
|
+
on?.itemActivated?.(active.id);
|
|
40
39
|
}
|
|
41
40
|
};
|
|
42
41
|
onMount(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script lang="ts">import { runningInBrowser } from '../../../core/browser';
|
|
1
|
+
<script lang="ts" generics="T">import { runningInBrowser } from '../../../core/browser';
|
|
2
2
|
import { Utils } from '../../../core/utils';
|
|
3
3
|
import { HtmlHelper } from '../../../core/utils/html-helper';
|
|
4
4
|
import { Icon } from '../../icon';
|
|
@@ -7,7 +7,7 @@ import { SliderLocalization } from './slider-localization';
|
|
|
7
7
|
import { SliderMode } from './types';
|
|
8
8
|
import IconChevronLeft from '@fluentui/svg-icons/icons/chevron_left_20_regular.svg?raw';
|
|
9
9
|
import IconChevronRight from '@fluentui/svg-icons/icons/chevron_right_20_regular.svg?raw';
|
|
10
|
-
import { onDestroy, onMount } from 'svelte';
|
|
10
|
+
import { onDestroy, onMount, untrack } from 'svelte';
|
|
11
11
|
let { items, sliderMode = SliderMode.ArrowsWithCounts, dotsConfig = {
|
|
12
12
|
activeHtml: '<i class="fa-solid fa-circle" tabindex="0"></i>',
|
|
13
13
|
inactiveHtml: '<i class="fa-regular fa-circle" tabindex="0"></i>'
|
|
@@ -16,7 +16,7 @@ const localization = $derived.by(() => new SliderLocalization(locale));
|
|
|
16
16
|
const itemIndices = $derived(items.map((_, index) => index));
|
|
17
17
|
const animationDuration = 300;
|
|
18
18
|
let previousItems = $state.raw(undefined);
|
|
19
|
-
let selectedIndex = $state(initialIndex);
|
|
19
|
+
let selectedIndex = $state(untrack(() => initialIndex));
|
|
20
20
|
let animationIndex = $state(null);
|
|
21
21
|
let interval;
|
|
22
22
|
let slidesRef;
|
|
@@ -26,7 +26,7 @@ let resizeObserver;
|
|
|
26
26
|
onMount(() => {
|
|
27
27
|
notifyIndexChanged();
|
|
28
28
|
setTimeout(() => {
|
|
29
|
-
slidesRef
|
|
29
|
+
slidesRef?.classList.toggle('animate', false);
|
|
30
30
|
});
|
|
31
31
|
let touchStartX = 0;
|
|
32
32
|
let touchStartY = 0;
|
|
@@ -114,12 +114,12 @@ onMount(() => {
|
|
|
114
114
|
animationIndex = null;
|
|
115
115
|
}
|
|
116
116
|
setTimeout(() => {
|
|
117
|
-
slidesRef
|
|
117
|
+
slidesRef?.classList.toggle('animate', true);
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
120
|
if (autoSlideMs) {
|
|
121
121
|
interval = window.setInterval(() => {
|
|
122
|
-
if (
|
|
122
|
+
if (items?.length <= 1) {
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
loadNext();
|
|
@@ -134,7 +134,7 @@ onMount(() => {
|
|
|
134
134
|
slidesRef.classList.toggle('animate', false);
|
|
135
135
|
sliderWidth = slidesRef.getBoundingClientRect().width;
|
|
136
136
|
resizeTimeout = window.setTimeout(() => {
|
|
137
|
-
slidesRef
|
|
137
|
+
slidesRef?.classList.toggle('animate', true);
|
|
138
138
|
});
|
|
139
139
|
});
|
|
140
140
|
resizeObserver.observe(slidesRef);
|
|
@@ -162,8 +162,7 @@ const onKeyPress = Utils.throttle((e) => {
|
|
|
162
162
|
}
|
|
163
163
|
}, animationDuration);
|
|
164
164
|
const notifyIndexChanged = () => {
|
|
165
|
-
|
|
166
|
-
(_a = on === null || on === void 0 ? void 0 : on.indexChanged) === null || _a === void 0 ? void 0 : _a.call(on, selectedIndex);
|
|
165
|
+
on?.indexChanged?.(selectedIndex);
|
|
167
166
|
};
|
|
168
167
|
notifyIndexChanged();
|
|
169
168
|
const setIndex = (index) => {
|
|
@@ -284,7 +283,6 @@ const showClassicArrowsAndDots = $derived([SliderMode.ArrowsAndDots, SliderMode.
|
|
|
284
283
|
width: 100%;
|
|
285
284
|
height: 100%;
|
|
286
285
|
overflow: hidden;
|
|
287
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
288
286
|
}
|
|
289
287
|
.slider__slides {
|
|
290
288
|
display: flex;
|
|
@@ -377,12 +375,14 @@ const showClassicArrowsAndDots = $derived([SliderMode.ArrowsAndDots, SliderMode.
|
|
|
377
375
|
text-align: center;
|
|
378
376
|
color: var(--sc-mc-color--text-white);
|
|
379
377
|
visibility: hidden;
|
|
380
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
381
378
|
}
|
|
382
379
|
.slider__counts-navigation-button:disabled {
|
|
383
380
|
opacity: 0.5;
|
|
384
381
|
cursor: default;
|
|
385
382
|
}
|
|
383
|
+
.slider__counts-navigation-button {
|
|
384
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
385
|
+
}
|
|
386
386
|
@container (width < 576px) {
|
|
387
387
|
.slider__counts-navigation-button {
|
|
388
388
|
visibility: visible;
|
|
@@ -411,6 +411,9 @@ const showClassicArrowsAndDots = $derived([SliderMode.ArrowsAndDots, SliderMode.
|
|
|
411
411
|
position: static;
|
|
412
412
|
margin-top: 1rem;
|
|
413
413
|
}
|
|
414
|
+
.slider {
|
|
415
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
416
|
+
}
|
|
414
417
|
@container (width < 576px) {
|
|
415
418
|
.slider__navigation-button {
|
|
416
419
|
visibility: visible;
|
|
@@ -12,7 +12,7 @@ const handleSeek = (e) => {
|
|
|
12
12
|
const { left, width } = progressRef.getBoundingClientRect();
|
|
13
13
|
const x = e.clientX - left;
|
|
14
14
|
const percent = Math.max(0, Math.min(1, x / width));
|
|
15
|
-
on
|
|
15
|
+
on?.seek(percent);
|
|
16
16
|
};
|
|
17
17
|
const handleParentClick = (e) => {
|
|
18
18
|
e.preventDefault();
|
|
@@ -24,7 +24,7 @@ const handleParentClick = (e) => {
|
|
|
24
24
|
if (e.clientX >= seekBarRect.left && e.clientX <= seekBarRect.right) {
|
|
25
25
|
const x = e.clientX - seekBarRect.left;
|
|
26
26
|
const percent = Math.max(0, Math.min(1, x / seekBarRect.width));
|
|
27
|
-
on
|
|
27
|
+
on?.seek(percent);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
const onMouseMove = (e) => {
|
|
@@ -33,21 +33,19 @@ const onMouseMove = (e) => {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
const onMouseUp = () => {
|
|
36
|
-
var _a;
|
|
37
36
|
isDragging = false;
|
|
38
37
|
window.removeEventListener('mousemove', onMouseMove);
|
|
39
38
|
window.removeEventListener('mouseup', onMouseUp);
|
|
40
|
-
scrubberRef
|
|
41
|
-
|
|
39
|
+
scrubberRef?.blur();
|
|
40
|
+
on?.dragEnd?.();
|
|
42
41
|
};
|
|
43
42
|
const onMouseDown = (e) => {
|
|
44
|
-
var _a;
|
|
45
43
|
isDragging = true;
|
|
46
|
-
|
|
44
|
+
on?.dragStart?.();
|
|
47
45
|
handleSeek(e);
|
|
48
46
|
window.addEventListener('mousemove', onMouseMove);
|
|
49
47
|
window.addEventListener('mouseup', onMouseUp);
|
|
50
|
-
scrubberRef
|
|
48
|
+
scrubberRef?.blur();
|
|
51
49
|
};
|
|
52
50
|
const handleScrubberKeyDown = (event) => {
|
|
53
51
|
const step = 0.05;
|
|
@@ -66,7 +64,7 @@ const handleScrubberKeyDown = (event) => {
|
|
|
66
64
|
}
|
|
67
65
|
if (newValue !== undefined) {
|
|
68
66
|
event.preventDefault();
|
|
69
|
-
on
|
|
67
|
+
on?.seek(newValue);
|
|
70
68
|
}
|
|
71
69
|
};
|
|
72
70
|
$effect(() => {
|
|
@@ -38,7 +38,7 @@ const styles = $derived.by(() => {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
:host,
|
|
41
|
-
:global([data-theme=
|
|
41
|
+
:global([data-theme='default']) {
|
|
42
42
|
/* Backgrounds */
|
|
43
43
|
--sc-mc-color--bg-button: #ffffff;
|
|
44
44
|
--sc-mc-color--bg-card: #ffffff;
|
|
@@ -72,7 +72,7 @@ const styles = $derived.by(() => {
|
|
|
72
72
|
--sc-mc-color--text-inactive: #e5e7eb;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
:global([data-theme=
|
|
75
|
+
:global([data-theme='dark']) {
|
|
76
76
|
/* Backgrounds */
|
|
77
77
|
--sc-mc-color--bg-button: #111827;
|
|
78
78
|
--sc-mc-color--bg-card: #000000;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { randomNanoid } from '../../core/utils/string-generator';
|
|
1
|
+
<script lang="ts">import { randomNanoid } from '../../core/utils/string-generator';
|
|
11
2
|
import { Icon, IconColor } from '../icon';
|
|
12
3
|
import { MediaVolumeManager, PlaybackManager } from '../media-playback';
|
|
13
4
|
import { SeekBar } from '../seek-bar';
|
|
@@ -20,7 +11,6 @@ import { onDestroy, onMount, untrack } from 'svelte';
|
|
|
20
11
|
import { fade } from 'svelte/transition';
|
|
21
12
|
let { src, poster, id = randomNanoid(), controls = true, autoplay = false, loop = false, inert = false, hideSpeaker = false, intersectionContainer, scrubberPosition = ScrubberPosition.Bottom, on } = $props();
|
|
22
13
|
onMount(() => {
|
|
23
|
-
var _a;
|
|
24
14
|
PlaybackManager.registerMountedPlayer(id, {
|
|
25
15
|
onPlay: () => {
|
|
26
16
|
play();
|
|
@@ -47,7 +37,7 @@ onMount(() => {
|
|
|
47
37
|
setMuted(false);
|
|
48
38
|
}
|
|
49
39
|
});
|
|
50
|
-
|
|
40
|
+
on?.loaded?.({ id, src });
|
|
51
41
|
if (videoContainerRef) {
|
|
52
42
|
intersectionObserver.observe(videoContainerRef);
|
|
53
43
|
}
|
|
@@ -57,7 +47,7 @@ onDestroy(() => {
|
|
|
57
47
|
PlaybackManager.unregisterPlayer(id);
|
|
58
48
|
intersectionObserver.disconnect();
|
|
59
49
|
}
|
|
60
|
-
catch
|
|
50
|
+
catch {
|
|
61
51
|
// ignore
|
|
62
52
|
}
|
|
63
53
|
});
|
|
@@ -70,7 +60,7 @@ let everActivated = $state(false);
|
|
|
70
60
|
$effect(() => {
|
|
71
61
|
void src;
|
|
72
62
|
untrack(() => {
|
|
73
|
-
if (video
|
|
63
|
+
if (video?.src) {
|
|
74
64
|
video.src = src;
|
|
75
65
|
}
|
|
76
66
|
});
|
|
@@ -121,18 +111,18 @@ const intersectionObserver = new IntersectionObserver((entries) => {
|
|
|
121
111
|
}
|
|
122
112
|
}
|
|
123
113
|
}, {
|
|
124
|
-
root: intersectionContainer,
|
|
114
|
+
root: untrack(() => intersectionContainer),
|
|
125
115
|
rootMargin: '0px',
|
|
126
116
|
threshold: [0.1, 0.4, 0.6]
|
|
127
117
|
});
|
|
128
|
-
const play = () =>
|
|
118
|
+
const play = async () => {
|
|
129
119
|
if (!video) {
|
|
130
120
|
return;
|
|
131
121
|
}
|
|
132
122
|
try {
|
|
133
|
-
|
|
123
|
+
await video.play();
|
|
134
124
|
}
|
|
135
|
-
catch
|
|
125
|
+
catch {
|
|
136
126
|
// can't play video without interaction with document, just ignoring the error
|
|
137
127
|
}
|
|
138
128
|
finally {
|
|
@@ -146,9 +136,9 @@ const play = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
146
136
|
}
|
|
147
137
|
everActivated = true;
|
|
148
138
|
}
|
|
149
|
-
}
|
|
139
|
+
};
|
|
150
140
|
const pause = () => {
|
|
151
|
-
video
|
|
141
|
+
video?.pause();
|
|
152
142
|
};
|
|
153
143
|
const stop = () => {
|
|
154
144
|
if (!video) {
|
|
@@ -160,7 +150,7 @@ const stop = () => {
|
|
|
160
150
|
onPause();
|
|
161
151
|
};
|
|
162
152
|
const togglePlay = (e) => {
|
|
163
|
-
e
|
|
153
|
+
e?.stopPropagation();
|
|
164
154
|
if (!video) {
|
|
165
155
|
return;
|
|
166
156
|
}
|
|
@@ -172,8 +162,8 @@ const togglePlay = (e) => {
|
|
|
172
162
|
}
|
|
173
163
|
};
|
|
174
164
|
const toggleMute = (e) => {
|
|
175
|
-
e
|
|
176
|
-
setMuted(!
|
|
165
|
+
e?.stopPropagation();
|
|
166
|
+
setMuted(!video?.muted);
|
|
177
167
|
};
|
|
178
168
|
const onVolumeChange = (e) => {
|
|
179
169
|
const video = e.target;
|
|
@@ -185,15 +175,14 @@ const onTimeUpdate = (e) => {
|
|
|
185
175
|
percentageCompleted = video.currentTime / video.duration || 0;
|
|
186
176
|
notifyProgress();
|
|
187
177
|
};
|
|
188
|
-
const onLoaded = () =>
|
|
178
|
+
const onLoaded = async () => {
|
|
189
179
|
setVolume(MediaVolumeManager.volumeLevel);
|
|
190
180
|
setMuted(MediaVolumeManager.isMuted);
|
|
191
|
-
}
|
|
181
|
+
};
|
|
192
182
|
const onEnded = () => {
|
|
193
|
-
var _a;
|
|
194
183
|
percentageCompleted = 1;
|
|
195
184
|
notifyProgress();
|
|
196
|
-
|
|
185
|
+
on?.ended?.({ id, src });
|
|
197
186
|
if (!loop) {
|
|
198
187
|
everActivated = false;
|
|
199
188
|
}
|
|
@@ -223,8 +212,7 @@ const setShowControlsOnHover = (state) => {
|
|
|
223
212
|
showControlsOnHover = state;
|
|
224
213
|
};
|
|
225
214
|
const notifyProgress = () => {
|
|
226
|
-
|
|
227
|
-
(_a = on === null || on === void 0 ? void 0 : on.progress) === null || _a === void 0 ? void 0 : _a.call(on, percentageCompleted);
|
|
215
|
+
on?.progress?.(percentageCompleted);
|
|
228
216
|
};
|
|
229
217
|
const handleSeek = (percent) => {
|
|
230
218
|
if (video) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamscloud/embeddable",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.2",
|
|
4
4
|
"author": "StreamsCloud",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -133,59 +133,61 @@
|
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
"peerDependencies": {
|
|
136
|
-
"@fluentui/svg-icons": "^1.1.
|
|
136
|
+
"@fluentui/svg-icons": "^1.1.318",
|
|
137
137
|
"@popperjs/core": "^2.11.8",
|
|
138
138
|
"@streamscloud/streams-analytics-collector": "^4.0.1",
|
|
139
139
|
"@urql/core": "^5.1.1 || ^6.0.0",
|
|
140
140
|
"dequal": "^2.0.3",
|
|
141
|
-
"dompurify": "^3.
|
|
141
|
+
"dompurify": "^3.3.0",
|
|
142
142
|
"mobile-detect": "^1.4.5",
|
|
143
|
-
"svelte": "^5.
|
|
143
|
+
"svelte": "^5.50.0",
|
|
144
144
|
"wheel-gestures": "^2.2.48"
|
|
145
145
|
},
|
|
146
146
|
"devDependencies": {
|
|
147
|
-
"@eslint/compat": "^
|
|
148
|
-
"@eslint/js": "^9.
|
|
149
|
-
"@fluentui/svg-icons": "^1.1.
|
|
150
|
-
"@graphql-codegen/add": "^
|
|
151
|
-
"@graphql-codegen/cli": "^
|
|
152
|
-
"@graphql-codegen/
|
|
153
|
-
"@graphql-codegen/
|
|
154
|
-
"@graphql-codegen/
|
|
155
|
-
"@graphql-codegen/
|
|
156
|
-
"@graphql-codegen/typescript": "^
|
|
157
|
-
"@graphql-codegen/typescript-operations": "^4.6.1",
|
|
147
|
+
"@eslint/compat": "^2.0.2",
|
|
148
|
+
"@eslint/js": "^9.39.2",
|
|
149
|
+
"@fluentui/svg-icons": "^1.1.318",
|
|
150
|
+
"@graphql-codegen/add": "^6.0.0",
|
|
151
|
+
"@graphql-codegen/cli": "^6.1.1",
|
|
152
|
+
"@graphql-codegen/introspection": "^5.0.0",
|
|
153
|
+
"@graphql-codegen/near-operation-file-preset": "^4.0.0",
|
|
154
|
+
"@graphql-codegen/typed-document-node": "^6.1.5",
|
|
155
|
+
"@graphql-codegen/typescript": "^5.0.7",
|
|
156
|
+
"@graphql-codegen/typescript-operations": "^5.0.7",
|
|
158
157
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
159
158
|
"@popperjs/core": "^2.11.8",
|
|
160
|
-
"@
|
|
161
|
-
"@sveltejs/
|
|
162
|
-
"@
|
|
163
|
-
"@
|
|
164
|
-
"
|
|
159
|
+
"@streamscloud/streams-analytics-collector": "^4.0.1",
|
|
160
|
+
"@sveltejs/package": "^2.5.7",
|
|
161
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
162
|
+
"@tsconfig/svelte": "^5.0.7",
|
|
163
|
+
"@types/dompurify": "^3.0.5",
|
|
164
|
+
"@urql/core": "^6.0.1",
|
|
165
|
+
"autoprefixer": "^10.4.24",
|
|
165
166
|
"dequal": "^2.0.3",
|
|
166
|
-
"
|
|
167
|
-
"eslint
|
|
168
|
-
"eslint-
|
|
169
|
-
"eslint-formatter-
|
|
170
|
-
"eslint-
|
|
171
|
-
"eslint-plugin-
|
|
167
|
+
"dompurify": "^3.3.1",
|
|
168
|
+
"eslint": "^9.39.2",
|
|
169
|
+
"eslint-config-prettier": "^10.1.8",
|
|
170
|
+
"eslint-formatter-codeframe": "^7.32.2",
|
|
171
|
+
"eslint-formatter-visualstudio": "^9.0.1",
|
|
172
|
+
"eslint-plugin-import": "^2.32.0",
|
|
173
|
+
"eslint-plugin-jsonc": "^2.21.0",
|
|
172
174
|
"eslint-plugin-only-warn": "^1.1.0",
|
|
173
175
|
"eslint-plugin-promise": "^7.2.1",
|
|
174
|
-
"eslint-plugin-svelte": "^3.
|
|
175
|
-
"eslint-plugin-unused-imports": "^4.
|
|
176
|
-
"globals": "^
|
|
176
|
+
"eslint-plugin-svelte": "^3.14.0",
|
|
177
|
+
"eslint-plugin-unused-imports": "^4.3.0",
|
|
178
|
+
"globals": "^17.3.0",
|
|
177
179
|
"mobile-detect": "^1.4.5",
|
|
178
|
-
"prettier": "^3.
|
|
179
|
-
"prettier-plugin-svelte": "^3.4.
|
|
180
|
-
"publint": "^0.3.
|
|
181
|
-
"sass": "^1.
|
|
182
|
-
"svelte": "^5.
|
|
183
|
-
"svelte-check": "^4.
|
|
180
|
+
"prettier": "^3.8.1",
|
|
181
|
+
"prettier-plugin-svelte": "^3.4.1",
|
|
182
|
+
"publint": "^0.3.17",
|
|
183
|
+
"sass": "^1.97.3",
|
|
184
|
+
"svelte": "^5.50.0",
|
|
185
|
+
"svelte-check": "^4.3.6",
|
|
184
186
|
"svelte-preprocess": "^6.0.3",
|
|
185
|
-
"typescript": "^5.
|
|
186
|
-
"typescript-eslint": "^8.
|
|
187
|
-
"vite": "^
|
|
188
|
-
"vite-tsconfig-paths": "^
|
|
187
|
+
"typescript": "^5.9.3",
|
|
188
|
+
"typescript-eslint": "^8.54.0",
|
|
189
|
+
"vite": "^7.3.1",
|
|
190
|
+
"vite-tsconfig-paths": "^6.1.0",
|
|
189
191
|
"wheel-gestures": "^2.2.48"
|
|
190
192
|
}
|
|
191
193
|
}
|