@streamscloud/embeddable 14.1.0 → 14.1.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/media-center/header/media-center-header-mobile.svelte +4 -2
- package/dist/media-center/media-center/header/media-center-header.svelte +4 -2
- package/dist/streams/streams-player/streams-player-view.svelte +1 -4
- package/dist/ui/player/progress/cmp.chunks-progress.svelte +4 -9
- package/dist/ui/player/progress/cmp.chunks-progress.svelte.d.ts +2 -2
- package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.js +2 -2
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte +0 -13
- package/package.json +1 -1
|
@@ -6,13 +6,15 @@ let { context, locale = 'en', on } = $props();
|
|
|
6
6
|
const localization = $derived(new MediaCenterHeaderLocalization(locale));
|
|
7
7
|
const headerMounted = (node) => {
|
|
8
8
|
const heightResizeObserver = new ResizeObserver(() => {
|
|
9
|
+
var _a;
|
|
9
10
|
const headerHeight = node.clientHeight;
|
|
10
|
-
on === null || on === void 0 ? void 0 : on.headerHeightChanged(headerHeight);
|
|
11
|
+
(_a = on === null || on === void 0 ? void 0 : on.headerHeightChanged) === null || _a === void 0 ? void 0 : _a.call(on, headerHeight);
|
|
11
12
|
});
|
|
12
13
|
heightResizeObserver.observe(node);
|
|
13
14
|
return {
|
|
14
15
|
destroy: () => {
|
|
15
|
-
|
|
16
|
+
var _a;
|
|
17
|
+
(_a = on === null || on === void 0 ? void 0 : on.headerHeightChanged) === null || _a === void 0 ? void 0 : _a.call(on, 0);
|
|
16
18
|
heightResizeObserver.disconnect();
|
|
17
19
|
}
|
|
18
20
|
};
|
|
@@ -19,14 +19,16 @@ let scrollAreaRef = $state(null);
|
|
|
19
19
|
const headerMounted = (node) => {
|
|
20
20
|
headerRef = node;
|
|
21
21
|
const heightResizeObserver = new ResizeObserver(() => {
|
|
22
|
+
var _a;
|
|
22
23
|
const headerHeight = node.clientHeight;
|
|
23
|
-
on === null || on === void 0 ? void 0 : on.headerHeightChanged(headerHeight);
|
|
24
|
+
(_a = on === null || on === void 0 ? void 0 : on.headerHeightChanged) === null || _a === void 0 ? void 0 : _a.call(on, headerHeight);
|
|
24
25
|
calcHeaderGridProportions();
|
|
25
26
|
});
|
|
26
27
|
heightResizeObserver.observe(node);
|
|
27
28
|
return {
|
|
28
29
|
destroy: () => {
|
|
29
|
-
|
|
30
|
+
var _a;
|
|
31
|
+
(_a = on === null || on === void 0 ? void 0 : on.headerHeightChanged) === null || _a === void 0 ? void 0 : _a.call(on, 0);
|
|
30
32
|
heightResizeObserver.disconnect();
|
|
31
33
|
}
|
|
32
34
|
};
|
|
@@ -359,10 +359,7 @@ const stopActivityTracking = () => {
|
|
|
359
359
|
{/if}
|
|
360
360
|
</div>
|
|
361
361
|
{/snippet}
|
|
362
|
-
<ChunksProgress
|
|
363
|
-
allChunkItems={buffer.activeChunk.chunkItems.map((i) => i.model.id)}
|
|
364
|
-
activeChunkItem={buffer.activeChunk.activeChunkItem.model.id}
|
|
365
|
-
chunkInfo={info} />
|
|
362
|
+
<ChunksProgress totalItems={buffer.activeChunk.model.pagesCount} activeItemIndex={buffer.activeChunk.activeItemIndex} chunkInfo={info} />
|
|
366
363
|
</div>
|
|
367
364
|
{/if}
|
|
368
365
|
{/snippet}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
<script lang="ts">let {
|
|
2
|
-
let currentIndex = $derived(allChunkItems.indexOf(activeChunkItem));
|
|
1
|
+
<script lang="ts">let { totalItems, activeItemIndex, chunkInfo } = $props();
|
|
3
2
|
export {};
|
|
4
3
|
</script>
|
|
5
4
|
|
|
6
5
|
<div class="chunks-progress">
|
|
7
|
-
<div
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class:chunks--common={allChunkItems.length > 3 && allChunkItems.length <= 6}
|
|
11
|
-
class:chunks--many={allChunkItems.length > 6}>
|
|
12
|
-
{#each allChunkItems as chunk, i (chunk)}
|
|
13
|
-
<div class="chunk" class:active={i <= currentIndex} aria-label={chunk}></div>
|
|
6
|
+
<div class="chunks" class:chunks--few={totalItems <= 3} class:chunks--common={totalItems > 3 && totalItems <= 6} class:chunks--many={totalItems > 6}>
|
|
7
|
+
{#each Array(totalItems) as _, i (i)}
|
|
8
|
+
<div class="chunk" class:active={i <= activeItemIndex} aria-label={`Item ${i}`}></div>
|
|
14
9
|
{/each}
|
|
15
10
|
</div>
|
|
16
11
|
|
|
@@ -122,8 +122,6 @@ export class PlayerChunksManager {
|
|
|
122
122
|
? this.provider.initialData.startItemIndex
|
|
123
123
|
: 0;
|
|
124
124
|
this.setActiveChunkIndex(firstFilledChunkIndex, initialStartItemIndex);
|
|
125
|
-
// Start background warm-up after initialization
|
|
126
|
-
this.warmUp();
|
|
127
125
|
};
|
|
128
126
|
setActiveChunkIndex = async (index, chunkItemIndex) => {
|
|
129
127
|
this._activeChunkIndex = index;
|
|
@@ -148,6 +146,8 @@ export class PlayerChunksManager {
|
|
|
148
146
|
}
|
|
149
147
|
else {
|
|
150
148
|
this.activeChunk.setActiveItemIndex(this.activeChunk.chunkItems.indexOf(nextItem));
|
|
149
|
+
// Don't wait for warm up to be finished, it runs in the background
|
|
150
|
+
this.warmUp();
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
warmUp = async () => {
|
|
@@ -14,19 +14,6 @@ const styles = $derived.by(() => {
|
|
|
14
14
|
|
|
15
15
|
<svelte:head>
|
|
16
16
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300..700&display=swap" />
|
|
17
|
-
<meta name="theme-color" content="#242424" />
|
|
18
|
-
<meta name="color-scheme" content="dark" />
|
|
19
|
-
<meta name="mobile-web-app-capable" content="yes" />
|
|
20
|
-
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
21
|
-
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
|
22
|
-
|
|
23
|
-
<style>
|
|
24
|
-
html,
|
|
25
|
-
body {
|
|
26
|
-
background-color: #242424;
|
|
27
|
-
color-scheme: dark;
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
30
17
|
</svelte:head>
|
|
31
18
|
|
|
32
19
|
<div
|