@carbon/ibmdotcom-web-components 2.43.0 → 2.44.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.
Files changed (99) hide show
  1. package/custom-elements.json +681 -0
  2. package/dist/dotcom-shell.js +1 -1
  3. package/dist/dotcom-shell.min.js +5 -5
  4. package/dist/ibmdotcom-web-components-dotcom-shell.js +1 -1
  5. package/dist/ibmdotcom-web-components-dotcom-shell.min.js +5 -5
  6. package/dist/{index-025b19d2.js → index-61a58423.js} +1016 -756
  7. package/dist/{index-e1103424.js → index-ec9bb3a7.js} +327 -327
  8. package/dist/{left-nav-menu-2c21e619.js → left-nav-menu-1ff7160b.js} +1 -1
  9. package/dist/{left-nav-menu-86c142ad.js → left-nav-menu-7d664773.js} +5 -5
  10. package/dist/{left-nav-menu-category-heading-20824551.js → left-nav-menu-category-heading-3fda0fd5.js} +5 -5
  11. package/dist/{left-nav-menu-category-heading-0600c59b.js → left-nav-menu-category-heading-df0252db.js} +1 -1
  12. package/dist/{left-nav-menu-item-9a1c14ca.js → left-nav-menu-item-b217b8fd.js} +1 -1
  13. package/dist/{left-nav-menu-item-2b93e65d.js → left-nav-menu-item-caa0c565.js} +5 -5
  14. package/dist/{left-nav-menu-section-9d5ed365.js → left-nav-menu-section-d00e6604.js} +5 -5
  15. package/dist/{left-nav-menu-section-a00058c4.js → left-nav-menu-section-dbde241d.js} +1 -1
  16. package/dist/{left-nav-overlay-f345f1da.js → left-nav-overlay-cd84d0bc.js} +1 -1
  17. package/dist/{left-nav-overlay-6b2e964b.js → left-nav-overlay-f5867fdc.js} +5 -5
  18. package/dist/{megamenu-category-group-4ea726d6.js → megamenu-category-group-251cebcf.js} +5 -5
  19. package/dist/{megamenu-category-group-26a8ad72.js → megamenu-category-group-802948a9.js} +1 -1
  20. package/dist/{megamenu-category-group-copy-1c975aaa.js → megamenu-category-group-copy-484e9b27.js} +5 -5
  21. package/dist/{megamenu-category-group-copy-c32be4d2.js → megamenu-category-group-copy-7efee05a.js} +1 -1
  22. package/dist/{megamenu-category-heading-463194ca.js → megamenu-category-heading-2190977a.js} +1 -1
  23. package/dist/{megamenu-category-heading-d8842b4e.js → megamenu-category-heading-315eb114.js} +5 -5
  24. package/dist/{megamenu-category-link-f7f5b5a4.js → megamenu-category-link-3d42179f.js} +5 -5
  25. package/dist/{megamenu-category-link-a84cac86.js → megamenu-category-link-84c22ab0.js} +1 -1
  26. package/dist/{megamenu-category-link-group-f5f0c0fe.js → megamenu-category-link-group-3cdb6bfc.js} +1 -1
  27. package/dist/{megamenu-category-link-group-c2bc0133.js → megamenu-category-link-group-94e4b16c.js} +5 -5
  28. package/dist/{megamenu-left-navigation-50e42b59.js → megamenu-left-navigation-b5b03849.js} +5 -5
  29. package/dist/{megamenu-left-navigation-e197ca63.js → megamenu-left-navigation-ee2dc6e8.js} +1 -1
  30. package/dist/{megamenu-overlay-7b39d3ac.js → megamenu-overlay-646b736f.js} +5 -5
  31. package/dist/{megamenu-overlay-84c27fb4.js → megamenu-overlay-6a12d82a.js} +1 -1
  32. package/dist/{megamenu-tab-b7c53fca.js → megamenu-tab-5490376a.js} +1 -1
  33. package/dist/{megamenu-tab-7d3084b5.js → megamenu-tab-99df887a.js} +5 -5
  34. package/es/components/back-to-top/__stories__/back-to-top.stories.css.js +1 -1
  35. package/es/components/card-group/card-group.css.js +1 -1
  36. package/es/components/card-section-offset/card-section-offset.css.js +1 -1
  37. package/es/components/card-section-simple/card-section-simple.css.js +1 -1
  38. package/es/components/content-block/content-block.css.js +1 -1
  39. package/es/components/content-block-cards/content-block-cards.css.js +1 -1
  40. package/es/components/content-block-media/content-block-media.css.js +1 -1
  41. package/es/components/content-section/content-section.css.js +1 -1
  42. package/es/components/cta-block/cta-block.css.js +1 -1
  43. package/es/components/cta-section/cta-section.css.js +1 -1
  44. package/es/components/dotcom-shell/dotcom-shell.css.js +1 -1
  45. package/es/components/footer/footer.css.js +1 -1
  46. package/es/components/global-banner/global-banner.css.js +1 -1
  47. package/es/components/leadspace/leadspace.css.js +1 -1
  48. package/es/components/leadspace-with-search/leadspace-with-search.css.js +1 -1
  49. package/es/components/link-list-section/link-list-section.css.js +1 -1
  50. package/es/components/locale-modal/locale-modal.css.js +1 -1
  51. package/es/components/masthead/masthead-l1.css.js +1 -1
  52. package/es/components/masthead/masthead.css.js +1 -1
  53. package/es/components/table-of-contents/table-of-contents-cdn.css.js +1 -1
  54. package/es/components/table-of-contents/table-of-contents.css.js +1 -1
  55. package/es/components/video-player-v7/defs.d.ts +42 -0
  56. package/es/components/video-player-v7/defs.js +46 -0
  57. package/es/components/video-player-v7/defs.js.map +1 -0
  58. package/es/components/video-player-v7/index.d.ts +11 -0
  59. package/es/components/video-player-v7/index.js +18 -0
  60. package/es/components/video-player-v7/index.js.map +1 -0
  61. package/es/components/video-player-v7/video-player-composite.d.ts +873 -0
  62. package/es/components/video-player-v7/video-player-composite.js +705 -0
  63. package/es/components/video-player-v7/video-player-composite.js.map +1 -0
  64. package/es/components/video-player-v7/video-player-container.d.ts +1219 -0
  65. package/es/components/video-player-v7/video-player-container.js +392 -0
  66. package/es/components/video-player-v7/video-player-container.js.map +1 -0
  67. package/es/components/video-player-v7/video-player.css.js +12 -0
  68. package/es/components/video-player-v7/video-player.d.ts +807 -0
  69. package/es/components/video-player-v7/video-player.js +577 -0
  70. package/es/components/video-player-v7/video-player.js.map +1 -0
  71. package/es/components-react/video-player-v7/defs.js +9 -0
  72. package/es/components-react/video-player-v7/video-player-composite.d.ts +32 -0
  73. package/es/components-react/video-player-v7/video-player-container.d.ts +19 -0
  74. package/es/components-react/video-player-v7/video-player.d.ts +37 -0
  75. package/es/globals/scss/themes.css.js +1 -1
  76. package/es/internal/vendor/@carbon/ibmdotcom-services/services/KalturaPlayerV7/KalturaPlayer.js +366 -0
  77. package/es/internal/vendor/@carbon/ibmdotcom-services/services/KalturaPlayerV7/index.js +8 -0
  78. package/es/internal/vendor/@carbon/ibmdotcom-services-store/actions/kalturaPlayerAPIv7.d.ts +54 -0
  79. package/es/internal/vendor/@carbon/ibmdotcom-services-store/actions/kalturaPlayerAPIv7.js +88 -0
  80. package/es/internal/vendor/@carbon/ibmdotcom-services-store/actions/kalturaPlayerAPIv7.js.map +1 -0
  81. package/es/internal/vendor/@carbon/ibmdotcom-services-store/reducers/kalturaPlayerAPIv7.d.ts +18 -0
  82. package/es/internal/vendor/@carbon/ibmdotcom-services-store/reducers/kalturaPlayerAPIv7.js +88 -0
  83. package/es/internal/vendor/@carbon/ibmdotcom-services-store/reducers/kalturaPlayerAPIv7.js.map +1 -0
  84. package/es/internal/vendor/@carbon/ibmdotcom-services-store/types/kalturaPlayerAPIv7.d.ts +77 -0
  85. package/es/internal/vendor/@carbon/ibmdotcom-services-store/types/kalturaPlayerAPIv7.js +36 -0
  86. package/es/internal/vendor/@carbon/ibmdotcom-services-store/types/kalturaPlayerAPIv7.js.map +1 -0
  87. package/lib/components/video-player-v7/defs.js +50 -0
  88. package/lib/components/video-player-v7/defs.js.map +1 -0
  89. package/lib/components-react-node/video-player-v7/defs.js +24 -0
  90. package/lib/internal/vendor/@carbon/ibmdotcom-services/services/KalturaPlayerV7/KalturaPlayer.js +371 -0
  91. package/lib/internal/vendor/@carbon/ibmdotcom-services/services/KalturaPlayerV7/index.js +13 -0
  92. package/lib/internal/vendor/@carbon/ibmdotcom-services-store/actions/kalturaPlayerAPIv7.js +104 -0
  93. package/lib/internal/vendor/@carbon/ibmdotcom-services-store/actions/kalturaPlayerAPIv7.js.map +1 -0
  94. package/lib/internal/vendor/@carbon/ibmdotcom-services-store/reducers/kalturaPlayerAPIv7.js +94 -0
  95. package/lib/internal/vendor/@carbon/ibmdotcom-services-store/reducers/kalturaPlayerAPIv7.js.map +1 -0
  96. package/lib/internal/vendor/@carbon/ibmdotcom-services-store/types/kalturaPlayerAPIv7.js +39 -0
  97. package/lib/internal/vendor/@carbon/ibmdotcom-services-store/types/kalturaPlayerAPIv7.js.map +1 -0
  98. package/package.json +7 -7
  99. package/scss/components/video-player-v7/video-player.scss +8 -0
