@streamscloud/embeddable 2.0.4 → 2.1.1
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/package.json +1 -1
- package/dist/core/continuation-token.d.ts +0 -10
- package/dist/core/continuation-token.js +0 -32
- package/dist/core/cursor-result.d.ts +0 -9
- package/dist/core/cursor-result.js +0 -1
- package/dist/core/data-loaders/cursor-data-loader.svelte.d.ts +0 -14
- package/dist/core/data-loaders/cursor-data-loader.svelte.js +0 -35
- package/dist/core/data-loaders/data-loader.d.ts +0 -4
- package/dist/core/data-loaders/data-loader.js +0 -1
- package/dist/core/data-loaders/index.d.ts +0 -2
- package/dist/core/data-loaders/index.js +0 -1
- package/dist/core/deferred.d.ts +0 -6
- package/dist/core/deferred.js +0 -13
- package/dist/core/enums.d.ts +0 -33
- package/dist/core/enums.js +0 -39
- package/dist/core/graphql.d.ts +0 -1
- package/dist/core/graphql.js +0 -10
- package/dist/core/media/image-helper.d.ts +0 -10
- package/dist/core/media/image-helper.js +0 -30
- package/dist/core/media/images-size-detector.service.d.ts +0 -6
- package/dist/core/media/images-size-detector.service.js +0 -15
- package/dist/core/media/index.d.ts +0 -4
- package/dist/core/media/index.js +0 -4
- package/dist/core/media/media-item-url.service.d.ts +0 -2
- package/dist/core/media/media-item-url.service.js +0 -3
- package/dist/core/media/types.d.ts +0 -13
- package/dist/core/media/types.js +0 -1
- package/dist/core/toastr.d.ts +0 -1
- package/dist/core/toastr.js +0 -26
- package/dist/core/transitions/index.d.ts +0 -1
- package/dist/core/transitions/index.js +0 -1
- package/dist/core/transitions/slide-horizontally.d.ts +0 -7
- package/dist/core/transitions/slide-horizontally.js +0 -55
- package/dist/core/utils/array-helper.d.ts +0 -23
- package/dist/core/utils/array-helper.js +0 -148
- package/dist/core/utils/date-helper.d.ts +0 -29
- package/dist/core/utils/date-helper.js +0 -146
- package/dist/core/utils/dom-helper.d.ts +0 -12
- package/dist/core/utils/dom-helper.js +0 -76
- package/dist/core/utils/html-helper.d.ts +0 -40
- package/dist/core/utils/html-helper.js +0 -97
- package/dist/core/utils/index.d.ts +0 -3
- package/dist/core/utils/index.js +0 -3
- package/dist/core/utils/number-helper.d.ts +0 -6
- package/dist/core/utils/number-helper.js +0 -28
- package/dist/core/utils/string-generator.d.ts +0 -2
- package/dist/core/utils/string-generator.js +0 -15
- package/dist/core/utils/string-helper.d.ts +0 -10
- package/dist/core/utils/string-helper.js +0 -53
- package/dist/core/utils/url-helper.d.ts +0 -3
- package/dist/core/utils/url-helper.js +0 -13
- package/dist/core/utils/utils.d.ts +0 -28
- package/dist/core/utils/utils.js +0 -100
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/products/price-helper.d.ts +0 -4
- package/dist/products/price-helper.js +0 -47
- package/dist/short-videos/short-video-viewer/cmp.ad.svelte +0 -74
- package/dist/short-videos/short-video-viewer/cmp.ad.svelte.d.ts +0 -7
- package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte +0 -70
- package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte.d.ts +0 -7
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +0 -68
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +0 -9
- package/dist/short-videos/short-video-viewer/cmp.product.svelte +0 -156
- package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +0 -10
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +0 -124
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +0 -10
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +0 -86
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +0 -9
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +0 -133
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +0 -12
- package/dist/short-videos/short-video-viewer/description.svelte +0 -46
- package/dist/short-videos/short-video-viewer/description.svelte.d.ts +0 -9
- package/dist/short-videos/short-video-viewer/index.d.ts +0 -9
- package/dist/short-videos/short-video-viewer/index.js +0 -6
- package/dist/short-videos/short-video-viewer/mapper.d.ts +0 -3
- package/dist/short-videos/short-video-viewer/mapper.js +0 -56
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +0 -56
- package/dist/short-videos/short-video-viewer/operations.generated.js +0 -151
- package/dist/short-videos/short-video-viewer/operations.graphql +0 -53
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.d.ts +0 -12
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.js +0 -10
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.d.ts +0 -13
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +0 -10
- package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.d.ts +0 -7
- package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.js +0 -11
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +0 -13
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +0 -10
- package/dist/short-videos/short-video-viewer/types.d.ts +0 -40
- package/dist/short-videos/short-video-viewer/types.js +0 -1
- package/dist/short-videos/short-video-viewer/ui-manager.svelte.d.ts +0 -12
- package/dist/short-videos/short-video-viewer/ui-manager.svelte.js +0 -26
- package/dist/short-videos/short-videos-player/action-button.svelte +0 -38
- package/dist/short-videos/short-videos-player/action-button.svelte.d.ts +0 -10
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +0 -91
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +0 -13
- package/dist/short-videos/short-videos-player/controls.svelte +0 -222
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +0 -15
- package/dist/short-videos/short-videos-player/index.d.ts +0 -28
- package/dist/short-videos/short-videos-player/index.js +0 -40
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +0 -8
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +0 -6
- package/dist/short-videos/short-videos-player/ui-manager.svelte.d.ts +0 -16
- package/dist/short-videos/short-videos-player/ui-manager.svelte.js +0 -25
- package/dist/streams/layout/cmp.layout.svelte +0 -34
- package/dist/streams/layout/cmp.layout.svelte.d.ts +0 -9
- package/dist/streams/layout/cmp.slot-content.svelte +0 -32
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +0 -9
- package/dist/streams/layout/cmp.slot.svelte +0 -26
- package/dist/streams/layout/cmp.slot.svelte.d.ts +0 -9
- package/dist/streams/layout/component.d.ts +0 -6
- package/dist/streams/layout/component.js +0 -1
- package/dist/streams/layout/css-values.d.ts +0 -10
- package/dist/streams/layout/css-values.js +0 -1
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +0 -16
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +0 -11
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +0 -38
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +0 -30
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +0 -97
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +0 -11
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +0 -6
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +0 -7
- package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte +0 -45
- package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/cmp.stream-element.svelte +0 -60
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +0 -13
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte +0 -23
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +0 -8
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +0 -7
- package/dist/streams/layout/element-views/data-by-key-accessor.d.ts +0 -3
- package/dist/streams/layout/element-views/data-by-key-accessor.js +0 -55
- package/dist/streams/layout/element-views/index.d.ts +0 -11
- package/dist/streams/layout/element-views/index.js +0 -9
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.js +0 -8
- package/dist/streams/layout/element-views/stream-element-localization.svelte.d.ts +0 -8
- package/dist/streams/layout/element-views/stream-element-localization.svelte.js +0 -6
- package/dist/streams/layout/elements.d.ts +0 -51
- package/dist/streams/layout/elements.js +0 -1
- package/dist/streams/layout/enums.d.ts +0 -45
- package/dist/streams/layout/enums.js +0 -54
- package/dist/streams/layout/index.d.ts +0 -19
- package/dist/streams/layout/index.js +0 -15
- package/dist/streams/layout/layout.d.ts +0 -13
- package/dist/streams/layout/layout.js +0 -1
- package/dist/streams/layout/models/index.d.ts +0 -6
- package/dist/streams/layout/models/index.js +0 -1
- package/dist/streams/layout/models/mapper.d.ts +0 -3
- package/dist/streams/layout/models/mapper.js +0 -62
- package/dist/streams/layout/models/stream-layout-blob-model.d.ts +0 -4
- package/dist/streams/layout/models/stream-layout-blob-model.js +0 -1
- package/dist/streams/layout/models/stream-layout-media-item-model.d.ts +0 -6
- package/dist/streams/layout/models/stream-layout-media-item-model.js +0 -1
- package/dist/streams/layout/models/stream-layout-post-header-model.d.ts +0 -11
- package/dist/streams/layout/models/stream-layout-post-header-model.js +0 -1
- package/dist/streams/layout/models/stream-layout-product-model.d.ts +0 -19
- package/dist/streams/layout/models/stream-layout-product-model.js +0 -1
- package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +0 -31
- package/dist/streams/layout/models/stream-layout-short-video-model.js +0 -1
- package/dist/streams/layout/serializer.d.ts +0 -3
- package/dist/streams/layout/serializer.js +0 -6
- package/dist/streams/layout/slot-data-input.d.ts +0 -14
- package/dist/streams/layout/slot-data-input.js +0 -1
- package/dist/streams/layout/slot-data.d.ts +0 -18
- package/dist/streams/layout/slot-data.js +0 -1
- package/dist/streams/layout/slot.d.ts +0 -16
- package/dist/streams/layout/slot.js +0 -1
- package/dist/streams/layout/styles-transformer.d.ts +0 -13
- package/dist/streams/layout/styles-transformer.js +0 -140
- package/dist/streams/layout/styles.d.ts +0 -43
- package/dist/streams/layout/styles.js +0 -1
- package/dist/streams/layout/type-guards.d.ts +0 -8
- package/dist/streams/layout/type-guards.js +0 -21
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +0 -13
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +0 -7
- package/dist/streams/stream-page-viewer/index.d.ts +0 -2
- package/dist/streams/stream-page-viewer/index.js +0 -1
- package/dist/streams/stream-page-viewer/mapper.d.ts +0 -3
- package/dist/streams/stream-page-viewer/mapper.js +0 -22
- package/dist/streams/stream-page-viewer/operations.generated.d.ts +0 -10
- package/dist/streams/stream-page-viewer/operations.generated.js +0 -27
- package/dist/streams/stream-page-viewer/operations.graphql +0 -8
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +0 -13
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +0 -10
- package/dist/streams/stream-page-viewer/types.d.ts +0 -18
- package/dist/streams/stream-page-viewer/types.js +0 -1
- package/dist/streams/stream-player/action-button.svelte +0 -38
- package/dist/streams/stream-player/action-button.svelte.d.ts +0 -10
- package/dist/streams/stream-player/cmp.stream-player.svelte +0 -149
- package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +0 -17
- package/dist/streams/stream-player/controls.svelte +0 -230
- package/dist/streams/stream-player/controls.svelte.d.ts +0 -14
- package/dist/streams/stream-player/index.d.ts +0 -36
- package/dist/streams/stream-player/index.js +0 -50
- package/dist/streams/stream-player/mapper.d.ts +0 -3
- package/dist/streams/stream-player/mapper.js +0 -15
- package/dist/streams/stream-player/operations.generated.d.ts +0 -65
- package/dist/streams/stream-player/operations.generated.js +0 -196
- package/dist/streams/stream-player/operations.graphql +0 -35
- package/dist/streams/stream-player/stream-overview.svelte +0 -239
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +0 -17
- package/dist/streams/stream-player/stream-player-buffer.svelte.d.ts +0 -25
- package/dist/streams/stream-player/stream-player-buffer.svelte.js +0 -84
- package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +0 -12
- package/dist/streams/stream-player/stream-player-localization.svelte.js +0 -10
- package/dist/streams/stream-player/types.d.ts +0 -12
- package/dist/streams/stream-player/types.js +0 -1
- package/dist/streams/stream-player/ui-manager.svelte.d.ts +0 -17
- package/dist/streams/stream-player/ui-manager.svelte.js +0 -26
- package/dist/ui/button/cmp.button.svelte +0 -10
- package/dist/ui/button/cmp.button.svelte.d.ts +0 -16
- package/dist/ui/button/index.d.ts +0 -2
- package/dist/ui/button/index.js +0 -2
- package/dist/ui/button/resources/button-base.svelte +0 -84
- package/dist/ui/button/resources/button-base.svelte.d.ts +0 -13
- package/dist/ui/button/resources/button-theme.svelte +0 -204
- package/dist/ui/button/resources/button-theme.svelte.d.ts +0 -10
- package/dist/ui/button/resources/button-types.d.ts +0 -21
- package/dist/ui/button/resources/button-types.js +0 -23
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte +0 -5
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +0 -7
- package/dist/ui/dynamic-component/index.d.ts +0 -2
- package/dist/ui/dynamic-component/index.js +0 -2
- package/dist/ui/dynamic-component/types.svelte.d.ts +0 -11
- package/dist/ui/dynamic-component/types.svelte.js +0 -13
- package/dist/ui/icon/cmp.icon.svelte +0 -113
- package/dist/ui/icon/cmp.icon.svelte.d.ts +0 -8
- package/dist/ui/icon/index.d.ts +0 -2
- package/dist/ui/icon/index.js +0 -2
- package/dist/ui/icon/types.d.ts +0 -9
- package/dist/ui/icon/types.js +0 -10
- package/dist/ui/image/cmp.image-round.svelte +0 -41
- package/dist/ui/image/cmp.image-round.svelte.d.ts +0 -11
- package/dist/ui/image/cmp.image-rounded.svelte +0 -71
- package/dist/ui/image/cmp.image-rounded.svelte.d.ts +0 -11
- package/dist/ui/image/cmp.image-stub.svelte +0 -34
- package/dist/ui/image/cmp.image-stub.svelte.d.ts +0 -18
- package/dist/ui/image/cmp.image.svelte +0 -82
- package/dist/ui/image/cmp.image.svelte.d.ts +0 -13
- package/dist/ui/image/image-state.d.ts +0 -6
- package/dist/ui/image/image-state.js +0 -17
- package/dist/ui/image/index.d.ts +0 -4
- package/dist/ui/image/index.js +0 -4
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte +0 -84
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte.d.ts +0 -11
- package/dist/ui/infinite-scrolling/index.d.ts +0 -1
- package/dist/ui/infinite-scrolling/index.js +0 -1
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +0 -89
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +0 -12
- package/dist/ui/line-clamp/index.d.ts +0 -2
- package/dist/ui/line-clamp/index.js +0 -2
- package/dist/ui/line-clamp/line-clamp-localization.svelte.d.ts +0 -9
- package/dist/ui/line-clamp/line-clamp-localization.svelte.js +0 -15
- package/dist/ui/line-clamp/line-clamp-types.d.ts +0 -3
- package/dist/ui/line-clamp/line-clamp-types.js +0 -1
- package/dist/ui/line-clamp/line-clamp-utils.d.ts +0 -8
- package/dist/ui/line-clamp/line-clamp-utils.js +0 -33
- package/dist/ui/loading/cmp.loading.svelte +0 -97
- package/dist/ui/loading/cmp.loading.svelte.d.ts +0 -9
- package/dist/ui/loading/index.d.ts +0 -1
- package/dist/ui/loading/index.js +0 -1
- package/dist/ui/media-item-view/cmp.media-item-view.svelte +0 -91
- package/dist/ui/media-item-view/cmp.media-item-view.svelte.d.ts +0 -13
- package/dist/ui/media-item-view/index.d.ts +0 -1
- package/dist/ui/media-item-view/index.js +0 -1
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +0 -278
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte.d.ts +0 -13
- package/dist/ui/media-items-gallery/index.d.ts +0 -1
- package/dist/ui/media-items-gallery/index.js +0 -1
- package/dist/ui/media-items-gallery/types.d.ts +0 -12
- package/dist/ui/media-items-gallery/types.js +0 -35
- package/dist/ui/media-playback/index.d.ts +0 -2
- package/dist/ui/media-playback/index.js +0 -2
- package/dist/ui/media-playback/playback-manager.svelte.d.ts +0 -25
- package/dist/ui/media-playback/playback-manager.svelte.js +0 -62
- package/dist/ui/media-playback/volume-manager.svelte.d.ts +0 -10
- package/dist/ui/media-playback/volume-manager.svelte.js +0 -27
- package/dist/ui/player/cmp.player-slider.svelte +0 -161
- package/dist/ui/player/cmp.player-slider.svelte.d.ts +0 -33
- package/dist/ui/player/index.d.ts +0 -4
- package/dist/ui/player/index.js +0 -3
- package/dist/ui/player/player-buffer.svelte.d.ts +0 -28
- package/dist/ui/player/player-buffer.svelte.js +0 -64
- package/dist/ui/player/prevent-slider-scroll.d.ts +0 -5
- package/dist/ui/player/prevent-slider-scroll.js +0 -11
- package/dist/ui/player/types.d.ts +0 -14
- package/dist/ui/player/types.js +0 -1
- package/dist/ui/progress/cmp.progress.svelte +0 -37
- package/dist/ui/progress/cmp.progress.svelte.d.ts +0 -6
- package/dist/ui/progress/index.d.ts +0 -1
- package/dist/ui/progress/index.js +0 -1
- package/dist/ui/proportional-container/cmp.proportional-container.svelte +0 -39
- package/dist/ui/proportional-container/cmp.proportional-container.svelte.d.ts +0 -8
- package/dist/ui/proportional-container/index.d.ts +0 -1
- package/dist/ui/proportional-container/index.js +0 -1
- package/dist/ui/seek-bar/cmp.seek-bar.svelte +0 -63
- package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +0 -12
- package/dist/ui/seek-bar/index.d.ts +0 -1
- package/dist/ui/seek-bar/index.js +0 -1
- package/dist/ui/shadow-dom/_normalize.scss +0 -350
- package/dist/ui/shadow-dom/_reset.scss +0 -189
- package/dist/ui/shadow-dom/index.d.ts +0 -1
- package/dist/ui/shadow-dom/index.js +0 -1
- package/dist/ui/shadow-dom/shadow-host.d.ts +0 -8
- package/dist/ui/shadow-dom/shadow-host.js +0 -40
- package/dist/ui/spotlight-layout/cmp.spotlight-layout.svelte +0 -120
- package/dist/ui/spotlight-layout/cmp.spotlight-layout.svelte.d.ts +0 -18
- package/dist/ui/spotlight-layout/index.d.ts +0 -1
- package/dist/ui/spotlight-layout/index.js +0 -1
- package/dist/ui/time-ago/cmp.time-ago.svelte +0 -69
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +0 -9
- package/dist/ui/time-ago/index.d.ts +0 -2
- package/dist/ui/time-ago/index.js +0 -1
- package/dist/ui/time-ago/time-ago-localization.svelte.d.ts +0 -21
- package/dist/ui/time-ago/time-ago-localization.svelte.js +0 -39
- package/dist/ui/video/cmp.video.svelte +0 -377
- package/dist/ui/video/cmp.video.svelte.d.ts +0 -24
- package/dist/ui/video/index.d.ts +0 -1
- package/dist/ui/video/index.js +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { Currency } from '../../core/enums';
|
|
2
|
-
export type ShortVideoViewerModel = {
|
|
3
|
-
id: string;
|
|
4
|
-
media: {
|
|
5
|
-
isImage: true;
|
|
6
|
-
url: string;
|
|
7
|
-
} | {
|
|
8
|
-
isImage: false;
|
|
9
|
-
url: string;
|
|
10
|
-
thumbnailUrl: string;
|
|
11
|
-
};
|
|
12
|
-
text?: string | null;
|
|
13
|
-
heading: ShortVideoViewerHeadingModel;
|
|
14
|
-
products: ShortVideoViewerProductModel[];
|
|
15
|
-
ad: ShortVideoViewerAdModel | null;
|
|
16
|
-
};
|
|
17
|
-
export type ShortVideoViewerHeadingModel = {
|
|
18
|
-
image: string | null;
|
|
19
|
-
name: string;
|
|
20
|
-
displayDate: string;
|
|
21
|
-
viewsCount: number;
|
|
22
|
-
};
|
|
23
|
-
export type ShortVideoViewerAdModel = {
|
|
24
|
-
id: string;
|
|
25
|
-
image: string | null;
|
|
26
|
-
title: string;
|
|
27
|
-
description: string | null;
|
|
28
|
-
buttonText: string | null;
|
|
29
|
-
buttonUrl: string | null;
|
|
30
|
-
openLinkInNewWindow: boolean | null;
|
|
31
|
-
};
|
|
32
|
-
export type ShortVideoViewerProductModel = {
|
|
33
|
-
id: string;
|
|
34
|
-
title: string;
|
|
35
|
-
image: string | null;
|
|
36
|
-
link: string | null;
|
|
37
|
-
price: number;
|
|
38
|
-
currency: Currency;
|
|
39
|
-
salePrice: number | null;
|
|
40
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare class ShortVideoViewerUiManager {
|
|
2
|
-
readonly globalCssVariables: string;
|
|
3
|
-
readonly showActionsInsideFrame: boolean;
|
|
4
|
-
readonly showAttachments: boolean;
|
|
5
|
-
private readonly buttonSize;
|
|
6
|
-
private actionsPanelWidth;
|
|
7
|
-
private availableSideSpace;
|
|
8
|
-
private canShowAttachments;
|
|
9
|
-
updateActionsPanelWidth: (value: number) => void;
|
|
10
|
-
updateAvailableSideSpace: (value: number) => void;
|
|
11
|
-
updateCanShowAttachments: (value: boolean) => void;
|
|
12
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export class ShortVideoViewerUiManager {
|
|
2
|
-
globalCssVariables = $derived.by(() => {
|
|
3
|
-
const values = [`--_short-video-viewer--button--size: ${this.buttonSize}px`];
|
|
4
|
-
return values.join(';');
|
|
5
|
-
});
|
|
6
|
-
showActionsInsideFrame = $derived.by(() => {
|
|
7
|
-
return this.actionsPanelWidth + 40 > this.availableSideSpace;
|
|
8
|
-
});
|
|
9
|
-
showAttachments = $derived.by(() => {
|
|
10
|
-
return this.canShowAttachments;
|
|
11
|
-
});
|
|
12
|
-
buttonSize = 40;
|
|
13
|
-
actionsPanelWidth = $state(0);
|
|
14
|
-
availableSideSpace = $state(0);
|
|
15
|
-
// is provided from the calling side
|
|
16
|
-
canShowAttachments = $state(true);
|
|
17
|
-
updateActionsPanelWidth = (value) => {
|
|
18
|
-
this.actionsPanelWidth = value;
|
|
19
|
-
};
|
|
20
|
-
updateAvailableSideSpace = (value) => {
|
|
21
|
-
this.availableSideSpace = value;
|
|
22
|
-
};
|
|
23
|
-
updateCanShowAttachments = (value) => {
|
|
24
|
-
this.canShowAttachments = value;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script lang="ts">let { children, on } = $props();
|
|
2
|
-
export {};
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<button type="button" class="action-button" onclick={() => on.click()}>
|
|
6
|
-
{@render children()}
|
|
7
|
-
</button>
|
|
8
|
-
|
|
9
|
-
<style>@keyframes fadeIn {
|
|
10
|
-
0% {
|
|
11
|
-
opacity: 1;
|
|
12
|
-
}
|
|
13
|
-
50% {
|
|
14
|
-
opacity: 0.4;
|
|
15
|
-
}
|
|
16
|
-
100% {
|
|
17
|
-
opacity: 1;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
.action-button {
|
|
21
|
-
--_short-video-player--action-button--size: var(--short-video-player--action-button--size);
|
|
22
|
-
--_action-button--background: var(--action-button-background, #1c1c1c);
|
|
23
|
-
width: var(--_short-video-player--action-button--size);
|
|
24
|
-
min-width: var(--_short-video-player--action-button--size);
|
|
25
|
-
max-width: var(--_short-video-player--action-button--size);
|
|
26
|
-
height: var(--_short-video-player--action-button--size);
|
|
27
|
-
min-height: var(--_short-video-player--action-button--size);
|
|
28
|
-
max-height: var(--_short-video-player--action-button--size);
|
|
29
|
-
display: flex;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
align-items: center;
|
|
32
|
-
line-height: 0;
|
|
33
|
-
background: var(--_action-button--background);
|
|
34
|
-
border-radius: 50%;
|
|
35
|
-
--icon--size: 1.25rem;
|
|
36
|
-
z-index: 1;
|
|
37
|
-
color: #ffffff;
|
|
38
|
-
}</style>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
type Props = {
|
|
3
|
-
on: {
|
|
4
|
-
click: () => void;
|
|
5
|
-
};
|
|
6
|
-
children: Snippet;
|
|
7
|
-
};
|
|
8
|
-
declare const ActionButton: import("svelte").Component<Props, {}, "">;
|
|
9
|
-
type ActionButton = ReturnType<typeof ActionButton>;
|
|
10
|
-
export default ActionButton;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<script lang="ts">var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
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 { ShortVideoViewer } from '../short-video-viewer';
|
|
11
|
-
import { PlayerBuffer, PlayerSlider } from '../../ui/player';
|
|
12
|
-
import { SpotlightLayout } from '../../ui/spotlight-layout';
|
|
13
|
-
import { default as Controls } from './controls.svelte';
|
|
14
|
-
import { ShortVideosPlayerLocalization } from './short-videos-player-localization.svelte';
|
|
15
|
-
import { ShortVideoPlayerUiManager } from './ui-manager.svelte';
|
|
16
|
-
import { onDestroy, onMount } from 'svelte';
|
|
17
|
-
let { shortVideosProvider, localization: localizationInit, on } = $props();
|
|
18
|
-
const localization = $derived(new ShortVideosPlayerLocalization(localizationInit));
|
|
19
|
-
const buffer = $derived(new PlayerBuffer(shortVideosProvider));
|
|
20
|
-
const uiManager = new ShortVideoPlayerUiManager();
|
|
21
|
-
onMount(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
-
uiManager.detailsCollapsed = window && window.innerWidth < window.innerHeight;
|
|
23
|
-
}));
|
|
24
|
-
onDestroy(() => {
|
|
25
|
-
// end tracking the short video
|
|
26
|
-
});
|
|
27
|
-
const handleDimensionsChanged = (dimensions) => {
|
|
28
|
-
uiManager.updateDimensions({
|
|
29
|
-
mainViewColumnWidth: dimensions.mainSceneWidth,
|
|
30
|
-
viewTotalWidth: dimensions.totalWidth
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<div class="short-videos-player-container">
|
|
36
|
-
<div class="short-videos-player" style={uiManager.globalCssVariables}>
|
|
37
|
-
{#if buffer}
|
|
38
|
-
<SpotlightLayout ratio={9 / 16} on={{ dimensionsChanged: handleDimensionsChanged }}>
|
|
39
|
-
<div class="short-videos-player__content">
|
|
40
|
-
<PlayerSlider buffer={buffer}>
|
|
41
|
-
{#snippet children({ item })}
|
|
42
|
-
<ShortVideoViewer model={item} autoplay="on-appearance" showAttachments={uiManager.showShortVideoOverlay} />
|
|
43
|
-
{/snippet}
|
|
44
|
-
</PlayerSlider>
|
|
45
|
-
</div>
|
|
46
|
-
</SpotlightLayout>
|
|
47
|
-
<Controls buffer={buffer} uiManager={uiManager} localization={localization} on={{ closePlayer: () => on?.closePlayer?.() }} />
|
|
48
|
-
{/if}
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<style>@keyframes fadeIn {
|
|
53
|
-
0% {
|
|
54
|
-
opacity: 1;
|
|
55
|
-
}
|
|
56
|
-
50% {
|
|
57
|
-
opacity: 0.4;
|
|
58
|
-
}
|
|
59
|
-
100% {
|
|
60
|
-
opacity: 1;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
.short-videos-player-container {
|
|
64
|
-
width: 100%;
|
|
65
|
-
min-width: 100%;
|
|
66
|
-
max-width: 100%;
|
|
67
|
-
height: 100%;
|
|
68
|
-
min-height: 100%;
|
|
69
|
-
max-height: 100%;
|
|
70
|
-
container-type: inline-size;
|
|
71
|
-
display: flex;
|
|
72
|
-
position: relative;
|
|
73
|
-
background: #000000;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.short-videos-player {
|
|
77
|
-
display: flex;
|
|
78
|
-
flex: 1;
|
|
79
|
-
padding: 0.625rem 0;
|
|
80
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
81
|
-
}
|
|
82
|
-
@container (width < 576px) {
|
|
83
|
-
.short-videos-player {
|
|
84
|
-
padding: 0;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
.short-videos-player__content {
|
|
88
|
-
width: 100%;
|
|
89
|
-
height: 100%;
|
|
90
|
-
--short-video-viewer--actions-panel--bottom: 5rem;
|
|
91
|
-
}</style>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type ShortVideoViewerModel } from '../short-video-viewer';
|
|
2
|
-
import { type PlayerItemsProvider } from '../../ui/player';
|
|
3
|
-
import { type IShortVideosPlayerLocalization } from './short-videos-player-localization.svelte';
|
|
4
|
-
type Props = {
|
|
5
|
-
shortVideosProvider: PlayerItemsProvider<ShortVideoViewerModel>;
|
|
6
|
-
localization?: IShortVideosPlayerLocalization;
|
|
7
|
-
on?: {
|
|
8
|
-
closePlayer?: () => void;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
12
|
-
type Cmp = ReturnType<typeof Cmp>;
|
|
13
|
-
export default Cmp;
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { ShortVideoDetails, ShortVideoViewerAttachments, ShortVideoViewerAttachmentsInline } from '../short-video-viewer';
|
|
2
|
-
import { Icon } from '../../ui/icon';
|
|
3
|
-
import { MediaVolumeManager } from '../../ui/media-playback';
|
|
4
|
-
import { default as ActionButton } from './action-button.svelte';
|
|
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';
|
|
12
|
-
let { buffer, uiManager, localization, on } = $props();
|
|
13
|
-
const toggleMuted = () => {
|
|
14
|
-
MediaVolumeManager.isMuted = !MediaVolumeManager.isMuted;
|
|
15
|
-
};
|
|
16
|
-
const shortVideo = $derived(buffer.current);
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<div class="short-video-player-controls">
|
|
20
|
-
<div class="short-video-player-controls__left">
|
|
21
|
-
{#if shortVideo && uiManager.detailsCollapsed && !uiManager.showShortVideoOverlay}
|
|
22
|
-
<div class="short-video-player-controls__short-video-overlay">
|
|
23
|
-
<div class="short-video-player-controls__short-video-attachments-inline">
|
|
24
|
-
<ShortVideoViewerAttachmentsInline model={shortVideo} />
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
{/if}
|
|
28
|
-
<div class="short-video-player-controls__navigation-buttons">
|
|
29
|
-
<button type="button" class="navigation-button" disabled={!buffer.canLoadPrevious} onclick={buffer.loadPrevious}>
|
|
30
|
-
<Icon src={IconChevronUp} />
|
|
31
|
-
</button>
|
|
32
|
-
<button type="button" class="navigation-button" disabled={!buffer.canLoadNext} onclick={buffer.loadNext}>
|
|
33
|
-
<Icon src={IconChevronDown} />
|
|
34
|
-
</button>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="short-video-player-controls__right">
|
|
38
|
-
{#if shortVideo}
|
|
39
|
-
<div class="short-video-player-controls__short-video-attachments">
|
|
40
|
-
<ShortVideoViewerAttachments shortVideo={shortVideo} localization={localization.shortVideoDetailsLocalization?.attachmentsLocalization} />
|
|
41
|
-
</div>
|
|
42
|
-
{/if}
|
|
43
|
-
<div class="short-video-player-controls__controls">
|
|
44
|
-
{#if shortVideo}
|
|
45
|
-
<ActionButton on={{ click: toggleMuted }}>
|
|
46
|
-
{#if MediaVolumeManager.isMuted}
|
|
47
|
-
<Icon src={IconSpeakerMute} />
|
|
48
|
-
{:else}
|
|
49
|
-
<Icon src={IconSpeaker2} />
|
|
50
|
-
{/if}
|
|
51
|
-
</ActionButton>
|
|
52
|
-
{/if}
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
{#if shortVideo && !uiManager.isMobileView}
|
|
58
|
-
<ShortVideoDetails shortVideo={shortVideo} collapsed={uiManager.detailsCollapsed} localization={localization.shortVideoDetailsLocalization} />
|
|
59
|
-
<div class="toggle-collapsed-button">
|
|
60
|
-
<ActionButton on={{ click: () => (uiManager.detailsCollapsed = !uiManager.detailsCollapsed) }}>
|
|
61
|
-
<Icon src={IconPanelRightGallery} />
|
|
62
|
-
</ActionButton>
|
|
63
|
-
</div>
|
|
64
|
-
{/if}
|
|
65
|
-
<button type="button" class="close-button navigation-button" onclick={on.closePlayer}>
|
|
66
|
-
<Icon src={IconDismiss} />
|
|
67
|
-
</button>
|
|
68
|
-
|
|
69
|
-
<style>@keyframes fadeIn {
|
|
70
|
-
0% {
|
|
71
|
-
opacity: 1;
|
|
72
|
-
}
|
|
73
|
-
50% {
|
|
74
|
-
opacity: 0.4;
|
|
75
|
-
}
|
|
76
|
-
100% {
|
|
77
|
-
opacity: 1;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
.close-button {
|
|
81
|
-
position: absolute;
|
|
82
|
-
top: var(--short-video-player--controls--offset-vertical);
|
|
83
|
-
right: var(--short-video-player--controls--offset-horizontal);
|
|
84
|
-
z-index: 1;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.toggle-collapsed-button {
|
|
88
|
-
position: absolute;
|
|
89
|
-
bottom: var(--short-video-player--controls--offset-vertical);
|
|
90
|
-
right: var(--short-video-player--controls--offset-horizontal);
|
|
91
|
-
z-index: 1;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.short-video-player-controls {
|
|
95
|
-
position: absolute;
|
|
96
|
-
top: 0;
|
|
97
|
-
right: 0;
|
|
98
|
-
height: 100%;
|
|
99
|
-
width: var(--short-video-player--sidebar--available-space);
|
|
100
|
-
display: flex;
|
|
101
|
-
justify-content: space-between;
|
|
102
|
-
gap: 2.5rem;
|
|
103
|
-
padding: var(--short-video-player--controls--offset-vertical) var(--short-video-player--controls--offset-horizontal);
|
|
104
|
-
container-type: inline-size;
|
|
105
|
-
}
|
|
106
|
-
.short-video-player-controls__left {
|
|
107
|
-
display: flex;
|
|
108
|
-
flex-direction: column;
|
|
109
|
-
gap: 2.5rem;
|
|
110
|
-
justify-content: flex-end;
|
|
111
|
-
}
|
|
112
|
-
.short-video-player-controls__right {
|
|
113
|
-
flex: 1;
|
|
114
|
-
display: flex;
|
|
115
|
-
justify-content: space-between;
|
|
116
|
-
align-items: flex-end;
|
|
117
|
-
flex-direction: column;
|
|
118
|
-
padding-top: 3.75rem;
|
|
119
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
120
|
-
}
|
|
121
|
-
@container (width < 9.375rem) {
|
|
122
|
-
.short-video-player-controls__right {
|
|
123
|
-
display: none;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
.short-video-player-controls__short-video-overlay {
|
|
127
|
-
gap: 2.5rem;
|
|
128
|
-
display: flex;
|
|
129
|
-
flex: 1;
|
|
130
|
-
min-height: 0;
|
|
131
|
-
flex-direction: column;
|
|
132
|
-
align-items: flex-start;
|
|
133
|
-
justify-content: flex-end;
|
|
134
|
-
--short-video-viewer--interactions--icon--size: var(--short-video-player--navigation-button--size);
|
|
135
|
-
--short-video-viewer--interactions--background--color: #1c1c1c;
|
|
136
|
-
--short-video-viewer--interactions--counter--color: #f3f4f6;
|
|
137
|
-
--short-video-viewer--interactions--icon--font-color: #f3f4f6;
|
|
138
|
-
}
|
|
139
|
-
.short-video-player-controls__short-video-attachments-inline {
|
|
140
|
-
display: none;
|
|
141
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
142
|
-
}
|
|
143
|
-
@container (width < calc(21.875rem + 3.75rem)) {
|
|
144
|
-
.short-video-player-controls__short-video-attachments-inline {
|
|
145
|
-
display: contents;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
.short-video-player-controls__short-video-attachments {
|
|
149
|
-
flex: 1;
|
|
150
|
-
overflow-x: hidden;
|
|
151
|
-
overflow-y: auto;
|
|
152
|
-
scrollbar-color: transparent transparent;
|
|
153
|
-
scrollbar-width: thin;
|
|
154
|
-
width: 21.875rem;
|
|
155
|
-
max-width: 21.875rem;
|
|
156
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
157
|
-
}
|
|
158
|
-
.short-video-player-controls__short-video-attachments::-webkit-scrollbar {
|
|
159
|
-
width: 3px;
|
|
160
|
-
height: 3px;
|
|
161
|
-
background: var(--custom-scrollbar-background, transparent);
|
|
162
|
-
visibility: hidden;
|
|
163
|
-
}
|
|
164
|
-
.short-video-player-controls__short-video-attachments::-webkit-scrollbar-thumb {
|
|
165
|
-
background: transparent;
|
|
166
|
-
}
|
|
167
|
-
.short-video-player-controls__short-video-attachments:hover {
|
|
168
|
-
scrollbar-color: var(--custom-scrollbar-color, #7d7d7d) var(--custom-scrollbar-background, transparent);
|
|
169
|
-
scrollbar-width: thin;
|
|
170
|
-
}
|
|
171
|
-
.short-video-player-controls__short-video-attachments:hover::-webkit-scrollbar {
|
|
172
|
-
width: 3px;
|
|
173
|
-
height: 3px;
|
|
174
|
-
background: var(--custom-scrollbar-background, transparent);
|
|
175
|
-
visibility: hidden;
|
|
176
|
-
}
|
|
177
|
-
.short-video-player-controls__short-video-attachments:hover::-webkit-scrollbar-thumb {
|
|
178
|
-
background: var(--custom-scrollbar-color, #7d7d7d);
|
|
179
|
-
}
|
|
180
|
-
@container (width < calc(21.875rem + 3.75rem)) {
|
|
181
|
-
.short-video-player-controls__short-video-attachments {
|
|
182
|
-
display: none;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
.short-video-player-controls__navigation-buttons {
|
|
186
|
-
display: flex;
|
|
187
|
-
flex-direction: column;
|
|
188
|
-
gap: 1rem;
|
|
189
|
-
margin-bottom: 0.625rem;
|
|
190
|
-
z-index: 1;
|
|
191
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
192
|
-
}
|
|
193
|
-
@container (width < 6.25rem) {
|
|
194
|
-
.short-video-player-controls__navigation-buttons {
|
|
195
|
-
visibility: hidden;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
.short-video-player-controls__controls {
|
|
199
|
-
display: flex;
|
|
200
|
-
margin-top: auto;
|
|
201
|
-
gap: 1rem;
|
|
202
|
-
align-self: flex-start;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.navigation-button {
|
|
206
|
-
width: var(--short-video-player--navigation-button--size);
|
|
207
|
-
min-width: var(--short-video-player--navigation-button--size);
|
|
208
|
-
max-width: var(--short-video-player--navigation-button--size);
|
|
209
|
-
height: var(--short-video-player--navigation-button--size);
|
|
210
|
-
min-height: var(--short-video-player--navigation-button--size);
|
|
211
|
-
max-height: var(--short-video-player--navigation-button--size);
|
|
212
|
-
background-color: #000000;
|
|
213
|
-
border: 1px solid #1c1c1c;
|
|
214
|
-
border-radius: 50%;
|
|
215
|
-
text-align: center;
|
|
216
|
-
--icon--color: #ffffff;
|
|
217
|
-
--icon--stroke-width: 0.6;
|
|
218
|
-
}
|
|
219
|
-
.navigation-button:disabled {
|
|
220
|
-
opacity: 0.5;
|
|
221
|
-
cursor: default;
|
|
222
|
-
}</style>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type ShortVideoViewerModel } from '../short-video-viewer';
|
|
2
|
-
import type { IPlayerBuffer } from '../../ui/player';
|
|
3
|
-
import { ShortVideosPlayerLocalization } from './short-videos-player-localization.svelte.js';
|
|
4
|
-
import type { ShortVideoPlayerUiManager } from './ui-manager.svelte';
|
|
5
|
-
type Props = {
|
|
6
|
-
buffer: IPlayerBuffer<ShortVideoViewerModel>;
|
|
7
|
-
uiManager: ShortVideoPlayerUiManager;
|
|
8
|
-
localization: ShortVideosPlayerLocalization;
|
|
9
|
-
on: {
|
|
10
|
-
closePlayer: () => void;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
declare const Controls: import("svelte").Component<Props, {}, "">;
|
|
14
|
-
type Controls = ReturnType<typeof Controls>;
|
|
15
|
-
export default Controls;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ShortVideoViewerModel } from '../short-video-viewer';
|
|
2
|
-
import type { PlayerItemsProvider } from '../../ui/player';
|
|
3
|
-
import type { IShortVideosPlayerLocalization } from './short-videos-player-localization.svelte';
|
|
4
|
-
export type { IShortVideosPlayerLocalization };
|
|
5
|
-
/**
|
|
6
|
-
* Opens the short videos player modal with the specified provider and optional localization.
|
|
7
|
-
*
|
|
8
|
-
* @param init - Configuration options.
|
|
9
|
-
* @param {PlayerItemsProvider<ShortVideoViewerModel>} init.shortVideosProvider - The provider instance supplying short video items to the player.
|
|
10
|
-
* @param {IShortVideosPlayerLocalization} [init.localization] - Optional localization settings for the player UI.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* import { openShortVideosPlayer } from '@streamscloud/embeddable/short-videos-player';
|
|
15
|
-
*
|
|
16
|
-
* openShortVideosPlayer({
|
|
17
|
-
* shortVideosProvider: myShortVideosProvider,
|
|
18
|
-
* localization: {
|
|
19
|
-
* next: 'Next',
|
|
20
|
-
* previous: 'Previous'
|
|
21
|
-
* }
|
|
22
|
-
* });
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export declare const openShortVideosPlayer: (init: {
|
|
26
|
-
shortVideosProvider: PlayerItemsProvider<ShortVideoViewerModel>;
|
|
27
|
-
localization?: IShortVideosPlayerLocalization;
|
|
28
|
-
}) => void;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ShadowHost } from '../../ui/shadow-dom';
|
|
2
|
-
import { default as ShortVideosPlayer } from './cmp.short-videos-player.svelte';
|
|
3
|
-
import { mount } from 'svelte';
|
|
4
|
-
/**
|
|
5
|
-
* Opens the short videos player modal with the specified provider and optional localization.
|
|
6
|
-
*
|
|
7
|
-
* @param init - Configuration options.
|
|
8
|
-
* @param {PlayerItemsProvider<ShortVideoViewerModel>} init.shortVideosProvider - The provider instance supplying short video items to the player.
|
|
9
|
-
* @param {IShortVideosPlayerLocalization} [init.localization] - Optional localization settings for the player UI.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* import { openShortVideosPlayer } from '@streamscloud/embeddable/short-videos-player';
|
|
14
|
-
*
|
|
15
|
-
* openShortVideosPlayer({
|
|
16
|
-
* shortVideosProvider: myShortVideosProvider,
|
|
17
|
-
* localization: {
|
|
18
|
-
* next: 'Next',
|
|
19
|
-
* previous: 'Previous'
|
|
20
|
-
* }
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export const openShortVideosPlayer = (init) => {
|
|
25
|
-
const { shortVideosProvider, localization } = init;
|
|
26
|
-
const shadowHost = new ShadowHost();
|
|
27
|
-
mount(ShortVideosPlayer, {
|
|
28
|
-
target: shadowHost.shadowRoot,
|
|
29
|
-
props: {
|
|
30
|
-
shortVideosProvider,
|
|
31
|
-
localization,
|
|
32
|
-
on: {
|
|
33
|
-
closePlayer: () => {
|
|
34
|
-
shadowHost.remove();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
shadowHost.attachToBody();
|
|
40
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { IShortVideoDetailsLocalization } from '../short-video-viewer';
|
|
2
|
-
export interface IShortVideosPlayerLocalization {
|
|
3
|
-
shortVideoDetailsLocalization?: IShortVideoDetailsLocalization;
|
|
4
|
-
}
|
|
5
|
-
export declare class ShortVideosPlayerLocalization {
|
|
6
|
-
shortVideoDetailsLocalization: IShortVideoDetailsLocalization | undefined;
|
|
7
|
-
constructor(init?: IShortVideosPlayerLocalization);
|
|
8
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare class ShortVideoPlayerUiManager {
|
|
2
|
-
detailsCollapsed: boolean;
|
|
3
|
-
globalCssVariables: string;
|
|
4
|
-
isMobileView: boolean;
|
|
5
|
-
showShortVideoOverlay: boolean;
|
|
6
|
-
private readonly actionButtonSize;
|
|
7
|
-
private readonly navigationButtonSize;
|
|
8
|
-
private readonly controlsOffsetHorizontal;
|
|
9
|
-
private readonly controlsOffsetVertical;
|
|
10
|
-
private viewTotalWidth;
|
|
11
|
-
private mainViewColumnWidth;
|
|
12
|
-
updateDimensions: (dimensions: {
|
|
13
|
-
viewTotalWidth: number;
|
|
14
|
-
mainViewColumnWidth: number;
|
|
15
|
-
}) => void;
|
|
16
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export class ShortVideoPlayerUiManager {
|
|
2
|
-
detailsCollapsed = $state(true);
|
|
3
|
-
globalCssVariables = $derived.by(() => {
|
|
4
|
-
const values = [
|
|
5
|
-
`--short-video-player--action-button--size: ${this.actionButtonSize}px`,
|
|
6
|
-
`--short-video-player--navigation-button--size: ${this.navigationButtonSize}px`,
|
|
7
|
-
`--short-video-player--controls--offset-horizontal: ${this.controlsOffsetHorizontal}px`,
|
|
8
|
-
`--short-video-player--controls--offset-vertical: ${this.controlsOffsetVertical}px`,
|
|
9
|
-
`--short-video-player--sidebar--available-space: ${(this.viewTotalWidth - this.mainViewColumnWidth) / 2}px`
|
|
10
|
-
];
|
|
11
|
-
return values.join(';');
|
|
12
|
-
});
|
|
13
|
-
isMobileView = $derived.by(() => this.viewTotalWidth <= 576);
|
|
14
|
-
showShortVideoOverlay = $derived.by(() => (this.viewTotalWidth - this.mainViewColumnWidth) / 2 <= 70);
|
|
15
|
-
actionButtonSize = 30;
|
|
16
|
-
navigationButtonSize = 40;
|
|
17
|
-
controlsOffsetHorizontal = 15;
|
|
18
|
-
controlsOffsetVertical = 10;
|
|
19
|
-
viewTotalWidth = $state(0);
|
|
20
|
-
mainViewColumnWidth = $state(0);
|
|
21
|
-
updateDimensions = (dimensions) => {
|
|
22
|
-
this.viewTotalWidth = dimensions.viewTotalWidth;
|
|
23
|
-
this.mainViewColumnWidth = dimensions.mainViewColumnWidth;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { ProportionalContainer } from '../../ui/proportional-container';
|
|
2
|
-
import { generateStreamLayoutStyles } from './styles-transformer';
|
|
3
|
-
let { model, children } = $props();
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<ProportionalContainer ratio={9 / 16}>
|
|
7
|
-
<div class="stream-page-layout" style={generateStreamLayoutStyles(model.styles)}>
|
|
8
|
-
{@render children()}
|
|
9
|
-
</div>
|
|
10
|
-
</ProportionalContainer>
|
|
11
|
-
|
|
12
|
-
<style>@keyframes fadeIn {
|
|
13
|
-
0% {
|
|
14
|
-
opacity: 1;
|
|
15
|
-
}
|
|
16
|
-
50% {
|
|
17
|
-
opacity: 0.4;
|
|
18
|
-
}
|
|
19
|
-
100% {
|
|
20
|
-
opacity: 1;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
.stream-page-layout {
|
|
24
|
-
width: 100%;
|
|
25
|
-
min-width: 100%;
|
|
26
|
-
max-width: 100%;
|
|
27
|
-
height: 100%;
|
|
28
|
-
min-height: 100%;
|
|
29
|
-
max-height: 100%;
|
|
30
|
-
position: relative;
|
|
31
|
-
border-radius: 0.25rem;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
container-type: inline-size;
|
|
34
|
-
}</style>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { StreamLayout } from './layout';
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
type Props = {
|
|
4
|
-
model: StreamLayout;
|
|
5
|
-
children: Snippet;
|
|
6
|
-
};
|
|
7
|
-
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
8
|
-
type Cmp = ReturnType<typeof Cmp>;
|
|
9
|
-
export default Cmp;
|