@carbon/ibmdotcom-web-components 2.43.0 → 2.45.0
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/custom-elements.json +681 -0
- package/dist/dotcom-shell.js +3 -3
- package/dist/dotcom-shell.min.js +6 -6
- package/dist/ibmdotcom-web-components-dotcom-shell.js +3 -3
- package/dist/ibmdotcom-web-components-dotcom-shell.min.js +6 -6
- package/dist/{index-025b19d2.js → index-8f9fbd8b.js} +1024 -766
- package/dist/{index-e1103424.js → index-e67dc377.js} +328 -328
- package/dist/{left-nav-menu-86c142ad.js → left-nav-menu-895134d1.js} +6 -6
- package/dist/{left-nav-menu-2c21e619.js → left-nav-menu-b28a0e98.js} +3 -3
- package/dist/{left-nav-menu-category-heading-0600c59b.js → left-nav-menu-category-heading-0a43846a.js} +3 -3
- package/dist/{left-nav-menu-category-heading-20824551.js → left-nav-menu-category-heading-af399ad7.js} +6 -6
- package/dist/{left-nav-menu-item-2b93e65d.js → left-nav-menu-item-4712394b.js} +6 -6
- package/dist/{left-nav-menu-item-9a1c14ca.js → left-nav-menu-item-9a498b0b.js} +3 -3
- package/dist/{left-nav-menu-section-a00058c4.js → left-nav-menu-section-1c64a81d.js} +3 -3
- package/dist/{left-nav-menu-section-9d5ed365.js → left-nav-menu-section-7de71eee.js} +6 -6
- package/dist/{left-nav-overlay-f345f1da.js → left-nav-overlay-74b7a919.js} +3 -3
- package/dist/{left-nav-overlay-6b2e964b.js → left-nav-overlay-f0a862ea.js} +6 -6
- package/dist/{megamenu-category-group-26a8ad72.js → megamenu-category-group-7a57911e.js} +3 -3
- package/dist/{megamenu-category-group-4ea726d6.js → megamenu-category-group-b607dea5.js} +6 -6
- package/dist/{megamenu-category-group-copy-1c975aaa.js → megamenu-category-group-copy-b3b92568.js} +6 -6
- package/dist/{megamenu-category-group-copy-c32be4d2.js → megamenu-category-group-copy-fd864f59.js} +3 -3
- package/dist/{megamenu-category-heading-d8842b4e.js → megamenu-category-heading-9292d71a.js} +6 -6
- package/dist/{megamenu-category-heading-463194ca.js → megamenu-category-heading-bb5993d0.js} +3 -3
- package/dist/{megamenu-category-link-f7f5b5a4.js → megamenu-category-link-b36cd7e6.js} +6 -6
- package/dist/{megamenu-category-link-a84cac86.js → megamenu-category-link-ee2e5258.js} +3 -3
- package/dist/{megamenu-category-link-group-f5f0c0fe.js → megamenu-category-link-group-52858f7c.js} +3 -3
- package/dist/{megamenu-category-link-group-c2bc0133.js → megamenu-category-link-group-d1da04ca.js} +6 -6
- package/dist/{megamenu-left-navigation-e197ca63.js → megamenu-left-navigation-7afdc0cb.js} +3 -3
- package/dist/{megamenu-left-navigation-50e42b59.js → megamenu-left-navigation-e57cd9a4.js} +6 -6
- package/dist/{megamenu-overlay-7b39d3ac.js → megamenu-overlay-3f97003c.js} +6 -6
- package/dist/{megamenu-overlay-84c27fb4.js → megamenu-overlay-5ef478f4.js} +3 -3
- package/dist/{megamenu-tab-7d3084b5.js → megamenu-tab-872dd2ce.js} +6 -6
- package/dist/{megamenu-tab-b7c53fca.js → megamenu-tab-b1d421b3.js} +3 -3
- package/es/components/back-to-top/__stories__/back-to-top.stories.css.js +1 -1
- package/es/components/card-group/card-group.css.js +1 -1
- package/es/components/card-section-offset/card-section-offset.css.js +1 -1
- package/es/components/card-section-simple/card-section-simple.css.js +1 -1
- package/es/components/content-block/content-block.css.js +1 -1
- package/es/components/content-block-cards/content-block-cards.css.js +1 -1
- package/es/components/content-block-media/content-block-media.css.js +1 -1
- package/es/components/content-section/content-section.css.js +1 -1
- package/es/components/cta-block/cta-block.css.js +1 -1
- package/es/components/cta-section/cta-section.css.js +1 -1
- package/es/components/dotcom-shell/dotcom-shell.css.js +1 -1
- package/es/components/footer/footer.css.js +1 -1
- package/es/components/global-banner/global-banner.css.js +1 -1
- package/es/components/leadspace/leadspace.css.js +1 -1
- package/es/components/leadspace-with-search/leadspace-with-search.css.js +1 -1
- package/es/components/link-list-section/link-list-section.css.js +1 -1
- package/es/components/locale-modal/locale-modal.css.js +1 -1
- package/es/components/masthead/masthead-cart.d.ts +1 -1
- package/es/components/masthead/masthead-cart.js +6 -8
- package/es/components/masthead/masthead-cart.js.map +1 -1
- package/es/components/masthead/masthead-l1.css.js +1 -1
- package/es/components/masthead/masthead.css.js +1 -1
- package/es/components/table-of-contents/table-of-contents-cdn.css.js +1 -1
- package/es/components/table-of-contents/table-of-contents.css.js +1 -1
- package/es/components/video-player-v7/defs.d.ts +42 -0
- package/es/components/video-player-v7/defs.js +46 -0
- package/es/components/video-player-v7/defs.js.map +1 -0
- package/es/components/video-player-v7/index.d.ts +11 -0
- package/es/components/video-player-v7/index.js +18 -0
- package/es/components/video-player-v7/index.js.map +1 -0
- package/es/components/video-player-v7/video-player-composite.d.ts +873 -0
- package/es/components/video-player-v7/video-player-composite.js +705 -0
- package/es/components/video-player-v7/video-player-composite.js.map +1 -0
- package/es/components/video-player-v7/video-player-container.d.ts +1219 -0
- package/es/components/video-player-v7/video-player-container.js +392 -0
- package/es/components/video-player-v7/video-player-container.js.map +1 -0
- package/es/components/video-player-v7/video-player.css.js +12 -0
- package/es/components/video-player-v7/video-player.d.ts +807 -0
- package/es/components/video-player-v7/video-player.js +577 -0
- package/es/components/video-player-v7/video-player.js.map +1 -0
- package/es/components-react/video-player-v7/defs.js +9 -0
- package/es/components-react/video-player-v7/video-player-composite.d.ts +32 -0
- package/es/components-react/video-player-v7/video-player-container.d.ts +19 -0
- package/es/components-react/video-player-v7/video-player.d.ts +37 -0
- package/es/globals/scss/themes.css.js +1 -1
- package/es/internal/vendor/@carbon/ibmdotcom-services/services/KalturaPlayerV7/KalturaPlayer.js +366 -0
- package/es/internal/vendor/@carbon/ibmdotcom-services/services/KalturaPlayerV7/index.js +8 -0
- package/es/internal/vendor/@carbon/ibmdotcom-services-store/actions/kalturaPlayerAPIv7.d.ts +54 -0
- package/es/internal/vendor/@carbon/ibmdotcom-services-store/actions/kalturaPlayerAPIv7.js +88 -0
- package/es/internal/vendor/@carbon/ibmdotcom-services-store/actions/kalturaPlayerAPIv7.js.map +1 -0
- package/es/internal/vendor/@carbon/ibmdotcom-services-store/reducers/kalturaPlayerAPIv7.d.ts +18 -0
- package/es/internal/vendor/@carbon/ibmdotcom-services-store/reducers/kalturaPlayerAPIv7.js +88 -0
- package/es/internal/vendor/@carbon/ibmdotcom-services-store/reducers/kalturaPlayerAPIv7.js.map +1 -0
- package/es/internal/vendor/@carbon/ibmdotcom-services-store/types/kalturaPlayerAPIv7.d.ts +77 -0
- package/es/internal/vendor/@carbon/ibmdotcom-services-store/types/kalturaPlayerAPIv7.js +36 -0
- package/es/internal/vendor/@carbon/ibmdotcom-services-store/types/kalturaPlayerAPIv7.js.map +1 -0
- package/lib/components/video-player-v7/defs.js +50 -0
- package/lib/components/video-player-v7/defs.js.map +1 -0
- package/lib/components-react-node/video-player-v7/defs.js +24 -0
- package/lib/internal/vendor/@carbon/ibmdotcom-services/services/KalturaPlayerV7/KalturaPlayer.js +371 -0
- package/lib/internal/vendor/@carbon/ibmdotcom-services/services/KalturaPlayerV7/index.js +13 -0
- package/lib/internal/vendor/@carbon/ibmdotcom-services-store/actions/kalturaPlayerAPIv7.js +104 -0
- package/lib/internal/vendor/@carbon/ibmdotcom-services-store/actions/kalturaPlayerAPIv7.js.map +1 -0
- package/lib/internal/vendor/@carbon/ibmdotcom-services-store/reducers/kalturaPlayerAPIv7.js +94 -0
- package/lib/internal/vendor/@carbon/ibmdotcom-services-store/reducers/kalturaPlayerAPIv7.js.map +1 -0
- package/lib/internal/vendor/@carbon/ibmdotcom-services-store/types/kalturaPlayerAPIv7.js +39 -0
- package/lib/internal/vendor/@carbon/ibmdotcom-services-store/types/kalturaPlayerAPIv7.js.map +1 -0
- package/package.json +7 -7
- package/scss/components/video-player-v7/video-player.scss +8 -0
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _decorate from "@babel/runtime/helpers/esm/decorate";
|
|
3
|
+
let _ = t => t,
|
|
4
|
+
_t,
|
|
5
|
+
_t2,
|
|
6
|
+
_t3,
|
|
7
|
+
_t4,
|
|
8
|
+
_t5,
|
|
9
|
+
_t6,
|
|
10
|
+
_t7,
|
|
11
|
+
_t8,
|
|
12
|
+
_t9;
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
+
/**
|
|
16
|
+
* @license
|
|
17
|
+
*
|
|
18
|
+
* Copyright IBM Corp. 2020, 2025
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
|
+
* LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { LitElement, html, nothing } from 'lit';
|
|
25
|
+
import { property } from 'lit/decorators.js';
|
|
26
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
27
|
+
import FocusMixin from '@carbon/web-components/es/globals/mixins/focus.js';
|
|
28
|
+
import PlayVideo from '../../../es/icons/play-video.js';
|
|
29
|
+
import PlayOutline from '@carbon/web-components/es/icons/play--outline/20.js';
|
|
30
|
+
import PauseOutline from '@carbon/web-components/es/icons/pause--outline/20.js';
|
|
31
|
+
import { formatVideoCaption, formatVideoDuration } from '@carbon/ibmdotcom-utilities/es/utilities/formatVideoCaption/formatVideoCaption.js';
|
|
32
|
+
import settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';
|
|
33
|
+
import KalturaPlayerAPI from '@carbon/ibmdotcom-services/es/services/KalturaPlayerV7/KalturaPlayer.js';
|
|
34
|
+
import { BUTTON_POSITION, VIDEO_PLAYER_CONTENT_STATE, VIDEO_PLAYER_PLAYING_MODE } from "./defs.js";
|
|
35
|
+
import "../image/image.js";
|
|
36
|
+
import styles from "././video-player.css.js";
|
|
37
|
+
import StableSelectorMixin from "../../globals/mixins/stable-selector.js";
|
|
38
|
+
import { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|
|
39
|
+
import ifNonEmpty from '@carbon/web-components/es/globals/directives/if-non-empty.js';
|
|
40
|
+
export { VIDEO_PLAYER_CONTENT_STATE };
|
|
41
|
+
export { VIDEO_PLAYER_PLAYING_MODE };
|
|
42
|
+
const {
|
|
43
|
+
stablePrefix: c4dPrefix
|
|
44
|
+
} = settings;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Video player.
|
|
48
|
+
*
|
|
49
|
+
* @element c4d-video-player-v7
|
|
50
|
+
* @csspart video - The video. Usage `c4d-video-player::part(video)`
|
|
51
|
+
* @csspart button - The play button. Usage `c4d-video-player::part(button)`
|
|
52
|
+
* @csspart image - The thumbnail image. Usage `c4d-video-player::part(image)`
|
|
53
|
+
* @csspart play-video - The play video icon. Usage `c4d-video-player::part(play-video)`
|
|
54
|
+
* @csspart video-container - The video container. Usage `c4d-video-player::part(video-container)`
|
|
55
|
+
* @csspart caption - The caption. Usage `c4d-video-player::part(caption)`
|
|
56
|
+
*/
|
|
57
|
+
let C4DVideoPlayer = _decorate([customElement(`${c4dPrefix}-video-player-v7`)], function (_initialize, _FocusMixin) {
|
|
58
|
+
class C4DVideoPlayer extends _FocusMixin {
|
|
59
|
+
constructor(...args) {
|
|
60
|
+
super(...args);
|
|
61
|
+
_initialize(this);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
F: C4DVideoPlayer,
|
|
66
|
+
d: [{
|
|
67
|
+
kind: "field",
|
|
68
|
+
decorators: [property({
|
|
69
|
+
reflect: true,
|
|
70
|
+
attribute: 'playing-mode'
|
|
71
|
+
})],
|
|
72
|
+
key: "playingMode",
|
|
73
|
+
value() {
|
|
74
|
+
return VIDEO_PLAYER_PLAYING_MODE.INLINE;
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
kind: "field",
|
|
78
|
+
decorators: [property({
|
|
79
|
+
attribute: 'intersection-mode',
|
|
80
|
+
reflect: true,
|
|
81
|
+
type: Boolean
|
|
82
|
+
})],
|
|
83
|
+
key: "intersectionMode",
|
|
84
|
+
value() {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
kind: "field",
|
|
89
|
+
decorators: [property()],
|
|
90
|
+
key: "isPlaying",
|
|
91
|
+
value() {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
kind: "field",
|
|
96
|
+
decorators: [property({
|
|
97
|
+
attribute: 'button-position',
|
|
98
|
+
reflect: true
|
|
99
|
+
})],
|
|
100
|
+
key: "buttonPosition",
|
|
101
|
+
value() {
|
|
102
|
+
return BUTTON_POSITION.BOTTOM_RIGHT;
|
|
103
|
+
}
|
|
104
|
+
}, {
|
|
105
|
+
kind: "field",
|
|
106
|
+
key: "_handleClickOverlay",
|
|
107
|
+
value() {
|
|
108
|
+
return () => {
|
|
109
|
+
if (this.playingMode === VIDEO_PLAYER_PLAYING_MODE.INLINE) {
|
|
110
|
+
this.contentState = VIDEO_PLAYER_CONTENT_STATE.VIDEO;
|
|
111
|
+
}
|
|
112
|
+
const {
|
|
113
|
+
videoId,
|
|
114
|
+
name,
|
|
115
|
+
customVideoDescription
|
|
116
|
+
} = this;
|
|
117
|
+
const {
|
|
118
|
+
eventContentStateChange
|
|
119
|
+
} = this.constructor;
|
|
120
|
+
this.dispatchEvent(new CustomEvent(eventContentStateChange, {
|
|
121
|
+
bubbles: true,
|
|
122
|
+
composed: true,
|
|
123
|
+
detail: {
|
|
124
|
+
videoId,
|
|
125
|
+
contentState: VIDEO_PLAYER_CONTENT_STATE.VIDEO,
|
|
126
|
+
playingMode: this.playingMode,
|
|
127
|
+
name,
|
|
128
|
+
customVideoDescription
|
|
129
|
+
}
|
|
130
|
+
}));
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
134
|
+
kind: "field",
|
|
135
|
+
key: "_handleTogglePlayback",
|
|
136
|
+
value() {
|
|
137
|
+
return () => {
|
|
138
|
+
const {
|
|
139
|
+
videoId
|
|
140
|
+
} = this;
|
|
141
|
+
const {
|
|
142
|
+
eventTogglePlayback
|
|
143
|
+
} = this.constructor;
|
|
144
|
+
this.dispatchEvent(new CustomEvent(eventTogglePlayback, {
|
|
145
|
+
bubbles: true,
|
|
146
|
+
composed: true,
|
|
147
|
+
detail: {
|
|
148
|
+
videoId
|
|
149
|
+
}
|
|
150
|
+
}));
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}, {
|
|
154
|
+
kind: "field",
|
|
155
|
+
key: "_renderContent",
|
|
156
|
+
value() {
|
|
157
|
+
return () => {
|
|
158
|
+
const {
|
|
159
|
+
contentState,
|
|
160
|
+
name,
|
|
161
|
+
thumbnailUrl,
|
|
162
|
+
backgroundMode,
|
|
163
|
+
_handleClickOverlay: handleClickOverlay,
|
|
164
|
+
intersectionMode
|
|
165
|
+
} = this;
|
|
166
|
+
if (intersectionMode) {
|
|
167
|
+
// IF the thumbnail url is empty, it should render nothing
|
|
168
|
+
const thumbnail = thumbnailUrl === '' ? nothing : html(_t || (_t = _` <c4d-image
|
|
169
|
+
default-src="${0}"
|
|
170
|
+
alt="${0}"
|
|
171
|
+
part="image">
|
|
172
|
+
</c4d-image>`), thumbnailUrl, ifNonEmpty(name));
|
|
173
|
+
return html(_t2 || (_t2 = _`
|
|
174
|
+
<div class="${0}--video-player__video">
|
|
175
|
+
${0}
|
|
176
|
+
</div>
|
|
177
|
+
`), c4dPrefix, contentState === VIDEO_PLAYER_CONTENT_STATE.THUMBNAIL ? thumbnail : html(_t3 || (_t3 = _` <slot></slot> `)));
|
|
178
|
+
} else {
|
|
179
|
+
// IF the thumbnail url is empty, it should render nothing
|
|
180
|
+
const thumbnail = thumbnailUrl === '' ? nothing : html(_t4 || (_t4 = _` <c4d-image
|
|
181
|
+
default-src="${0}"
|
|
182
|
+
alt="${0}"
|
|
183
|
+
part="image">
|
|
184
|
+
${0}
|
|
185
|
+
</c4d-image>`), thumbnailUrl, ifNonEmpty(name), PlayVideo({
|
|
186
|
+
slot: 'icon',
|
|
187
|
+
part: 'play-video'
|
|
188
|
+
}));
|
|
189
|
+
return contentState === VIDEO_PLAYER_CONTENT_STATE.THUMBNAIL && !backgroundMode && !this.autoplay ? html(_t5 || (_t5 = _`
|
|
190
|
+
<div class="${0}--video-player__video" part="video">
|
|
191
|
+
<button
|
|
192
|
+
class="${0}--video-player__image-overlay"
|
|
193
|
+
part="button"
|
|
194
|
+
@click="${0}">
|
|
195
|
+
${0}
|
|
196
|
+
</button>
|
|
197
|
+
</div>
|
|
198
|
+
`), c4dPrefix, c4dPrefix, handleClickOverlay, thumbnail) : html(_t6 || (_t6 = _` <slot></slot> `));
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
kind: "method",
|
|
204
|
+
key: "_updateThumbnailUrl",
|
|
205
|
+
value:
|
|
206
|
+
/**
|
|
207
|
+
* The video player's mode showing Inline or Lightbox.
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Triggers playback on intersection with the viewport / carousel.
|
|
212
|
+
*/
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* The current playback state, inherited from the parent.
|
|
216
|
+
*/
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The position of the toggle playback button.
|
|
220
|
+
*/
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Handles `click` event on the video thumbnail.
|
|
224
|
+
*/
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @returns The video content.
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Updates video thumbnail url to match video width
|
|
232
|
+
*/
|
|
233
|
+
function _updateThumbnailUrl() {
|
|
234
|
+
let thumbnailSrc = false;
|
|
235
|
+
try {
|
|
236
|
+
thumbnailSrc = new URL(this.thumbnailUrl);
|
|
237
|
+
} catch (error) {
|
|
238
|
+
// Do nothing.
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// If current thumbnail is from Kaltura and includes this video's ID we should be able to safely update it.
|
|
242
|
+
if (thumbnailSrc && thumbnailSrc.host.toLowerCase().includes('kaltura') && thumbnailSrc.pathname.includes(this.videoId)) {
|
|
243
|
+
this.thumbnailUrl = KalturaPlayerAPI.getThumbnailUrl({
|
|
244
|
+
mediaId: this.videoId,
|
|
245
|
+
width: this.offsetWidth
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* userInitiatedTogglePlaybackState
|
|
252
|
+
*/
|
|
253
|
+
}, {
|
|
254
|
+
kind: "method",
|
|
255
|
+
key: "userInitiatedTogglePlaybackState",
|
|
256
|
+
value: function userInitiatedTogglePlaybackState() {
|
|
257
|
+
const {
|
|
258
|
+
videoId
|
|
259
|
+
} = this;
|
|
260
|
+
const {
|
|
261
|
+
eventPlaybackStateChange
|
|
262
|
+
} = this.constructor;
|
|
263
|
+
this.dispatchEvent(new CustomEvent(eventPlaybackStateChange, {
|
|
264
|
+
bubbles: true,
|
|
265
|
+
composed: true,
|
|
266
|
+
detail: {
|
|
267
|
+
videoId,
|
|
268
|
+
playingMode: this.playingMode
|
|
269
|
+
}
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* The video player's content state.
|
|
275
|
+
*/
|
|
276
|
+
}, {
|
|
277
|
+
kind: "field",
|
|
278
|
+
decorators: [property({
|
|
279
|
+
reflect: true,
|
|
280
|
+
attribute: 'content-state'
|
|
281
|
+
})],
|
|
282
|
+
key: "contentState",
|
|
283
|
+
value() {
|
|
284
|
+
return VIDEO_PLAYER_CONTENT_STATE.THUMBNAIL;
|
|
285
|
+
}
|
|
286
|
+
}, {
|
|
287
|
+
kind: "field",
|
|
288
|
+
decorators: [property({
|
|
289
|
+
type: Number
|
|
290
|
+
})],
|
|
291
|
+
key: "duration",
|
|
292
|
+
value: void 0
|
|
293
|
+
}, {
|
|
294
|
+
kind: "field",
|
|
295
|
+
decorators: [property({
|
|
296
|
+
attribute: false
|
|
297
|
+
})],
|
|
298
|
+
key: "formatCaption",
|
|
299
|
+
value() {
|
|
300
|
+
return formatVideoCaption;
|
|
301
|
+
}
|
|
302
|
+
}, {
|
|
303
|
+
kind: "field",
|
|
304
|
+
decorators: [property({
|
|
305
|
+
attribute: false
|
|
306
|
+
})],
|
|
307
|
+
key: "formatDuration",
|
|
308
|
+
value() {
|
|
309
|
+
return formatVideoDuration;
|
|
310
|
+
}
|
|
311
|
+
}, {
|
|
312
|
+
kind: "field",
|
|
313
|
+
decorators: [property({
|
|
314
|
+
type: Boolean,
|
|
315
|
+
attribute: 'hide-caption'
|
|
316
|
+
})],
|
|
317
|
+
key: "hideCaption",
|
|
318
|
+
value() {
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
}, {
|
|
322
|
+
kind: "field",
|
|
323
|
+
decorators: [property()],
|
|
324
|
+
key: "name",
|
|
325
|
+
value() {
|
|
326
|
+
return '';
|
|
327
|
+
}
|
|
328
|
+
}, {
|
|
329
|
+
kind: "field",
|
|
330
|
+
decorators: [property({
|
|
331
|
+
attribute: 'background-mode',
|
|
332
|
+
reflect: true,
|
|
333
|
+
type: Boolean
|
|
334
|
+
})],
|
|
335
|
+
key: "backgroundMode",
|
|
336
|
+
value() {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
}, {
|
|
340
|
+
kind: "field",
|
|
341
|
+
decorators: [property({
|
|
342
|
+
attribute: 'auto-play',
|
|
343
|
+
reflect: true,
|
|
344
|
+
type: Boolean
|
|
345
|
+
})],
|
|
346
|
+
key: "autoplay",
|
|
347
|
+
value() {
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
}, {
|
|
351
|
+
kind: "field",
|
|
352
|
+
decorators: [property({
|
|
353
|
+
attribute: 'video-description'
|
|
354
|
+
})],
|
|
355
|
+
key: "customVideoDescription",
|
|
356
|
+
value: void 0
|
|
357
|
+
}, {
|
|
358
|
+
kind: "field",
|
|
359
|
+
decorators: [property({
|
|
360
|
+
attribute: 'thumbnail-url'
|
|
361
|
+
})],
|
|
362
|
+
key: "thumbnailUrl",
|
|
363
|
+
value() {
|
|
364
|
+
return '';
|
|
365
|
+
}
|
|
366
|
+
}, {
|
|
367
|
+
kind: "field",
|
|
368
|
+
decorators: [property({
|
|
369
|
+
attribute: 'video-id'
|
|
370
|
+
})],
|
|
371
|
+
key: "videoId",
|
|
372
|
+
value: void 0
|
|
373
|
+
}, {
|
|
374
|
+
kind: "field",
|
|
375
|
+
decorators: [property({
|
|
376
|
+
attribute: 'aspect-ratio'
|
|
377
|
+
})],
|
|
378
|
+
key: "aspectRatio",
|
|
379
|
+
value: void 0
|
|
380
|
+
}, {
|
|
381
|
+
kind: "method",
|
|
382
|
+
key: "render",
|
|
383
|
+
value:
|
|
384
|
+
/**
|
|
385
|
+
* The video duration.
|
|
386
|
+
*/
|
|
387
|
+
/**
|
|
388
|
+
* The formatter for the video caption, composed with the video name and the video duration.
|
|
389
|
+
* Should be changed upon the locale the UI is rendered with.
|
|
390
|
+
*/
|
|
391
|
+
/**
|
|
392
|
+
* The formatter for the video duration.
|
|
393
|
+
* Should be changed upon the locale the UI is rendered with.
|
|
394
|
+
*/
|
|
395
|
+
/**
|
|
396
|
+
* `true` to hide the caption.
|
|
397
|
+
*/
|
|
398
|
+
/**
|
|
399
|
+
* The video name.
|
|
400
|
+
*/
|
|
401
|
+
/**
|
|
402
|
+
* `true` to autoplay, mute video, and hide UI
|
|
403
|
+
*/
|
|
404
|
+
/**
|
|
405
|
+
* `true` to autoplay
|
|
406
|
+
*/
|
|
407
|
+
/**
|
|
408
|
+
* Custom video description. This property should only be set when using `playing-mode="lightbox"`
|
|
409
|
+
*/
|
|
410
|
+
/**
|
|
411
|
+
* The thumbnail URL.
|
|
412
|
+
*/
|
|
413
|
+
/**
|
|
414
|
+
* The video ID.
|
|
415
|
+
*/
|
|
416
|
+
/**
|
|
417
|
+
* Override default aspect ratio of `16x9`.
|
|
418
|
+
* Available aspect ratios:
|
|
419
|
+
*
|
|
420
|
+
* `16x9`, `9x16`, `2x1`, `1x2`, `4x3`, `3x4`, `1x1`
|
|
421
|
+
*/
|
|
422
|
+
function render() {
|
|
423
|
+
const isRTL = this.dir === 'rtl' || getComputedStyle(this).direction === 'rtl';
|
|
424
|
+
const {
|
|
425
|
+
aspectRatio,
|
|
426
|
+
duration,
|
|
427
|
+
formatCaption,
|
|
428
|
+
formatDuration,
|
|
429
|
+
hideCaption,
|
|
430
|
+
name,
|
|
431
|
+
buttonPosition,
|
|
432
|
+
intersectionMode,
|
|
433
|
+
_handleTogglePlayback: handleTogglePlayback,
|
|
434
|
+
_renderContent: renderContent
|
|
435
|
+
} = this;
|
|
436
|
+
const aspectRatioClass = classMap({
|
|
437
|
+
[`${c4dPrefix}--video-player__video-container`]: true,
|
|
438
|
+
[`${c4dPrefix}--video-player__aspect-ratio--${aspectRatio}`]: !!aspectRatio
|
|
439
|
+
});
|
|
440
|
+
const togglePlaybackClass = classMap({
|
|
441
|
+
[`${c4dPrefix}--video-player__toggle-playback`]: true,
|
|
442
|
+
[`${c4dPrefix}--video-player__toggle-playback--${buttonPosition}`]: true
|
|
443
|
+
});
|
|
444
|
+
return html(_t7 || (_t7 = _`
|
|
445
|
+
<div class="${0}" part="video-container">
|
|
446
|
+
${0}
|
|
447
|
+
${0}
|
|
448
|
+
</div>
|
|
449
|
+
${0}
|
|
450
|
+
`), aspectRatioClass, intersectionMode ? html(_t8 || (_t8 = _`
|
|
451
|
+
<button
|
|
452
|
+
class="${0}"
|
|
453
|
+
@click="${0}"
|
|
454
|
+
tabindex="0"
|
|
455
|
+
part="button">
|
|
456
|
+
${0}
|
|
457
|
+
</button>
|
|
458
|
+
`), togglePlaybackClass, handleTogglePlayback, this.isPlaying ? PauseOutline({
|
|
459
|
+
'aria-label': 'Pause'
|
|
460
|
+
}) : PlayOutline({
|
|
461
|
+
'aria-label': 'Play'
|
|
462
|
+
})) : null, renderContent(), hideCaption ? undefined : html(_t9 || (_t9 = _`
|
|
463
|
+
<div
|
|
464
|
+
class="${0}--video-player__video-caption"
|
|
465
|
+
part="caption"
|
|
466
|
+
dir="${0}">
|
|
467
|
+
${0}
|
|
468
|
+
</div>
|
|
469
|
+
`), c4dPrefix, isRTL ? 'rtl' : 'ltr', formatCaption({
|
|
470
|
+
duration: formatDuration({
|
|
471
|
+
duration: !duration ? duration : duration * 1000
|
|
472
|
+
}),
|
|
473
|
+
name
|
|
474
|
+
})));
|
|
475
|
+
}
|
|
476
|
+
}, {
|
|
477
|
+
kind: "method",
|
|
478
|
+
key: "updated",
|
|
479
|
+
value: function updated(changedProperties) {
|
|
480
|
+
if (changedProperties.has('duration') || changedProperties.has('formatCaption') || changedProperties.has('name') || changedProperties.has('backgroundMode')) {
|
|
481
|
+
const {
|
|
482
|
+
duration,
|
|
483
|
+
formatCaption,
|
|
484
|
+
formatDuration,
|
|
485
|
+
name
|
|
486
|
+
} = this;
|
|
487
|
+
const caption = formatCaption({
|
|
488
|
+
duration: formatDuration({
|
|
489
|
+
duration: !duration ? duration : duration * 1000
|
|
490
|
+
}),
|
|
491
|
+
name
|
|
492
|
+
});
|
|
493
|
+
if (caption) {
|
|
494
|
+
this.setAttribute('aria-label', caption);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// Move measurement & API call to callback queue & wait for update to complete.
|
|
499
|
+
setTimeout(async () => {
|
|
500
|
+
await this.updateComplete;
|
|
501
|
+
if (!this.thumbnailUrl.endsWith(`${this.offsetWidth}`)) {
|
|
502
|
+
this._updateThumbnailUrl();
|
|
503
|
+
}
|
|
504
|
+
}, 0);
|
|
505
|
+
}
|
|
506
|
+
}, {
|
|
507
|
+
kind: "method",
|
|
508
|
+
key: "firstUpdated",
|
|
509
|
+
value: function firstUpdated() {
|
|
510
|
+
var _this$parentElement, _this$parentElement2, _this$parentElement3;
|
|
511
|
+
this.tabIndex = 0;
|
|
512
|
+
this.backgroundMode = Boolean((_this$parentElement = this.parentElement) === null || _this$parentElement === void 0 ? void 0 : _this$parentElement.backgroundMode);
|
|
513
|
+
this.intersectionMode = Boolean((_this$parentElement2 = this.parentElement) === null || _this$parentElement2 === void 0 ? void 0 : _this$parentElement2.intersectionMode);
|
|
514
|
+
this.autoplay = Boolean((_this$parentElement3 = this.parentElement) === null || _this$parentElement3 === void 0 ? void 0 : _this$parentElement3.autoPlay);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* The name of the custom event fired after video content state is changed upon a user gesture.
|
|
519
|
+
*/
|
|
520
|
+
}, {
|
|
521
|
+
kind: "get",
|
|
522
|
+
static: true,
|
|
523
|
+
key: "eventContentStateChange",
|
|
524
|
+
value: function () {
|
|
525
|
+
return `${c4dPrefix}-video-player-content-state-changed`;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* The name of the custom event fired requesting playback state change.
|
|
530
|
+
*/
|
|
531
|
+
}, {
|
|
532
|
+
kind: "get",
|
|
533
|
+
static: true,
|
|
534
|
+
key: "eventPlaybackStateChange",
|
|
535
|
+
value: function () {
|
|
536
|
+
return `${c4dPrefix}-video-player-playback-state-changed`;
|
|
537
|
+
}
|
|
538
|
+
}, {
|
|
539
|
+
kind: "get",
|
|
540
|
+
static: true,
|
|
541
|
+
key: "stableSelector",
|
|
542
|
+
value: function () {
|
|
543
|
+
return `${c4dPrefix}--video-player`;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* The name of the custom event fired when a user action toggles playback.
|
|
548
|
+
*/
|
|
549
|
+
}, {
|
|
550
|
+
kind: "get",
|
|
551
|
+
static: true,
|
|
552
|
+
key: "eventTogglePlayback",
|
|
553
|
+
value: function () {
|
|
554
|
+
return `${c4dPrefix}-video-player-toggle-playback`;
|
|
555
|
+
}
|
|
556
|
+
}, {
|
|
557
|
+
kind: "field",
|
|
558
|
+
static: true,
|
|
559
|
+
key: "shadowRootOptions",
|
|
560
|
+
value() {
|
|
561
|
+
return _objectSpread(_objectSpread({}, LitElement.shadowRootOptions), {}, {
|
|
562
|
+
delegatesFocus: true
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
}, {
|
|
566
|
+
kind: "field",
|
|
567
|
+
static: true,
|
|
568
|
+
key: "styles",
|
|
569
|
+
value() {
|
|
570
|
+
return styles;
|
|
571
|
+
}
|
|
572
|
+
}]
|
|
573
|
+
};
|
|
574
|
+
}, FocusMixin(StableSelectorMixin(LitElement)));
|
|
575
|
+
/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */
|
|
576
|
+
export default C4DVideoPlayer;
|
|
577
|
+
//# sourceMappingURL=video-player.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-player.js","names":["LitElement","html","nothing","property","classMap","FocusMixin","PlayVideo","PlayOutline","PauseOutline","formatVideoCaption","formatVideoDuration","settings","KalturaPlayerAPI","BUTTON_POSITION","VIDEO_PLAYER_CONTENT_STATE","VIDEO_PLAYER_PLAYING_MODE","styles","StableSelectorMixin","carbonElement","customElement","ifNonEmpty","stablePrefix","c4dPrefix","C4DVideoPlayer","_decorate","_initialize","_FocusMixin","constructor","args","F","d","kind","decorators","reflect","attribute","key","value","INLINE","type","Boolean","BOTTOM_RIGHT","playingMode","contentState","VIDEO","videoId","name","customVideoDescription","eventContentStateChange","dispatchEvent","CustomEvent","bubbles","composed","detail","eventTogglePlayback","thumbnailUrl","backgroundMode","_handleClickOverlay","handleClickOverlay","intersectionMode","thumbnail","_t","_","_t2","THUMBNAIL","_t3","_t4","slot","part","autoplay","_t5","_t6","_updateThumbnailUrl","thumbnailSrc","URL","error","host","toLowerCase","includes","pathname","getThumbnailUrl","mediaId","width","offsetWidth","userInitiatedTogglePlaybackState","eventPlaybackStateChange","Number","render","isRTL","dir","getComputedStyle","direction","aspectRatio","duration","formatCaption","formatDuration","hideCaption","buttonPosition","_handleTogglePlayback","handleTogglePlayback","_renderContent","renderContent","aspectRatioClass","togglePlaybackClass","_t7","_t8","isPlaying","undefined","_t9","updated","changedProperties","has","caption","setAttribute","setTimeout","updateComplete","endsWith","firstUpdated","_this$parentElement","_this$parentElement2","_this$parentElement3","tabIndex","parentElement","autoPlay","static","_objectSpread","shadowRootOptions","delegatesFocus"],"sources":["components/video-player-v7/video-player.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2025\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport FocusMixin from '@carbon/web-components/es/globals/mixins/focus.js';\nimport PlayVideo from '../../../es/icons/play-video.js';\nimport PlayOutline from '@carbon/web-components/es/icons/play--outline/20.js';\nimport PauseOutline from '@carbon/web-components/es/icons/pause--outline/20.js';\nimport {\n formatVideoCaption,\n formatVideoDuration,\n} from '@carbon/ibmdotcom-utilities/es/utilities/formatVideoCaption/formatVideoCaption.js';\nimport settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport KalturaPlayerAPI from '@carbon/ibmdotcom-services/es/services/KalturaPlayerV7/KalturaPlayer.js';\nimport {\n BUTTON_POSITION,\n VIDEO_PLAYER_CONTENT_STATE,\n VIDEO_PLAYER_PLAYING_MODE,\n} from './defs';\nimport '../image/image';\nimport styles from './video-player.scss';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\nimport ifNonEmpty from '@carbon/web-components/es/globals/directives/if-non-empty.js';\nimport C4DVideoPlayerComposite from './video-player-composite';\n\nexport { VIDEO_PLAYER_CONTENT_STATE };\nexport { VIDEO_PLAYER_PLAYING_MODE };\n\nconst { stablePrefix: c4dPrefix } = settings;\n\n/**\n * Video player.\n *\n * @element c4d-video-player-v7\n * @csspart video - The video. Usage `c4d-video-player::part(video)`\n * @csspart button - The play button. Usage `c4d-video-player::part(button)`\n * @csspart image - The thumbnail image. Usage `c4d-video-player::part(image)`\n * @csspart play-video - The play video icon. Usage `c4d-video-player::part(play-video)`\n * @csspart video-container - The video container. Usage `c4d-video-player::part(video-container)`\n * @csspart caption - The caption. Usage `c4d-video-player::part(caption)`\n */\n@customElement(`${c4dPrefix}-video-player-v7`)\nclass C4DVideoPlayer extends FocusMixin(StableSelectorMixin(LitElement)) {\n /**\n * The video player's mode showing Inline or Lightbox.\n */\n @property({ reflect: true, attribute: 'playing-mode' })\n playingMode = VIDEO_PLAYER_PLAYING_MODE.INLINE;\n\n /**\n * Triggers playback on intersection with the viewport / carousel.\n */\n @property({ attribute: 'intersection-mode', reflect: true, type: Boolean })\n intersectionMode = false;\n\n /**\n * The current playback state, inherited from the parent.\n */\n @property()\n isPlaying = false;\n\n /**\n * The position of the toggle playback button.\n */\n @property({ attribute: 'button-position', reflect: true })\n buttonPosition = BUTTON_POSITION.BOTTOM_RIGHT;\n\n /**\n * Handles `click` event on the video thumbnail.\n */\n protected _handleClickOverlay = () => {\n if (this.playingMode === VIDEO_PLAYER_PLAYING_MODE.INLINE) {\n this.contentState = VIDEO_PLAYER_CONTENT_STATE.VIDEO;\n }\n const { videoId, name, customVideoDescription } = this;\n const { eventContentStateChange } = this\n .constructor as typeof C4DVideoPlayer;\n this.dispatchEvent(\n new CustomEvent(eventContentStateChange, {\n bubbles: true,\n composed: true,\n detail: {\n videoId,\n contentState: VIDEO_PLAYER_CONTENT_STATE.VIDEO,\n playingMode: this.playingMode,\n name,\n customVideoDescription,\n },\n })\n );\n };\n\n protected _handleTogglePlayback = () => {\n const { videoId } = this;\n const { eventTogglePlayback } = this.constructor as typeof C4DVideoPlayer;\n this.dispatchEvent(\n new CustomEvent(eventTogglePlayback, {\n bubbles: true,\n composed: true,\n detail: {\n videoId,\n },\n })\n );\n };\n\n /**\n * @returns The video content.\n */\n protected _renderContent = () => {\n const {\n contentState,\n name,\n thumbnailUrl,\n backgroundMode,\n _handleClickOverlay: handleClickOverlay,\n intersectionMode,\n } = this;\n if (intersectionMode) {\n // IF the thumbnail url is empty, it should render nothing\n const thumbnail =\n thumbnailUrl === ''\n ? nothing\n : html` <c4d-image\n default-src=\"${thumbnailUrl}\"\n alt=\"${ifNonEmpty(name)}\"\n part=\"image\">\n </c4d-image>`;\n return html`\n <div class=\"${c4dPrefix}--video-player__video\">\n ${contentState === VIDEO_PLAYER_CONTENT_STATE.THUMBNAIL\n ? thumbnail\n : html` <slot></slot> `}\n </div>\n `;\n } else {\n // IF the thumbnail url is empty, it should render nothing\n const thumbnail =\n thumbnailUrl === ''\n ? nothing\n : html` <c4d-image\n default-src=\"${thumbnailUrl}\"\n alt=\"${ifNonEmpty(name)}\"\n part=\"image\">\n ${PlayVideo({ slot: 'icon', part: 'play-video' })}\n </c4d-image>`;\n\n return contentState === VIDEO_PLAYER_CONTENT_STATE.THUMBNAIL &&\n !backgroundMode &&\n !this.autoplay\n ? html`\n <div class=\"${c4dPrefix}--video-player__video\" part=\"video\">\n <button\n class=\"${c4dPrefix}--video-player__image-overlay\"\n part=\"button\"\n @click=\"${handleClickOverlay}\">\n ${thumbnail}\n </button>\n </div>\n `\n : html` <slot></slot> `;\n }\n };\n\n /**\n * Updates video thumbnail url to match video width\n */\n protected _updateThumbnailUrl() {\n let thumbnailSrc: false | URL = false;\n\n try {\n thumbnailSrc = new URL(this.thumbnailUrl);\n } catch (error) {\n // Do nothing.\n }\n\n // If current thumbnail is from Kaltura and includes this video's ID we should be able to safely update it.\n if (\n thumbnailSrc &&\n thumbnailSrc.host.toLowerCase().includes('kaltura') &&\n thumbnailSrc.pathname.includes(this.videoId!)\n ) {\n this.thumbnailUrl = KalturaPlayerAPI.getThumbnailUrl({\n mediaId: this.videoId,\n width: this.offsetWidth,\n });\n }\n }\n\n /**\n * userInitiatedTogglePlaybackState\n */\n public userInitiatedTogglePlaybackState() {\n const { videoId } = this;\n const { eventPlaybackStateChange } = this\n .constructor as typeof C4DVideoPlayer;\n this.dispatchEvent(\n new CustomEvent(eventPlaybackStateChange, {\n bubbles: true,\n composed: true,\n detail: {\n videoId,\n playingMode: this.playingMode,\n },\n })\n );\n }\n\n /**\n * The video player's content state.\n */\n @property({ reflect: true, attribute: 'content-state' })\n contentState = VIDEO_PLAYER_CONTENT_STATE.THUMBNAIL;\n\n /**\n * The video duration.\n */\n @property({ type: Number })\n duration?: number;\n\n /**\n * The formatter for the video caption, composed with the video name and the video duration.\n * Should be changed upon the locale the UI is rendered with.\n */\n @property({ attribute: false })\n formatCaption = formatVideoCaption;\n\n /**\n * The formatter for the video duration.\n * Should be changed upon the locale the UI is rendered with.\n */\n @property({ attribute: false })\n formatDuration = formatVideoDuration;\n\n /**\n * `true` to hide the caption.\n */\n @property({ type: Boolean, attribute: 'hide-caption' })\n hideCaption = false;\n\n /**\n * The video name.\n */\n @property()\n name = '';\n\n /**\n * `true` to autoplay, mute video, and hide UI\n */\n @property({ attribute: 'background-mode', reflect: true, type: Boolean })\n backgroundMode = false;\n\n /**\n * `true` to autoplay\n */\n @property({ attribute: 'auto-play', reflect: true, type: Boolean })\n autoplay = false;\n\n /**\n * Custom video description. This property should only be set when using `playing-mode=\"lightbox\"`\n */\n @property({ attribute: 'video-description' })\n customVideoDescription?: string;\n\n /**\n * The thumbnail URL.\n */\n @property({ attribute: 'thumbnail-url' })\n thumbnailUrl = '';\n\n /**\n * The video ID.\n */\n @property({ attribute: 'video-id' })\n videoId?: string;\n\n /**\n * Override default aspect ratio of `16x9`.\n * Available aspect ratios:\n *\n * `16x9`, `9x16`, `2x1`, `1x2`, `4x3`, `3x4`, `1x1`\n */\n @property({ attribute: 'aspect-ratio' })\n aspectRatio?: string;\n\n render() {\n const isRTL =\n this.dir === 'rtl' || getComputedStyle(this).direction === 'rtl';\n\n const {\n aspectRatio,\n duration,\n formatCaption,\n formatDuration,\n hideCaption,\n name,\n buttonPosition,\n intersectionMode,\n _handleTogglePlayback: handleTogglePlayback,\n _renderContent: renderContent,\n } = this;\n\n const aspectRatioClass = classMap({\n [`${c4dPrefix}--video-player__video-container`]: true,\n [`${c4dPrefix}--video-player__aspect-ratio--${aspectRatio}`]:\n !!aspectRatio,\n });\n const togglePlaybackClass = classMap({\n [`${c4dPrefix}--video-player__toggle-playback`]: true,\n [`${c4dPrefix}--video-player__toggle-playback--${buttonPosition}`]: true,\n });\n\n return html`\n <div class=\"${aspectRatioClass}\" part=\"video-container\">\n ${intersectionMode\n ? html`\n <button\n class=\"${togglePlaybackClass}\"\n @click=\"${handleTogglePlayback}\"\n tabindex=\"0\"\n part=\"button\">\n ${this.isPlaying\n ? PauseOutline({ 'aria-label': 'Pause' })\n : PlayOutline({ 'aria-label': 'Play' })}\n </button>\n `\n : null}\n ${renderContent()}\n </div>\n ${hideCaption\n ? undefined\n : html`\n <div\n class=\"${c4dPrefix}--video-player__video-caption\"\n part=\"caption\"\n dir=\"${isRTL ? 'rtl' : 'ltr'}\">\n ${formatCaption({\n duration: formatDuration({\n duration: !duration ? duration : duration * 1000,\n }),\n name,\n })}\n </div>\n `}\n `;\n }\n\n updated(changedProperties) {\n if (\n changedProperties.has('duration') ||\n changedProperties.has('formatCaption') ||\n changedProperties.has('name') ||\n changedProperties.has('backgroundMode')\n ) {\n const { duration, formatCaption, formatDuration, name } = this;\n const caption = formatCaption({\n duration: formatDuration({\n duration: !duration ? duration : duration * 1000,\n }),\n name,\n });\n if (caption) {\n this.setAttribute('aria-label', caption);\n }\n }\n\n // Move measurement & API call to callback queue & wait for update to complete.\n setTimeout(async () => {\n await this.updateComplete;\n if (!this.thumbnailUrl.endsWith(`${this.offsetWidth}`)) {\n this._updateThumbnailUrl();\n }\n }, 0);\n }\n\n firstUpdated() {\n this.tabIndex = 0;\n this.backgroundMode = Boolean(\n (this.parentElement as C4DVideoPlayerComposite)?.backgroundMode\n );\n this.intersectionMode = Boolean(\n (this.parentElement as C4DVideoPlayerComposite)?.intersectionMode\n );\n this.autoplay = Boolean(\n (this.parentElement as C4DVideoPlayerComposite)?.autoPlay\n );\n }\n\n /**\n * The name of the custom event fired after video content state is changed upon a user gesture.\n */\n static get eventContentStateChange() {\n return `${c4dPrefix}-video-player-content-state-changed`;\n }\n\n /**\n * The name of the custom event fired requesting playback state change.\n */\n static get eventPlaybackStateChange() {\n return `${c4dPrefix}-video-player-playback-state-changed`;\n }\n\n static get stableSelector() {\n return `${c4dPrefix}--video-player`;\n }\n\n /**\n * The name of the custom event fired when a user action toggles playback.\n */\n static get eventTogglePlayback() {\n return `${c4dPrefix}-video-player-toggle-playback`;\n }\n\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default C4DVideoPlayer;\n"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,EAAEC,OAAO,QAAQ,KAAK;AAC/C,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,QAAQ,QAAQ,6BAA6B;AACtD,OAAOC,UAAU,MAAM,mDAAmD;AAC1E,OAAOC,SAAS,MAAM,iCAAiC;AACvD,OAAOC,WAAW,MAAM,qDAAqD;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+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { Component } from 'react';
|
|
10
|
+
export interface ComponentProps {
|
|
11
|
+
/**
|
|
12
|
+
* The event handler for the custom event fired after video content state is changed upon a user gesture.
|
|
13
|
+
*/
|
|
14
|
+
onContentStateChange?: (event: CustomEvent) => void;
|
|
15
|
+
/**
|
|
16
|
+
* The event handler for the custom event fired requesting playback state change.
|
|
17
|
+
*/
|
|
18
|
+
onPlaybackStateChange?: (event: CustomEvent) => void;
|
|
19
|
+
/**
|
|
20
|
+
* The event handler for the custom event fired requesting to toggle playback.
|
|
21
|
+
*/
|
|
22
|
+
onTogglePlayback?: (event: CustomEvent) => void;
|
|
23
|
+
[prop: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Component that renders video player from its metadata, etc.
|
|
27
|
+
*
|
|
28
|
+
* @element c4d-video-player-composite-v7
|
|
29
|
+
* @csspart video-player - The video player. Usage `c4d-video-player-composite-v7::part(video-player)`
|
|
30
|
+
*/
|
|
31
|
+
declare class C4DVideoPlayerComposite extends Component<ComponentProps> {}
|
|
32
|
+
export default C4DVideoPlayerComposite;
|