@streamscloud/embeddable 6.3.1 → 6.3.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.
|
@@ -15,6 +15,7 @@ import { PlayerBuffer, PlayerSlider } from '../../ui/player';
|
|
|
15
15
|
import { SpotlightLayout } from '../../ui/spotlight-layout';
|
|
16
16
|
import { SwipeIndicator } from '../../ui/swipe-indicator';
|
|
17
17
|
import { default as Controls } from './controls.svelte';
|
|
18
|
+
import { InternalShortVideoPlayerProvider } from './internal-short-video-player-provider';
|
|
18
19
|
import { ShortVideosPlayerLocalization } from './short-videos-player-localization';
|
|
19
20
|
import { ShortVideosPlayerUiManager } from './ui-manager.svelte';
|
|
20
21
|
import { untrack } from 'svelte';
|
|
@@ -27,18 +28,24 @@ let buffer = $state.raw(null);
|
|
|
27
28
|
$effect(() => {
|
|
28
29
|
void dataProvider;
|
|
29
30
|
untrack(() => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
initBuffer(dataProvider);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
const initBuffer = (dataProvider) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
bufferIsLoading = true;
|
|
36
|
+
if (dataProvider instanceof InternalShortVideoPlayerProvider) {
|
|
37
|
+
yield dataProvider.prefetch();
|
|
38
|
+
}
|
|
39
|
+
new PlayerBuffer(dataProvider, {
|
|
40
|
+
preloaded: (instance) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
if (instance.loaded.length) {
|
|
42
|
+
const coverUrl = resolveVideoCover(instance.loaded[0]);
|
|
43
|
+
yield preloadImage(coverUrl);
|
|
44
|
+
background = coverUrl;
|
|
45
|
+
}
|
|
46
|
+
buffer = instance;
|
|
47
|
+
bufferIsLoading = false;
|
|
48
|
+
})
|
|
42
49
|
});
|
|
43
50
|
});
|
|
44
51
|
const uiManager = new ShortVideosPlayerUiManager();
|