@@ -0,0 +1,366 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
+ import _createClass from "@babel/runtime/helpers/createClass";
5
+ var _ref, _process$env$REACT_AP, _process, _process2, _ref2, _process$env$REACT_AP2, _process3, _process4, _ref3, _process$env$REACT_AP3, _process5, _process6, _ref4, _process$env$REACT_AP4, _process7, _process8, _ref5, _process$env$REACT_AP5, _process9, _process0;
6
+ 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; }
7
+ 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; }
8
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
9
+ /**
10
+ * Copyright IBM Corp. 2020, 2024
11
+ *
12
+ * This source code is licensed under the Apache-2.0 license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */
15
+
16
+ import root from 'window-or-global';
17
+
18
+ /**
19
+ * Sets the Kaltura Partner ID
20
+ *
21
+ * @type {number}
22
+ * @private
23
+ */
24
+ var _partnerId = (_ref = (_process$env$REACT_AP = (_process = process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.REACT_APP_KALTURA_PARTNER_ID) !== null && _process$env$REACT_AP !== void 0 ? _process$env$REACT_AP : (_process2 = process) === null || _process2 === void 0 || (_process2 = _process2.env) === null || _process2 === void 0 ? void 0 : _process2.KALTURA_PARTNER_ID) !== null && _ref !== void 0 ? _ref :
25
+ // 1773841;
26
+ 1773841;
27
+
28
+ /**
29
+ * Sets the Kaltura UIConf IDs
30
+ *
31
+ * @type {enum}
32
+ * @private
33
+ */
34
+ var _uiConfIds = {
35
+ VIDEO: (_ref2 = (_process$env$REACT_AP2 = (_process3 = process) === null || _process3 === void 0 || (_process3 = _process3.env) === null || _process3 === void 0 ? void 0 : _process3.REACT_APP_KALTURA_UICONF_ID_VIDEO) !== null && _process$env$REACT_AP2 !== void 0 ? _process$env$REACT_AP2 : (_process4 = process) === null || _process4 === void 0 || (_process4 = _process4.env) === null || _process4 === void 0 ? void 0 : _process4.KALTURA_UICONF_ID_VIDEO) !== null && _ref2 !== void 0 ? _ref2 : 57792212,
36
+ AUDIO: (_ref3 = (_process$env$REACT_AP3 = (_process5 = process) === null || _process5 === void 0 || (_process5 = _process5.env) === null || _process5 === void 0 ? void 0 : _process5.REACT_APP_KALTURA_UICONF_ID_AUDIO) !== null && _process$env$REACT_AP3 !== void 0 ? _process$env$REACT_AP3 : (_process6 = process) === null || _process6 === void 0 || (_process6 = _process6.env) === null || _process6 === void 0 ? void 0 : _process6.KALTURA_UICONF_ID_AUDIO) !== null && _ref3 !== void 0 ? _ref3 : 57792222,
37
+ PLAYLIST: (_ref4 = (_process$env$REACT_AP4 = (_process7 = process) === null || _process7 === void 0 || (_process7 = _process7.env) === null || _process7 === void 0 ? void 0 : _process7.REACT_APP_KALTURA_UICONF_ID_PLAYLIST) !== null && _process$env$REACT_AP4 !== void 0 ? _process$env$REACT_AP4 : (_process8 = process) === null || _process8 === void 0 || (_process8 = _process8.env) === null || _process8 === void 0 ? void 0 : _process8.KALTURA_UICONF_ID_PLAYLIST) !== null && _ref4 !== void 0 ? _ref4 : 57792212,
38
+ REELS: (_ref5 = (_process$env$REACT_AP5 = (_process9 = process) === null || _process9 === void 0 || (_process9 = _process9.env) === null || _process9 === void 0 ? void 0 : _process9.REACT_APP_KALTURA_UICONF_ID_REELS) !== null && _process$env$REACT_AP5 !== void 0 ? _process$env$REACT_AP5 : (_process0 = process) === null || _process0 === void 0 || (_process0 = _process0.env) === null || _process0 === void 0 ? void 0 : _process0.KALTURA_UICONF_ID_REELS) !== null && _ref5 !== void 0 ? _ref5 : 57792212
39
+ };
40
+
41
+ /**
42
+ * The IBM Mediacenter Loader and Player Environment
43
+ * to be called
44
+ *
45
+ * @type {string}
46
+ * @private
47
+ */
48
+ var _ibmEnvironment = process && (process.env.REACT_APP_KALTURA_ENVIRONMENT || process.env.KALTURA_ENVIRONMENT) || 'LATEST';
49
+
50
+ /**
51
+ * All the available enviornments for the Streaming Services Kaltura Player Script
52
+ *
53
+ * @type {enum}
54
+ * @private
55
+ */
56
+ var _ibmEnvironments = {
57
+ DEVELOPMENT: 'development',
58
+ LATEST: 'latest',
59
+ NEXT: 'next'
60
+ };
61
+
62
+ /**
63
+ * Streaming Services Kaltura Player Script URL
64
+ *
65
+ * @private
66
+ */
67
+ var _ibmScriptUrl = function _ibmScriptUrl() {
68
+ var environment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _ibmEnvironment;
69
+ return "https://1.www.s81c.com/common/mediacenter/player/loader/".concat(_ibmEnvironments[environment], "/loader.js");
70
+ };
71
+
72
+ /**
73
+ * Returns boolean if the _scriptLoading and _scriptLoaded flag is false
74
+ *
75
+ * @private
76
+ */
77
+ function _loadScript() {
78
+ var environment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _ibmEnvironment;
79
+ _scriptLoading = true;
80
+ var script = document.createElement('script');
81
+ script.src = _ibmScriptUrl(environment);
82
+ script.async = true;
83
+ document.body.appendChild(script);
84
+ }
85
+
86
+ /**
87
+ * Number of times to retry the script ready loop before failing
88
+ *
89
+ * @type {number}
90
+ * @private
91
+ */
92
+ var _timeoutRetries = 50;
93
+
94
+ /**
95
+ * Tracks the number of attempts for the script ready loop
96
+ *
97
+ * @type {number}
98
+ * @private
99
+ */
100
+ var _attempt = 0;
101
+
102
+ /**
103
+ * Tracks the script status
104
+ *
105
+ * @type {boolean} _scriptLoading to track the script loading or not
106
+ * @private
107
+ */
108
+ var _scriptLoading = false;
109
+
110
+ /**
111
+ * Timeout loop to check script state is the _scriptLoaded state or _scriptLoading state
112
+ *
113
+ * @param {Function} resolve Resolve function
114
+ * @param {Function} reject Reject function
115
+ * @private
116
+ */
117
+ function _scriptReady(resolve, reject) {
118
+ var _root$IBM;
119
+ var environment = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _ibmEnvironment;
120
+ /**
121
+ * @param {object} root?.IBM.Mediacenter.player if exists then resolve
122
+ */
123
+ if (root !== null && root !== void 0 && (_root$IBM = root.IBM) !== null && _root$IBM !== void 0 && (_root$IBM = _root$IBM.Mediacenter) !== null && _root$IBM !== void 0 && _root$IBM.player) {
124
+ _scriptLoading = false;
125
+ resolve();
126
+ } else if (_scriptLoading) {
127
+ _attempt++;
128
+ if (_attempt < _timeoutRetries) {
129
+ setTimeout(function () {
130
+ _scriptReady(resolve, reject, environment);
131
+ }, 100);
132
+ } else {
133
+ reject();
134
+ }
135
+ } else {
136
+ _loadScript(environment);
137
+ _scriptReady(resolve, reject, environment);
138
+ }
139
+ }
140
+
141
+ /**
142
+ * KalturaPlayerAPI class with methods of checking script state and
143
+ * embed media meta data and api data
144
+ *
145
+ * In order to set the Partner ID/UIConf ID, set the following environment
146
+ * variables:
147
+ *
148
+ * - KALTURA_PARTNER_ID
149
+ * - KALTURA_UICONF_ID
150
+ */
151
+ var KalturaPlayerAPIV7 = /*#__PURE__*/function () {
152
+ function KalturaPlayerAPIV7() {
153
+ _classCallCheck(this, KalturaPlayerAPIV7);
154
+ }
155
+ return _createClass(KalturaPlayerAPIV7, null, [{
156
+ key: "checkScript",
157
+ value:
158
+ /**
159
+ *
160
+ * Gets the full _scriptReady state
161
+ *
162
+ * @returns {Promise<*>} Promise kaltura media player file
163
+ */
164
+ function checkScript() {
165
+ var environment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _ibmEnvironment;
166
+ return new Promise(function (resolve, reject) {
167
+ _scriptReady(resolve, reject, environment);
168
+ });
169
+ }
170
+
171
+ /**
172
+ * Creates thumbnail image url with customizable params
173
+ *
174
+ * @param {object} params param object
175
+ * @param {string} params.mediaId specify the kaltura media id
176
+ * @param {string} params.height specify height in pixels
177
+ * @param {string} params.width specify width in pixels
178
+ * @param {string} params.partnerId specify mediacenter's partner id
179
+ * @returns {string} url of thumbnail image
180
+ * @example
181
+ * import { KalturaPlayerAPI } from '@carbon/ibmdotcom-services';
182
+ *
183
+ * function thumbnail() {
184
+ * const thumbnailData = {
185
+ * mediaId: '1_9h94wo6b',
186
+ * height: '240',
187
+ * width: '320'
188
+ * }
189
+ * const thumbnailUrl = KalturaPlayerAPI.getThumbnailUrl(thumbnailData);
190
+ * }
191
+ */
192
+ }, {
193
+ key: "getThumbnailUrl",
194
+ value: function getThumbnailUrl(_ref6) {
195
+ var _root$IBM2;
196
+ var _ref6$mediaId = _ref6.mediaId,
197
+ mediaId = _ref6$mediaId === void 0 ? '' : _ref6$mediaId,
198
+ _ref6$height = _ref6.height,
199
+ height = _ref6$height === void 0 ? 0 : _ref6$height,
200
+ _ref6$width = _ref6.width,
201
+ width = _ref6$width === void 0 ? 0 : _ref6$width,
202
+ _ref6$partnerId = _ref6.partnerId,
203
+ partnerId = _ref6$partnerId === void 0 ? _partnerId : _ref6$partnerId;
204
+ return (root === null || root === void 0 || (_root$IBM2 = root.IBM) === null || _root$IBM2 === void 0 || (_root$IBM2 = _root$IBM2.Mediacenter) === null || _root$IBM2 === void 0 || (_root$IBM2 = _root$IBM2.player) === null || _root$IBM2 === void 0 || (_root$IBM2 = _root$IBM2.api) === null || _root$IBM2 === void 0 ? void 0 : _root$IBM2.getThumbnail(partnerId, mediaId, width, height)) || '';
205
+ }
206
+
207
+ /**
208
+ * Gets the api data
209
+ * The player api will only call kaltura once and cache the data
210
+ * return the cached information in all subsequential calls
211
+ *
212
+ * @param {string} mediaId The mediaId we're embedding the placeholder for.
213
+ * @param {string} partnerId The mediacenter partner id.
214
+ * @returns {object} object
215
+ * @example
216
+ * import { KalturaPlayerAPI } from '@carbon/ibmdotcom-services';
217
+ *
218
+ * async function getMyVideoInfo(id) {
219
+ * const data = await KalturaPlayerAPI.api(id);
220
+ * console.log(data);
221
+ * }
222
+ */
223
+ }, {
224
+ key: "api",
225
+ value: (function () {
226
+ var _api = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(mediaId) {
227
+ var partnerId,
228
+ _args = arguments;
229
+ return _regeneratorRuntime.wrap(function (_context) {
230
+ while (1) switch (_context.prev = _context.next) {
231
+ case 0:
232
+ partnerId = _args.length > 1 && _args[1] !== undefined ? _args[1] : _partnerId;
233
+ _context.next = 1;
234
+ return this.checkScript().then(function () {
235
+ var _root$IBM3;
236
+ return (root === null || root === void 0 || (_root$IBM3 = root.IBM) === null || _root$IBM3 === void 0 || (_root$IBM3 = _root$IBM3.Mediacenter) === null || _root$IBM3 === void 0 || (_root$IBM3 = _root$IBM3.player) === null || _root$IBM3 === void 0 || (_root$IBM3 = _root$IBM3.api) === null || _root$IBM3 === void 0 ? void 0 : _root$IBM3.getMediaProperties(partnerId, mediaId)) || {};
237
+ });
238
+ case 1:
239
+ return _context.abrupt("return", _context.sent);
240
+ case 2:
241
+ case "end":
242
+ return _context.stop();
243
+ }
244
+ }, _callee, this);
245
+ }));
246
+ function api(_x) {
247
+ return _api.apply(this, arguments);
248
+ }
249
+ return api;
250
+ }()
251
+ /**
252
+ * Gets the embed meta data
253
+ *
254
+ * @param {string} mediaId The mediaId we're embedding the placeholder for.
255
+ * @param {string} targetId The targetId the ID where we're putting the placeholder.
256
+ * @param {object} configuration Determine any extra param or plugin for the player.
257
+ * @param {Function} customReadyCallback Determine any extra functions that should be executed
258
+ * @param {string} partnerId specify mediacenter's partner id
259
+ * on player readyCallback.
260
+ * @returns {object} object
261
+ * @example
262
+ * import { KalturaPlayerAPI } from '@carbon/ibmdotcom-services';
263
+ *
264
+ * function embedMyVideo() {
265
+ * const elem = document.getElementById('foo');
266
+ * const videoid = '12345';
267
+ * KalturaPlayerAPI.embedMedia(videoid, elem);
268
+ * }
269
+ */
270
+ )
271
+ }, {
272
+ key: "embedMedia",
273
+ value: (function () {
274
+ var _embedMedia = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(mediaId, targetId) {
275
+ var configuration,
276
+ customReadyCallback,
277
+ partnerId,
278
+ _args3 = arguments;
279
+ return _regeneratorRuntime.wrap(function (_context3) {
280
+ while (1) switch (_context3.prev = _context3.next) {
281
+ case 0:
282
+ configuration = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
283
+ customReadyCallback = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : function () {};
284
+ partnerId = _args3.length > 4 && _args3[4] !== undefined ? _args3[4] : _partnerId;
285
+ _context3.next = 1;
286
+ return this.checkScript().then(function () {
287
+ var legacyPromiseKWidget = /*#__PURE__*/function () {
288
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
289
+ var _configuration$player, _ibmEnvironments$conf, _configuration$player2, _root$IBM4;
290
+ var playerType, playerEnvironment, playerUiConfId, playerConfiguration, isCustomCreated, newVideoDiv, kalturaPlayer, previousVideoDiv;
291
+ return _regeneratorRuntime.wrap(function (_context2) {
292
+ while (1) switch (_context2.prev = _context2.next) {
293
+ case 0:
294
+ playerType = (_configuration$player = configuration === null || configuration === void 0 ? void 0 : configuration.playerType) !== null && _configuration$player !== void 0 ? _configuration$player : 'VIDEO';
295
+ playerEnvironment = (_ibmEnvironments$conf = _ibmEnvironments[configuration.playerEnvironment]) !== null && _ibmEnvironments$conf !== void 0 ? _ibmEnvironments$conf : _ibmEnvironments[_ibmEnvironment];
296
+ playerUiConfId = (_configuration$player2 = configuration.playerUiConfId) !== null && _configuration$player2 !== void 0 ? _configuration$player2 : _uiConfIds[playerType];
297
+ playerConfiguration = _objectSpread({
298
+ playerType: playerType,
299
+ autoPlay: true,
300
+ muted: true,
301
+ loop: false,
302
+ playerMode: 'default',
303
+ environment: playerEnvironment,
304
+ partnerId: partnerId,
305
+ uiConfId: playerUiConfId,
306
+ targetId: targetId
307
+ }, configuration);
308
+ if (playerType === 'VIDEO' || playerType === 'AUDIO') {
309
+ playerConfiguration.entryId = mediaId;
310
+ } else if (playerType === 'PLAYLIST' || playerType === 'REELS') {
311
+ // Implement when both players are ready in Mediacenter
312
+ }
313
+
314
+ /**
315
+ * Process the elements around the player
316
+ */
317
+
318
+ if (!document.getElementById(targetId) && document.querySelector('cds-tabs-extended-media')) {
319
+ newVideoDiv = document.createElement('div');
320
+ newVideoDiv.classList.add("bx--video-player__video");
321
+ newVideoDiv.setAttribute('id', targetId);
322
+ document.body.append(newVideoDiv);
323
+ isCustomCreated = true;
324
+ }
325
+
326
+ /**
327
+ * Embed the player and execute custom callback
328
+ */
329
+ _context2.next = 1;
330
+ return root === null || root === void 0 || (_root$IBM4 = root.IBM) === null || _root$IBM4 === void 0 || (_root$IBM4 = _root$IBM4.Mediacenter) === null || _root$IBM4 === void 0 || (_root$IBM4 = _root$IBM4.player) === null || _root$IBM4 === void 0 ? void 0 : _root$IBM4.embed(playerConfiguration);
331
+ case 1:
332
+ kalturaPlayer = _context2.sent;
333
+ customReadyCallback(kalturaPlayer);
334
+ if (isCustomCreated) {
335
+ previousVideoDiv = document.querySelector('cds-tabs-extended-media').shadowRoot.querySelector(".bx--accordion__item--active cds-video-player").lastChild;
336
+ previousVideoDiv.parentElement.appendChild(document.getElementById(targetId));
337
+ }
338
+ return _context2.abrupt("return", kalturaPlayer);
339
+ case 2:
340
+ case "end":
341
+ return _context2.stop();
342
+ }
343
+ }, _callee2);
344
+ }));
345
+ return function legacyPromiseKWidget() {
346
+ return _ref7.apply(this, arguments);
347
+ };
348
+ }();
349
+ return legacyPromiseKWidget();
350
+ });
351
+ case 1:
352
+ return _context3.abrupt("return", _context3.sent);
353
+ case 2:
354
+ case "end":
355
+ return _context3.stop();
356
+ }
357
+ }, _callee3, this);
358
+ }));
359
+ function embedMedia(_x2, _x3) {
360
+ return _embedMedia.apply(this, arguments);
361
+ }
362
+ return embedMedia;
363
+ }())
364
+ }]);
365
+ }();
366
+ export default KalturaPlayerAPIV7;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ export { default as KalturaPlayerAPI } from './KalturaPlayer';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2020, 2022
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { ThunkAction } from 'redux-thunk';
10
+ import { MediaData, MEDIA_PLAYER_API_ACTION, MediaPlayerAPIState } from '../types/kalturaPlayerAPIv7';
11
+ /**
12
+ * @param mediaId A language.
13
+ * @param request The promise of the REST call for media data of the given language that is in progress.
14
+ * @returns A Redux action to set the state that the REST call for media data for the given language that is in progress.
15
+ * @private
16
+ */
17
+ export declare function setRequestMediaDataInProgress(mediaId: string, request: Promise<MediaData>): {
18
+ type: MEDIA_PLAYER_API_ACTION;
19
+ mediaId: string;
20
+ request: Promise<MediaData>;
21
+ };
22
+ /**
23
+ * @param mediaId A language.
24
+ * @param error An error from the REST call for media data of the given language.
25
+ * @returns A Redux action to set the state that the REST call for media data for the given language failed.
26
+ * @private
27
+ */
28
+ export declare function setErrorRequestMediaData(mediaId: string, error: Error): {
29
+ type: MEDIA_PLAYER_API_ACTION;
30
+ mediaId: string;
31
+ error: Error;
32
+ };
33
+ /**
34
+ * @param mediaId A language.
35
+ * @param mediaData The media data from the REST call.
36
+ * @returns A Redux action to set the given media data.
37
+ */
38
+ export declare function setMediaData(mediaId: string, mediaData: MediaData): {
39
+ type: MEDIA_PLAYER_API_ACTION;
40
+ mediaId: string;
41
+ mediaData: MediaData;
42
+ };
43
+ /**
44
+ * A Redux action to work with `MediaPlayerAPI`.
45
+ */
46
+ export type MediaPlayerAPIActions = ReturnType<typeof setRequestMediaDataInProgress> | ReturnType<typeof setErrorRequestMediaData> | ReturnType<typeof setMediaData>;
47
+ /**
48
+ * @returns A Redux action that sends a REST call for media data.
49
+ */
50
+ export declare function loadMediaData(mediaId: string): ThunkAction<Promise<MediaData>, {
51
+ mediaPlayerAPI: MediaPlayerAPIState;
52
+ }, void, MediaPlayerAPIActions>;
53
+
54
+ //# sourceMappingURL=kalturaPlayerAPIv7.d.ts.map
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2020, 2022
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import KalturaPlayerAPI from '@carbon/ibmdotcom-services/es/services/KalturaPlayerV7/KalturaPlayer.js';
11
+ import { MEDIA_PLAYER_API_ACTION } from "../types/kalturaPlayerAPIv7.js";
12
+
13
+ /**
14
+ * @param mediaId A language.
15
+ * @param request The promise of the REST call for media data of the given language that is in progress.
16
+ * @returns A Redux action to set the state that the REST call for media data for the given language that is in progress.
17
+ * @private
18
+ */ /**
19
+ * @param mediaId A language.
20
+ * @param request The promise of the REST call for media data of the given language that is in progress.
21
+ * @returns A Redux action to set the state that the REST call for media data for the given language that is in progress.
22
+ * @private
23
+ */
24
+ export function setRequestMediaDataInProgress(mediaId, request) {
25
+ return {
26
+ type: MEDIA_PLAYER_API_ACTION.SET_REQUEST_MEDIA_DATA_IN_PROGRESS,
27
+ mediaId,
28
+ request
29
+ };
30
+ }
31
+
32
+ /**
33
+ * @param mediaId A language.
34
+ * @param error An error from the REST call for media data of the given language.
35
+ * @returns A Redux action to set the state that the REST call for media data for the given language failed.
36
+ * @private
37
+ */
38
+ export function setErrorRequestMediaData(mediaId, error) {
39
+ return {
40
+ type: MEDIA_PLAYER_API_ACTION.SET_ERROR_REQUEST_MEDIA_DATA,
41
+ mediaId,
42
+ error
43
+ };
44
+ }
45
+
46
+ /**
47
+ * @param mediaId A language.
48
+ * @param mediaData The media data from the REST call.
49
+ * @returns A Redux action to set the given media data.
50
+ */
51
+ export function setMediaData(mediaId, mediaData) {
52
+ return {
53
+ type: MEDIA_PLAYER_API_ACTION.SET_MEDIA_DATA,
54
+ mediaId,
55
+ mediaData
56
+ };
57
+ }
58
+
59
+ /**
60
+ * A Redux action to work with `MediaPlayerAPI`.
61
+ */
62
+
63
+ /**
64
+ * @returns A Redux action that sends a REST call for media data.
65
+ */
66
+ export function loadMediaData(mediaId) {
67
+ return async (dispatch, getState) => {
68
+ var _getState$mediaPlayer;
69
+ const {
70
+ requestsMediaData = {}
71
+ } = (_getState$mediaPlayer = getState().mediaPlayerAPI) !== null && _getState$mediaPlayer !== void 0 ? _getState$mediaPlayer : {};
72
+ const {
73
+ [mediaId]: requestMediaData
74
+ } = requestsMediaData;
75
+ if (requestMediaData) {
76
+ return requestMediaData;
77
+ }
78
+ const promiseVideoData = KalturaPlayerAPI.api(mediaId);
79
+ dispatch(setRequestMediaDataInProgress(mediaId, promiseVideoData));
80
+ try {
81
+ dispatch(setMediaData(mediaId, await promiseVideoData));
82
+ } catch (error) {
83
+ dispatch(setErrorRequestMediaData(mediaId, error));
84
+ }
85
+ return promiseVideoData;
86
+ };
87
+ }
88
+ //# sourceMappingURL=kalturaPlayerAPIv7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kalturaPlayerAPIv7.js","names":["KalturaPlayerAPI","MEDIA_PLAYER_API_ACTION","setRequestMediaDataInProgress","mediaId","request","type","SET_REQUEST_MEDIA_DATA_IN_PROGRESS","setErrorRequestMediaData","error","SET_ERROR_REQUEST_MEDIA_DATA","setMediaData","mediaData","SET_MEDIA_DATA","loadMediaData","dispatch","getState","_getState$mediaPlayer","requestsMediaData","mediaPlayerAPI","requestMediaData","promiseVideoData","api"],"sources":["actions/kalturaPlayerAPIv7.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\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 { ThunkAction } from 'redux-thunk';\nimport KalturaPlayerAPI from '@carbon/ibmdotcom-services/es/services/KalturaPlayerV7/KalturaPlayer.js';\nimport {\n MediaData,\n MEDIA_PLAYER_API_ACTION,\n MediaPlayerAPIState,\n} from '../types/kalturaPlayerAPIv7';\n\n/**\n * @param mediaId A language.\n * @param request The promise of the REST call for media data of the given language that is in progress.\n * @returns A Redux action to set the state that the REST call for media data for the given language that is in progress.\n * @private\n */\nexport function setRequestMediaDataInProgress(\n mediaId: string,\n request: Promise<MediaData>\n) {\n return {\n type: MEDIA_PLAYER_API_ACTION.SET_REQUEST_MEDIA_DATA_IN_PROGRESS,\n mediaId,\n request,\n };\n}\n\n/**\n * @param mediaId A language.\n * @param error An error from the REST call for media data of the given language.\n * @returns A Redux action to set the state that the REST call for media data for the given language failed.\n * @private\n */\nexport function setErrorRequestMediaData(mediaId: string, error: Error) {\n return {\n type: MEDIA_PLAYER_API_ACTION.SET_ERROR_REQUEST_MEDIA_DATA,\n mediaId,\n error,\n };\n}\n\n/**\n * @param mediaId A language.\n * @param mediaData The media data from the REST call.\n * @returns A Redux action to set the given media data.\n */\nexport function setMediaData(mediaId: string, mediaData: MediaData) {\n return {\n type: MEDIA_PLAYER_API_ACTION.SET_MEDIA_DATA,\n mediaId,\n mediaData,\n };\n}\n\n/**\n * A Redux action to work with `MediaPlayerAPI`.\n */\nexport type MediaPlayerAPIActions =\n | ReturnType<typeof setRequestMediaDataInProgress>\n | ReturnType<typeof setErrorRequestMediaData>\n | ReturnType<typeof setMediaData>;\n\n/**\n * @returns A Redux action that sends a REST call for media data.\n */\nexport function loadMediaData(\n mediaId: string\n): ThunkAction<\n Promise<MediaData>,\n { mediaPlayerAPI: MediaPlayerAPIState },\n void,\n MediaPlayerAPIActions\n> {\n return async (dispatch, getState) => {\n const { requestsMediaData = {} } = getState().mediaPlayerAPI ?? {};\n const { [mediaId]: requestMediaData } = requestsMediaData;\n if (requestMediaData) {\n return requestMediaData;\n }\n const promiseVideoData: Promise<MediaData> = KalturaPlayerAPI.api(mediaId);\n dispatch(setRequestMediaDataInProgress(mediaId, promiseVideoData));\n try {\n dispatch(setMediaData(mediaId, await promiseVideoData));\n } catch (error) {\n dispatch(setErrorRequestMediaData(mediaId, error as Error));\n }\n return promiseVideoData;\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,gBAAgB,MAAM,yEAAyE;AACtG,SAEEC,uBAAuB,QAElB,gCAA6B;;AAEpC;AACA;AACA;AACA;AACA;AACA,GALA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,6BAA6BA,CAC3CC,OAAe,EACfC,OAA2B,EAC3B;EACA,OAAO;IACLC,IAAI,EAAEJ,uBAAuB,CAACK,kCAAkC;IAChEH,OAAO;IACPC;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,wBAAwBA,CAACJ,OAAe,EAAEK,KAAY,EAAE;EACtE,OAAO;IACLH,IAAI,EAAEJ,uBAAuB,CAACQ,4BAA4B;IAC1DN,OAAO;IACPK;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,YAAYA,CAACP,OAAe,EAAEQ,SAAoB,EAAE;EAClE,OAAO;IACLN,IAAI,EAAEJ,uBAAuB,CAACW,cAAc;IAC5CT,OAAO;IACPQ;EACF,CAAC;AACH;;AAEA;AACA;AACA;;AAMA;AACA;AACA;AACA,OAAO,SAASE,aAAaA,CAC3BV,OAAe,EAMf;EACA,OAAO,OAAOW,QAAQ,EAAEC,QAAQ,KAAK;IAAA,IAAAC,qBAAA;IACnC,MAAM;MAAEC,iBAAiB,GAAG,CAAC;IAAE,CAAC,IAAAD,qBAAA,GAAGD,QAAQ,CAAC,CAAC,CAACG,cAAc,cAAAF,qBAAA,cAAAA,qBAAA,GAAI,CAAC,CAAC;IAClE,MAAM;MAAE,CAACb,OAAO,GAAGgB;IAAiB,CAAC,GAAGF,iBAAiB;IACzD,IAAIE,gBAAgB,EAAE;MACpB,OAAOA,gBAAgB;IACzB;IACA,MAAMC,gBAAoC,GAAGpB,gBAAgB,CAACqB,GAAG,CAAClB,OAAO,CAAC;IAC1EW,QAAQ,CAACZ,6BAA6B,CAACC,OAAO,EAAEiB,gBAAgB,CAAC,CAAC;IAClE,IAAI;MACFN,QAAQ,CAACJ,YAAY,CAACP,OAAO,EAAE,MAAMiB,gBAAgB,CAAC,CAAC;IACzD,CAAC,CAAC,OAAOZ,KAAK,EAAE;MACdM,QAAQ,CAACP,wBAAwB,CAACJ,OAAO,EAAEK,KAAc,CAAC,CAAC;IAC7D;IACA,OAAOY,gBAAgB;EACzB,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2020, 2022
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { MediaPlayerAPIState } from '../types/kalturaPlayerAPIv7';
10
+ import { MediaPlayerAPIActions } from '../actions/kalturaPlayerAPIv7';
11
+ /**
12
+ * @param state The state for media player API.
13
+ * @param action The action.
14
+ * @returns The new state for media player API.
15
+ */
16
+ export default function reducer(state: MediaPlayerAPIState | undefined, action: MediaPlayerAPIActions): MediaPlayerAPIState;
17
+
18
+ //# sourceMappingURL=kalturaPlayerAPIv7.d.ts.map
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2020, 2022
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */ /**
9
+ * @license
10
+ *
11
+ * Copyright IBM Corp. 2020, 2022
12
+ *
13
+ * This source code is licensed under the Apache-2.0 license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+
17
+ import { MEDIA_PLAYER_API_ACTION } from "../types/kalturaPlayerAPIv7.js";
18
+ /**
19
+ * @param state The state for media player API.
20
+ * @param action The action.
21
+ * @returns The new state for media player API.
22
+ */
23
+ export default function reducer(state = {}, action) {
24
+ switch (action.type) {
25
+ case MEDIA_PLAYER_API_ACTION.SET_REQUEST_MEDIA_DATA_IN_PROGRESS:
26
+ {
27
+ const {
28
+ mediaId,
29
+ request
30
+ } = action;
31
+ return {
32
+ ...state,
33
+ requestsMediaDataInProgress: {
34
+ ...(state.requestsMediaDataInProgress || {}),
35
+ [mediaId]: true
36
+ },
37
+ requestsMediaData: {
38
+ ...(state.requestsMediaData || {}),
39
+ [mediaId]: request
40
+ }
41
+ };
42
+ }
43
+ case MEDIA_PLAYER_API_ACTION.SET_ERROR_REQUEST_MEDIA_DATA:
44
+ {
45
+ const {
46
+ mediaId,
47
+ error
48
+ } = action;
49
+ return {
50
+ ...state,
51
+ requestsMediaDataInProgress: {
52
+ ...(state.requestsMediaDataInProgress || {}),
53
+ [mediaId]: false
54
+ },
55
+ errorsRequestMediaData: {
56
+ ...(state.errorsRequestMediaData || {}),
57
+ [mediaId]: error
58
+ }
59
+ };
60
+ }
61
+ case MEDIA_PLAYER_API_ACTION.SET_MEDIA_DATA:
62
+ {
63
+ const {
64
+ mediaId,
65
+ mediaData
66
+ } = action;
67
+ return {
68
+ ...state,
69
+ // If application sets language data without making a REST call, mark the request as resolved already
70
+ requestsMediaDataInProgress: {
71
+ ...(state.requestsMediaDataInProgress || {}),
72
+ [mediaId]: false
73
+ },
74
+ requestsMediaData: {
75
+ ...(state.requestsMediaData || {}),
76
+ [mediaId]: Promise.resolve(mediaData)
77
+ },
78
+ mediaData: {
79
+ ...(state.mediaData || {}),
80
+ [mediaId]: mediaData
81
+ }
82
+ };
83
+ }
84
+ default:
85
+ return state;
86
+ }
87
+ }
88
+ //# sourceMappingURL=kalturaPlayerAPIv7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kalturaPlayerAPIv7.js","names":["MEDIA_PLAYER_API_ACTION","reducer","state","action","type","SET_REQUEST_MEDIA_DATA_IN_PROGRESS","mediaId","request","requestsMediaDataInProgress","requestsMediaData","SET_ERROR_REQUEST_MEDIA_DATA","error","errorsRequestMediaData","SET_MEDIA_DATA","mediaData","Promise","resolve"],"sources":["reducers/kalturaPlayerAPIv7.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\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 {\n MEDIA_PLAYER_API_ACTION,\n MediaPlayerAPIState,\n} from '../types/kalturaPlayerAPIv7';\nimport {\n MediaPlayerAPIActions,\n setRequestMediaDataInProgress,\n setErrorRequestMediaData,\n setMediaData,\n} from '../actions/kalturaPlayerAPIv7';\n\n/**\n * @param state The state for media player API.\n * @param action The action.\n * @returns The new state for media player API.\n */\nexport default function reducer(\n state: MediaPlayerAPIState = {},\n action: MediaPlayerAPIActions\n): MediaPlayerAPIState {\n switch (action.type) {\n case MEDIA_PLAYER_API_ACTION.SET_REQUEST_MEDIA_DATA_IN_PROGRESS: {\n const { mediaId, request } = action as ReturnType<\n typeof setRequestMediaDataInProgress\n >;\n return {\n ...state,\n requestsMediaDataInProgress: {\n ...(state.requestsMediaDataInProgress || {}),\n [mediaId]: true,\n },\n requestsMediaData: {\n ...(state.requestsMediaData || {}),\n [mediaId]: request,\n },\n };\n }\n case MEDIA_PLAYER_API_ACTION.SET_ERROR_REQUEST_MEDIA_DATA: {\n const { mediaId, error } = action as ReturnType<\n typeof setErrorRequestMediaData\n >;\n return {\n ...state,\n requestsMediaDataInProgress: {\n ...(state.requestsMediaDataInProgress || {}),\n [mediaId]: false,\n },\n errorsRequestMediaData: {\n ...(state.errorsRequestMediaData || {}),\n [mediaId]: error,\n },\n };\n }\n case MEDIA_PLAYER_API_ACTION.SET_MEDIA_DATA: {\n const { mediaId, mediaData } = action as ReturnType<typeof setMediaData>;\n return {\n ...state,\n // If application sets language data without making a REST call, mark the request as resolved already\n requestsMediaDataInProgress: {\n ...(state.requestsMediaDataInProgress || {}),\n [mediaId]: false,\n },\n requestsMediaData: {\n ...(state.requestsMediaData || {}),\n [mediaId]: Promise.resolve(mediaData),\n },\n mediaData: {\n ...(state.mediaData || {}),\n [mediaId]: mediaData,\n },\n };\n }\n default:\n return state;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,uBAAuB,QAElB,gCAA6B;AAQpC;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,OAAOA,CAC7BC,KAA0B,GAAG,CAAC,CAAC,EAC/BC,MAA6B,EACR;EACrB,QAAQA,MAAM,CAACC,IAAI;IACjB,KAAKJ,uBAAuB,CAACK,kCAAkC;MAAE;QAC/D,MAAM;UAAEC,OAAO;UAAEC;QAAQ,CAAC,GAAGJ,MAE5B;QACD,OAAO;UACL,GAAGD,KAAK;UACRM,2BAA2B,EAAE;YAC3B,IAAIN,KAAK,CAACM,2BAA2B,IAAI,CAAC,CAAC,CAAC;YAC5C,CAACF,OAAO,GAAG;UACb,CAAC;UACDG,iBAAiB,EAAE;YACjB,IAAIP,KAAK,CAACO,iBAAiB,IAAI,CAAC,CAAC,CAAC;YAClC,CAACH,OAAO,GAAGC;UACb;QACF,CAAC;MACH;IACA,KAAKP,uBAAuB,CAACU,4BAA4B;MAAE;QACzD,MAAM;UAAEJ,OAAO;UAAEK;QAAM,CAAC,GAAGR,MAE1B;QACD,OAAO;UACL,GAAGD,KAAK;UACRM,2BAA2B,EAAE;YAC3B,IAAIN,KAAK,CAACM,2BAA2B,IAAI,CAAC,CAAC,CAAC;YAC5C,CAACF,OAAO,GAAG;UACb,CAAC;UACDM,sBAAsB,EAAE;YACtB,IAAIV,KAAK,CAACU,sBAAsB,IAAI,CAAC,CAAC,CAAC;YACvC,CAACN,OAAO,GAAGK;UACb;QACF,CAAC;MACH;IACA,KAAKX,uBAAuB,CAACa,cAAc;MAAE;QAC3C,MAAM;UAAEP,OAAO;UAAEQ;QAAU,CAAC,GAAGX,MAAyC;QACxE,OAAO;UACL,GAAGD,KAAK;UACR;UACAM,2BAA2B,EAAE;YAC3B,IAAIN,KAAK,CAACM,2BAA2B,IAAI,CAAC,CAAC,CAAC;YAC5C,CAACF,OAAO,GAAG;UACb,CAAC;UACDG,iBAAiB,EAAE;YACjB,IAAIP,KAAK,CAACO,iBAAiB,IAAI,CAAC,CAAC,CAAC;YAClC,CAACH,OAAO,GAAGS,OAAO,CAACC,OAAO,CAACF,SAAS;UACtC,CAAC;UACDA,SAAS,EAAE;YACT,IAAIZ,KAAK,CAACY,SAAS,IAAI,CAAC,CAAC,CAAC;YAC1B,CAACR,OAAO,GAAGQ;UACb;QACF,CAAC;MACH;IACA;MACE,OAAOZ,KAAK;EAChB;AACF","ignoreList":[]}