@streamscloud/embeddable 2.1.2 → 2.1.4
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/short-videos/short-videos-player/action-button.svelte +9 -9
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +2 -2
- package/dist/short-videos/short-videos-player/controls.svelte +44 -44
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +2 -2
- package/dist/short-videos/short-videos-player/ui-manager.svelte.d.ts +1 -1
- package/dist/short-videos/short-videos-player/ui-manager.svelte.js +6 -6
- package/dist/streams/layout/cmp.slot-content.svelte +49 -4
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +0 -1
- package/dist/streams/stream-player/action-button.svelte +2 -2
- package/dist/streams/stream-player/controls.svelte +7 -7
- package/dist/streams/stream-player/stream-overview.svelte +1 -1
- package/dist/ui/icon/cmp.icon.svelte +14 -18
- package/dist/ui/image/cmp.image-stub.svelte +1 -1
- package/dist/ui/image/cmp.image.svelte +1 -1
- package/dist/ui/video/cmp.video.svelte +4 -4
- package/package.json +1 -1
|
@@ -18,19 +18,19 @@ export {};
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
.action-button {
|
|
21
|
-
--_short-
|
|
22
|
-
--
|
|
23
|
-
width: var(--_short-
|
|
24
|
-
min-width: var(--_short-
|
|
25
|
-
max-width: var(--_short-
|
|
26
|
-
height: var(--_short-
|
|
27
|
-
min-height: var(--_short-
|
|
28
|
-
max-height: var(--_short-
|
|
21
|
+
--_short-videos-player--action-button--size: var(--short-videos-player--action-button--size);
|
|
22
|
+
--_short-videos-player--action-button--background: var(--action-button-background, #1c1c1c);
|
|
23
|
+
width: var(--_short-videos-player--action-button--size);
|
|
24
|
+
min-width: var(--_short-videos-player--action-button--size);
|
|
25
|
+
max-width: var(--_short-videos-player--action-button--size);
|
|
26
|
+
height: var(--_short-videos-player--action-button--size);
|
|
27
|
+
min-height: var(--_short-videos-player--action-button--size);
|
|
28
|
+
max-height: var(--_short-videos-player--action-button--size);
|
|
29
29
|
display: flex;
|
|
30
30
|
justify-content: center;
|
|
31
31
|
align-items: center;
|
|
32
32
|
line-height: 0;
|
|
33
|
-
background: var(--
|
|
33
|
+
background: var(--_short-videos-player--action-button--background);
|
|
34
34
|
border-radius: 50%;
|
|
35
35
|
--icon--size: 1.25rem;
|
|
36
36
|
z-index: 1;
|
|
@@ -12,12 +12,12 @@ import { PlayerBuffer, PlayerSlider } from '../../ui/player';
|
|
|
12
12
|
import { SpotlightLayout } from '../../ui/spotlight-layout';
|
|
13
13
|
import { default as Controls } from './controls.svelte';
|
|
14
14
|
import { ShortVideosPlayerLocalization } from './short-videos-player-localization.svelte';
|
|
15
|
-
import {
|
|
15
|
+
import { ShortVideosPlayerUiManager } from './ui-manager.svelte';
|
|
16
16
|
import { onDestroy, onMount } from 'svelte';
|
|
17
17
|
let { shortVideosProvider, localization: localizationInit, on } = $props();
|
|
18
18
|
const localization = $derived(new ShortVideosPlayerLocalization(localizationInit));
|
|
19
19
|
const buffer = $derived(new PlayerBuffer(shortVideosProvider));
|
|
20
|
-
const uiManager = new
|
|
20
|
+
const uiManager = new ShortVideosPlayerUiManager();
|
|
21
21
|
onMount(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
22
|
uiManager.detailsCollapsed = window && window.innerWidth < window.innerHeight;
|
|
23
23
|
}));
|
|
@@ -3,12 +3,12 @@ import { Icon } from '../../ui/icon';
|
|
|
3
3
|
import { MediaVolumeManager } from '../../ui/media-playback';
|
|
4
4
|
import { default as ActionButton } from './action-button.svelte';
|
|
5
5
|
import { ShortVideosPlayerLocalization } from './short-videos-player-localization.svelte.js';
|
|
6
|
-
import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg';
|
|
7
|
-
import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg';
|
|
8
|
-
import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg';
|
|
9
|
-
import IconPanelRightGallery from '@fluentui/svg-icons/icons/panel_right_gallery_20_regular.svg';
|
|
10
|
-
import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg';
|
|
11
|
-
import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg';
|
|
6
|
+
import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg?raw';
|
|
7
|
+
import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg?raw';
|
|
8
|
+
import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg?raw';
|
|
9
|
+
import IconPanelRightGallery from '@fluentui/svg-icons/icons/panel_right_gallery_20_regular.svg?raw';
|
|
10
|
+
import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg?raw';
|
|
11
|
+
import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg?raw';
|
|
12
12
|
let { buffer, uiManager, localization, on } = $props();
|
|
13
13
|
const toggleMuted = () => {
|
|
14
14
|
MediaVolumeManager.isMuted = !MediaVolumeManager.isMuted;
|
|
@@ -16,16 +16,16 @@ const toggleMuted = () => {
|
|
|
16
16
|
const shortVideo = $derived(buffer.current);
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<div class="short-
|
|
20
|
-
<div class="short-
|
|
19
|
+
<div class="short-videos-player-controls">
|
|
20
|
+
<div class="short-videos-player-controls__left">
|
|
21
21
|
{#if shortVideo && uiManager.detailsCollapsed && !uiManager.showShortVideoOverlay}
|
|
22
|
-
<div class="short-
|
|
23
|
-
<div class="short-
|
|
22
|
+
<div class="short-videos-player-controls__short-video-overlay">
|
|
23
|
+
<div class="short-videos-player-controls__short-video-attachments-inline">
|
|
24
24
|
<ShortVideoViewerAttachmentsInline model={shortVideo} />
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
{/if}
|
|
28
|
-
<div class="short-
|
|
28
|
+
<div class="short-videos-player-controls__navigation-buttons">
|
|
29
29
|
<button type="button" class="navigation-button" disabled={!buffer.canLoadPrevious} onclick={buffer.loadPrevious}>
|
|
30
30
|
<Icon src={IconChevronUp} />
|
|
31
31
|
</button>
|
|
@@ -34,13 +34,13 @@ const shortVideo = $derived(buffer.current);
|
|
|
34
34
|
</button>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
|
-
<div class="short-
|
|
37
|
+
<div class="short-videos-player-controls__right">
|
|
38
38
|
{#if shortVideo}
|
|
39
|
-
<div class="short-
|
|
39
|
+
<div class="short-videos-player-controls__short-video-attachments">
|
|
40
40
|
<ShortVideoViewerAttachments shortVideo={shortVideo} localization={localization.shortVideoDetailsLocalization?.attachmentsLocalization} />
|
|
41
41
|
</div>
|
|
42
42
|
{/if}
|
|
43
|
-
<div class="short-
|
|
43
|
+
<div class="short-videos-player-controls__controls">
|
|
44
44
|
{#if shortVideo}
|
|
45
45
|
<ActionButton on={{ click: toggleMuted }}>
|
|
46
46
|
{#if MediaVolumeManager.isMuted}
|
|
@@ -79,37 +79,37 @@ const shortVideo = $derived(buffer.current);
|
|
|
79
79
|
}
|
|
80
80
|
.close-button {
|
|
81
81
|
position: absolute;
|
|
82
|
-
top: var(--short-
|
|
83
|
-
right: var(--short-
|
|
82
|
+
top: var(--short-videos-player--controls--offset-vertical);
|
|
83
|
+
right: var(--short-videos-player--controls--offset-horizontal);
|
|
84
84
|
z-index: 1;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.toggle-collapsed-button {
|
|
88
88
|
position: absolute;
|
|
89
|
-
bottom: var(--short-
|
|
90
|
-
right: var(--short-
|
|
89
|
+
bottom: var(--short-videos-player--controls--offset-vertical);
|
|
90
|
+
right: var(--short-videos-player--controls--offset-horizontal);
|
|
91
91
|
z-index: 1;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
.short-
|
|
94
|
+
.short-videos-player-controls {
|
|
95
95
|
position: absolute;
|
|
96
96
|
top: 0;
|
|
97
97
|
right: 0;
|
|
98
98
|
height: 100%;
|
|
99
|
-
width: var(--short-
|
|
99
|
+
width: var(--short-videos-player--sidebar--available-space);
|
|
100
100
|
display: flex;
|
|
101
101
|
justify-content: space-between;
|
|
102
102
|
gap: 2.5rem;
|
|
103
|
-
padding: var(--short-
|
|
103
|
+
padding: var(--short-videos-player--controls--offset-vertical) var(--short-videos-player--controls--offset-horizontal);
|
|
104
104
|
container-type: inline-size;
|
|
105
105
|
}
|
|
106
|
-
.short-
|
|
106
|
+
.short-videos-player-controls__left {
|
|
107
107
|
display: flex;
|
|
108
108
|
flex-direction: column;
|
|
109
109
|
gap: 2.5rem;
|
|
110
110
|
justify-content: flex-end;
|
|
111
111
|
}
|
|
112
|
-
.short-
|
|
112
|
+
.short-videos-player-controls__right {
|
|
113
113
|
flex: 1;
|
|
114
114
|
display: flex;
|
|
115
115
|
justify-content: space-between;
|
|
@@ -119,11 +119,11 @@ const shortVideo = $derived(buffer.current);
|
|
|
119
119
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
120
120
|
}
|
|
121
121
|
@container (width < 9.375rem) {
|
|
122
|
-
.short-
|
|
122
|
+
.short-videos-player-controls__right {
|
|
123
123
|
display: none;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
.short-
|
|
126
|
+
.short-videos-player-controls__short-video-overlay {
|
|
127
127
|
gap: 2.5rem;
|
|
128
128
|
display: flex;
|
|
129
129
|
flex: 1;
|
|
@@ -131,21 +131,21 @@ const shortVideo = $derived(buffer.current);
|
|
|
131
131
|
flex-direction: column;
|
|
132
132
|
align-items: flex-start;
|
|
133
133
|
justify-content: flex-end;
|
|
134
|
-
--short-video-viewer--interactions--icon--size: var(--short-
|
|
134
|
+
--short-video-viewer--interactions--icon--size: var(--short-videos-player--navigation-button--size);
|
|
135
135
|
--short-video-viewer--interactions--background--color: #1c1c1c;
|
|
136
136
|
--short-video-viewer--interactions--counter--color: #f3f4f6;
|
|
137
137
|
--short-video-viewer--interactions--icon--font-color: #f3f4f6;
|
|
138
138
|
}
|
|
139
|
-
.short-
|
|
139
|
+
.short-videos-player-controls__short-video-attachments-inline {
|
|
140
140
|
display: none;
|
|
141
141
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
142
142
|
}
|
|
143
143
|
@container (width < calc(21.875rem + 3.75rem)) {
|
|
144
|
-
.short-
|
|
144
|
+
.short-videos-player-controls__short-video-attachments-inline {
|
|
145
145
|
display: contents;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
.short-
|
|
148
|
+
.short-videos-player-controls__short-video-attachments {
|
|
149
149
|
flex: 1;
|
|
150
150
|
overflow-x: hidden;
|
|
151
151
|
overflow-y: auto;
|
|
@@ -155,34 +155,34 @@ const shortVideo = $derived(buffer.current);
|
|
|
155
155
|
max-width: 21.875rem;
|
|
156
156
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
157
157
|
}
|
|
158
|
-
.short-
|
|
158
|
+
.short-videos-player-controls__short-video-attachments::-webkit-scrollbar {
|
|
159
159
|
width: 3px;
|
|
160
160
|
height: 3px;
|
|
161
161
|
background: var(--custom-scrollbar-background, transparent);
|
|
162
162
|
visibility: hidden;
|
|
163
163
|
}
|
|
164
|
-
.short-
|
|
164
|
+
.short-videos-player-controls__short-video-attachments::-webkit-scrollbar-thumb {
|
|
165
165
|
background: transparent;
|
|
166
166
|
}
|
|
167
|
-
.short-
|
|
167
|
+
.short-videos-player-controls__short-video-attachments:hover {
|
|
168
168
|
scrollbar-color: var(--custom-scrollbar-color, #7d7d7d) var(--custom-scrollbar-background, transparent);
|
|
169
169
|
scrollbar-width: thin;
|
|
170
170
|
}
|
|
171
|
-
.short-
|
|
171
|
+
.short-videos-player-controls__short-video-attachments:hover::-webkit-scrollbar {
|
|
172
172
|
width: 3px;
|
|
173
173
|
height: 3px;
|
|
174
174
|
background: var(--custom-scrollbar-background, transparent);
|
|
175
175
|
visibility: hidden;
|
|
176
176
|
}
|
|
177
|
-
.short-
|
|
177
|
+
.short-videos-player-controls__short-video-attachments:hover::-webkit-scrollbar-thumb {
|
|
178
178
|
background: var(--custom-scrollbar-color, #7d7d7d);
|
|
179
179
|
}
|
|
180
180
|
@container (width < calc(21.875rem + 3.75rem)) {
|
|
181
|
-
.short-
|
|
181
|
+
.short-videos-player-controls__short-video-attachments {
|
|
182
182
|
display: none;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
.short-
|
|
185
|
+
.short-videos-player-controls__navigation-buttons {
|
|
186
186
|
display: flex;
|
|
187
187
|
flex-direction: column;
|
|
188
188
|
gap: 1rem;
|
|
@@ -191,11 +191,11 @@ const shortVideo = $derived(buffer.current);
|
|
|
191
191
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
192
192
|
}
|
|
193
193
|
@container (width < 6.25rem) {
|
|
194
|
-
.short-
|
|
194
|
+
.short-videos-player-controls__navigation-buttons {
|
|
195
195
|
visibility: hidden;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
.short-
|
|
198
|
+
.short-videos-player-controls__controls {
|
|
199
199
|
display: flex;
|
|
200
200
|
margin-top: auto;
|
|
201
201
|
gap: 1rem;
|
|
@@ -203,12 +203,12 @@ const shortVideo = $derived(buffer.current);
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
.navigation-button {
|
|
206
|
-
width: var(--short-
|
|
207
|
-
min-width: var(--short-
|
|
208
|
-
max-width: var(--short-
|
|
209
|
-
height: var(--short-
|
|
210
|
-
min-height: var(--short-
|
|
211
|
-
max-height: var(--short-
|
|
206
|
+
width: var(--short-videos-player--navigation-button--size);
|
|
207
|
+
min-width: var(--short-videos-player--navigation-button--size);
|
|
208
|
+
max-width: var(--short-videos-player--navigation-button--size);
|
|
209
|
+
height: var(--short-videos-player--navigation-button--size);
|
|
210
|
+
min-height: var(--short-videos-player--navigation-button--size);
|
|
211
|
+
max-height: var(--short-videos-player--navigation-button--size);
|
|
212
212
|
background-color: #000000;
|
|
213
213
|
border: 1px solid #1c1c1c;
|
|
214
214
|
border-radius: 50%;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type ShortVideoViewerModel } from '../short-video-viewer';
|
|
2
2
|
import type { IPlayerBuffer } from '../../ui/player';
|
|
3
3
|
import { ShortVideosPlayerLocalization } from './short-videos-player-localization.svelte.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ShortVideosPlayerUiManager } from './ui-manager.svelte';
|
|
5
5
|
type Props = {
|
|
6
6
|
buffer: IPlayerBuffer<ShortVideoViewerModel>;
|
|
7
|
-
uiManager:
|
|
7
|
+
uiManager: ShortVideosPlayerUiManager;
|
|
8
8
|
localization: ShortVideosPlayerLocalization;
|
|
9
9
|
on: {
|
|
10
10
|
closePlayer: () => void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export class
|
|
1
|
+
export class ShortVideosPlayerUiManager {
|
|
2
2
|
detailsCollapsed = $state(true);
|
|
3
3
|
globalCssVariables = $derived.by(() => {
|
|
4
4
|
const values = [
|
|
5
|
-
`--short-
|
|
6
|
-
`--short-
|
|
7
|
-
`--short-
|
|
8
|
-
`--short-
|
|
9
|
-
`--short-
|
|
5
|
+
`--short-videos-player--action-button--size: ${this.actionButtonSize}px`,
|
|
6
|
+
`--short-videos-player--navigation-button--size: ${this.navigationButtonSize}px`,
|
|
7
|
+
`--short-videos-player--controls--offset-horizontal: ${this.controlsOffsetHorizontal}px`,
|
|
8
|
+
`--short-videos-player--controls--offset-vertical: ${this.controlsOffsetVertical}px`,
|
|
9
|
+
`--short-videos-player--sidebar--available-space: ${(this.viewTotalWidth - this.mainViewColumnWidth) / 2}px`
|
|
10
10
|
];
|
|
11
11
|
return values.join(';');
|
|
12
12
|
});
|
|
@@ -23,10 +23,55 @@ const dataIsFilled = $derived.by(() => {
|
|
|
23
23
|
Utils.assertUnreachable(model.data);
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
+
const productModel = $derived.by(() => {
|
|
27
|
+
var _a;
|
|
28
|
+
return ((_a = model.data) === null || _a === void 0 ? void 0 : _a.type) === StreamComponentDataType.Product ? model.data.product : undefined;
|
|
29
|
+
});
|
|
30
|
+
const handleProductClick = (e) => {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
if (!productModel) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (productModel.id && (on === null || on === void 0 ? void 0 : on.productClick)) {
|
|
36
|
+
on.productClick(productModel.id);
|
|
37
|
+
}
|
|
38
|
+
if (productModel.link) {
|
|
39
|
+
window.open(productModel.link, '_blank', 'noopener noreferrer');
|
|
40
|
+
}
|
|
41
|
+
};
|
|
26
42
|
</script>
|
|
27
43
|
|
|
28
|
-
{#
|
|
29
|
-
{#
|
|
30
|
-
|
|
31
|
-
|
|
44
|
+
{#snippet slotContent()}
|
|
45
|
+
{#if component && model.data && dataIsFilled}
|
|
46
|
+
{#each component.elements as element (element)}
|
|
47
|
+
<StreamElement model={element} data={model.data} localization={localization} on={on} />
|
|
48
|
+
{/each}
|
|
49
|
+
{/if}
|
|
50
|
+
{/snippet}
|
|
51
|
+
{#if productModel?.link}
|
|
52
|
+
<a class="stream-slot-content-product-link" href={productModel.link} onclick={handleProductClick} target="_blank" rel="noopener noreferrer">
|
|
53
|
+
{@render slotContent()}
|
|
54
|
+
</a>
|
|
55
|
+
{:else}
|
|
56
|
+
{@render slotContent()}
|
|
32
57
|
{/if}
|
|
58
|
+
|
|
59
|
+
<style>@keyframes fadeIn {
|
|
60
|
+
0% {
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
50% {
|
|
64
|
+
opacity: 0.4;
|
|
65
|
+
}
|
|
66
|
+
100% {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
.stream-slot-content-product-link {
|
|
71
|
+
width: 100%;
|
|
72
|
+
min-width: 100%;
|
|
73
|
+
max-width: 100%;
|
|
74
|
+
height: 100%;
|
|
75
|
+
min-height: 100%;
|
|
76
|
+
max-height: 100%;
|
|
77
|
+
}</style>
|
|
@@ -19,7 +19,7 @@ export {};
|
|
|
19
19
|
}
|
|
20
20
|
.action-button {
|
|
21
21
|
--_stream-player--action-button--size: var(--stream-player--action-button--size);
|
|
22
|
-
--
|
|
22
|
+
--_stream-player--action-button--background: var(--action-button-background, #1c1c1c);
|
|
23
23
|
width: var(--_stream-player--action-button--size);
|
|
24
24
|
min-width: var(--_stream-player--action-button--size);
|
|
25
25
|
max-width: var(--_stream-player--action-button--size);
|
|
@@ -30,7 +30,7 @@ export {};
|
|
|
30
30
|
justify-content: center;
|
|
31
31
|
align-items: center;
|
|
32
32
|
line-height: 0;
|
|
33
|
-
background: var(--
|
|
33
|
+
background: var(--_stream-player--action-button--background);
|
|
34
34
|
border-radius: 50%;
|
|
35
35
|
--icon--size: 1.25rem;
|
|
36
36
|
z-index: 1;
|
|
@@ -5,13 +5,13 @@ import { Icon } from '../../ui/icon';
|
|
|
5
5
|
import { MediaVolumeManager } from '../../ui/media-playback';
|
|
6
6
|
import { default as ActionButton } from './action-button.svelte';
|
|
7
7
|
import { StreamPlayerLocalization } from './stream-player-localization.svelte';
|
|
8
|
-
import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg';
|
|
9
|
-
import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg';
|
|
10
|
-
import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg';
|
|
11
|
-
import IconFullScreenMaximize from '@fluentui/svg-icons/icons/full_screen_maximize_20_regular.svg';
|
|
12
|
-
import IconPanelRightGallery from '@fluentui/svg-icons/icons/panel_right_gallery_20_regular.svg';
|
|
13
|
-
import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg';
|
|
14
|
-
import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg';
|
|
8
|
+
import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg?raw';
|
|
9
|
+
import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg?raw';
|
|
10
|
+
import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg?raw';
|
|
11
|
+
import IconFullScreenMaximize from '@fluentui/svg-icons/icons/full_screen_maximize_20_regular.svg?raw';
|
|
12
|
+
import IconPanelRightGallery from '@fluentui/svg-icons/icons/panel_right_gallery_20_regular.svg?raw';
|
|
13
|
+
import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg?raw';
|
|
14
|
+
import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg?raw';
|
|
15
15
|
let { buffer, uiManager, localization, on } = $props();
|
|
16
16
|
const toggleMuted = () => {
|
|
17
17
|
MediaVolumeManager.isMuted = !MediaVolumeManager.isMuted;
|
|
@@ -7,7 +7,7 @@ import { ProportionalContainer } from '../../ui/proportional-container';
|
|
|
7
7
|
import { TimeAgo } from '../../ui/time-ago';
|
|
8
8
|
import { default as ActionButton } from './action-button.svelte';
|
|
9
9
|
import { StreamPlayerLocalization } from './stream-player-localization.svelte';
|
|
10
|
-
import IconPanelLeftText from '@fluentui/svg-icons/icons/panel_left_text_20_regular.svg';
|
|
10
|
+
import IconPanelLeftText from '@fluentui/svg-icons/icons/panel_left_text_20_regular.svg?raw';
|
|
11
11
|
let { model, buffer, activePageId, on, uiManager, localization } = $props();
|
|
12
12
|
</script>
|
|
13
13
|
|
|
@@ -13,9 +13,9 @@ const fillSvg = (node) => {
|
|
|
13
13
|
};
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
|
-
<div style="display: contents">
|
|
17
|
-
{#if src.startsWith('
|
|
18
|
-
|
|
16
|
+
<div class="icon" style="display: contents">
|
|
17
|
+
{#if src.startsWith('<svg')}
|
|
18
|
+
{@html src}
|
|
19
19
|
{:else}
|
|
20
20
|
<svg
|
|
21
21
|
class="icon"
|
|
@@ -45,15 +45,6 @@ const fillSvg = (node) => {
|
|
|
45
45
|
--_icon--color: var(--icon--color);
|
|
46
46
|
--_icon--size: var(--icon--size, 1.25em);
|
|
47
47
|
--_icon--stroke-width: var(--icon--stroke-width, 0);
|
|
48
|
-
display: inline-block;
|
|
49
|
-
color: inherit;
|
|
50
|
-
fill: var(--_icon--color, currentColor);
|
|
51
|
-
height: var(--_icon--size);
|
|
52
|
-
min-height: var(--_icon--size);
|
|
53
|
-
max-height: var(--_icon--size);
|
|
54
|
-
width: var(--_icon--size);
|
|
55
|
-
min-width: var(--_icon--size);
|
|
56
|
-
max-width: var(--_icon--size);
|
|
57
48
|
}
|
|
58
49
|
.icon--white {
|
|
59
50
|
--_icon--color: #ffffff;
|
|
@@ -97,6 +88,17 @@ const fillSvg = (node) => {
|
|
|
97
88
|
:global([data-theme="dark"]) .icon--blue {
|
|
98
89
|
--_icon--color: #91b3f3;
|
|
99
90
|
}
|
|
91
|
+
.icon :global(svg) {
|
|
92
|
+
display: inline-block;
|
|
93
|
+
color: inherit;
|
|
94
|
+
fill: var(--_icon--color, currentColor);
|
|
95
|
+
height: var(--_icon--size);
|
|
96
|
+
min-height: var(--_icon--size);
|
|
97
|
+
max-height: var(--_icon--size);
|
|
98
|
+
width: var(--_icon--size);
|
|
99
|
+
min-width: var(--_icon--size);
|
|
100
|
+
max-width: var(--_icon--size);
|
|
101
|
+
}
|
|
100
102
|
.icon :global(path) {
|
|
101
103
|
stroke: var(--_icon--color);
|
|
102
104
|
stroke-width: var(--_icon--stroke-width);
|
|
@@ -104,10 +106,4 @@ const fillSvg = (node) => {
|
|
|
104
106
|
:global([data-theme="dark"]) .icon :global(path) {
|
|
105
107
|
stroke: var(--_icon--color);
|
|
106
108
|
stroke-width: var(--_icon--stroke-width);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.font-awesome-icon-to-replace {
|
|
110
|
-
font-size: 1em;
|
|
111
|
-
transform: scale(2);
|
|
112
|
-
color: red;
|
|
113
109
|
}</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">import { Icon } from '../icon';
|
|
2
2
|
import { calculateImageState, ImageState } from './image-state';
|
|
3
|
-
import IconImageOff from '@fluentui/svg-icons/icons/image_off_20_regular.svg';
|
|
3
|
+
import IconImageOff from '@fluentui/svg-icons/icons/image_off_20_regular.svg?raw';
|
|
4
4
|
let { src, alt = '', showStubOnError = false, on, stub } = $props();
|
|
5
5
|
let hasError = $state(false);
|
|
6
6
|
const imageState = $derived(calculateImageState(src, hasError, showStubOnError));
|
|
@@ -12,10 +12,10 @@ import { Icon, IconColor } from '../icon';
|
|
|
12
12
|
import { MediaVolumeManager, PlaybackManager } from '../media-playback';
|
|
13
13
|
import { Progress } from '../progress';
|
|
14
14
|
import { SeekBar } from '../seek-bar';
|
|
15
|
-
import IconPause from '@fluentui/svg-icons/icons/pause_20_regular.svg';
|
|
16
|
-
import IconPlay from '@fluentui/svg-icons/icons/play_20_regular.svg';
|
|
17
|
-
import IconSpeaker from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg';
|
|
18
|
-
import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg';
|
|
15
|
+
import IconPause from '@fluentui/svg-icons/icons/pause_20_regular.svg?raw';
|
|
16
|
+
import IconPlay from '@fluentui/svg-icons/icons/play_20_regular.svg?raw';
|
|
17
|
+
import IconSpeaker from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg?raw';
|
|
18
|
+
import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg?raw';
|
|
19
19
|
import { onDestroy, onMount, untrack } from 'svelte';
|
|
20
20
|
import { slide } from 'svelte/transition';
|
|
21
21
|
let { src, poster, id = randomNanoid(), controls = true, autoplay = false, loop = false, inert = false, intersectionContainer, on } = $props();
|