@24i/bigscreen-sdk 1.0.4 → 1.0.5-4.alpha-2832

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 (292) hide show
  1. package/README.md +2 -3
  2. package/ci/is_ci_job_skippable.sh +153 -0
  3. package/package.json +55 -34
  4. package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +9 -9
  5. package/packages/analytics/README.md +8 -0
  6. package/packages/analytics/src/A.ts +1 -0
  7. package/packages/analytics/src/Analytics.ts +1 -0
  8. package/packages/analytics/src/analyticsOnScroll.ts +1 -0
  9. package/packages/analytics/src/clients/ConsoleAnalytics/ConsoleAnalytics.ts +1 -0
  10. package/packages/analytics/src/clients/ConsoleAnalytics/index.ts +1 -0
  11. package/packages/analytics/src/clients/GoogleAnalytics/GoogleAnalytics.ts +196 -0
  12. package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +126 -0
  13. package/packages/analytics/src/clients/GoogleAnalytics/getUrl.ts +17 -0
  14. package/packages/analytics/src/clients/GoogleAnalytics/index.ts +2 -0
  15. package/packages/analytics/src/clients/GoogleAnalytics/interface.ts +82 -0
  16. package/packages/analytics/src/clients/GoogleAnalytics/mapPayload.ts +51 -0
  17. package/packages/analytics/src/clients/GoogleAnalytics/prepareBody.ts +14 -0
  18. package/packages/analytics/src/clients/TealiumAnalytics/TealiumAnalytics.ts +181 -0
  19. package/packages/analytics/src/clients/TealiumAnalytics/constants.ts +106 -0
  20. package/packages/analytics/src/clients/TealiumAnalytics/findForLanguage.ts +9 -0
  21. package/packages/analytics/src/clients/TealiumAnalytics/index.ts +4 -0
  22. package/packages/analytics/src/clients/TealiumAnalytics/interface.ts +35 -0
  23. package/packages/analytics/src/clients/TealiumAnalytics/mappers/__mocks__/mediaPayload.ts +72 -0
  24. package/packages/analytics/src/clients/TealiumAnalytics/mappers/helper.ts +36 -0
  25. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppError.ts +13 -0
  26. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppOpen.ts +13 -0
  27. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteAdd.ts +11 -0
  28. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteRemove.ts +11 -0
  29. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerClose.ts +15 -0
  30. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerOpen.ts +15 -0
  31. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSceneView.ts +18 -0
  32. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearch.ts +18 -0
  33. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchFailed.ts +8 -0
  34. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchSuccess.ts +8 -0
  35. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoPause.ts +15 -0
  36. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoProgress.ts +18 -0
  37. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoResume.ts +15 -0
  38. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStart.ts +15 -0
  39. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStop.ts +15 -0
  40. package/packages/analytics/src/clients/TealiumAnalytics/types.ts +161 -0
  41. package/packages/analytics/src/clients/TwentyFourIQ/TwentyFourIQClient.ts +107 -0
  42. package/packages/analytics/src/clients/TwentyFourIQ/constants.ts +111 -0
  43. package/packages/analytics/src/clients/TwentyFourIQ/helper.ts +34 -0
  44. package/packages/analytics/src/clients/TwentyFourIQ/index.ts +2 -0
  45. package/packages/analytics/src/clients/TwentyFourIQ/interface.ts +34 -0
  46. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdEvent.ts +20 -0
  47. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBase.ts +24 -0
  48. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBuffering.ts +15 -0
  49. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerClose.ts +25 -0
  50. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerOpen.ts +17 -0
  51. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapSceneView.ts +15 -0
  52. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapScroll.ts +17 -0
  53. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoComplete.ts +22 -0
  54. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoPause.ts +25 -0
  55. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoProgress.ts +25 -0
  56. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStart.ts +34 -0
  57. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStop.ts +32 -0
  58. package/packages/analytics/src/clients/TwentyFourIQ/types.ts +132 -0
  59. package/packages/analytics/src/constants.ts +1 -0
  60. package/packages/analytics/src/index.ts +3 -0
  61. package/packages/analytics/src/interface.ts +1 -0
  62. package/packages/analytics/src/utils/generateSessionId.ts +8 -0
  63. package/packages/async-image/src/AsyncImage.tsx +15 -10
  64. package/packages/developer-tools/PlayerDebugWindow/README.md +1 -1
  65. package/packages/developer-tools/src/DeveloperConsole/DeveloperConsole.tsx +1 -0
  66. package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +11 -0
  67. package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +5 -5
  68. package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +15 -0
  69. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfo.tsx +2 -0
  70. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +2 -1
  71. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +57 -5
  72. package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +12 -0
  73. package/packages/developer-tools/src/TechnicalInfo/translations.ts +8 -0
  74. package/packages/device/src/driver/index.android.tv.ts +1 -0
  75. package/packages/device/src/driver/index.firetv.ts +1 -0
  76. package/packages/device/src/driver/index.smartcast.tv.ts +1 -0
  77. package/packages/device/src/getKeyDigit.ts +2 -2
  78. package/packages/device/src/resolver/resolver.ts +19 -0
  79. package/packages/digital-clock/src/DigitalClock.tsx +15 -4
  80. package/packages/driver-androidtv/src/DeviceAndroidTV.ts +262 -0
  81. package/packages/driver-androidtv/src/__mocks__/javaScriptBridge.ts +45 -0
  82. package/packages/driver-androidtv/src/formatUserAgent.ts +11 -0
  83. package/packages/driver-androidtv/src/index.ts +2 -0
  84. package/packages/driver-androidtv/src/keymap.ts +27 -0
  85. package/packages/driver-androidtv/src/types.ts +155 -0
  86. package/packages/driver-base/src/DeviceBase.ts +73 -2
  87. package/packages/driver-base/src/KeyMap/Key.ts +8 -1
  88. package/packages/driver-base/src/KeyMap/KeyMap.ts +4 -0
  89. package/packages/driver-base/src/KeyMap/interface.ts +1 -0
  90. package/packages/driver-base/src/KeyMap/overrideValues.ts +2 -1
  91. package/packages/driver-base/src/__mocks__/DeviceBase.ts +24 -0
  92. package/packages/driver-base/src/__mocks__/keyMap.ts +1 -0
  93. package/packages/driver-base/src/index.ts +3 -0
  94. package/packages/driver-base/src/types/AdInfo.ts +5 -0
  95. package/packages/driver-base/src/types/DeviceEvent.ts +2 -0
  96. package/packages/driver-base/src/types/InAppPurchase.ts +20 -0
  97. package/packages/driver-base/src/types/KeycodeKeyMap.ts +1 -0
  98. package/packages/driver-browser/src/DeviceBrowser.ts +26 -0
  99. package/packages/driver-browser/src/keymap.ts +8 -0
  100. package/packages/driver-entone/src/DeviceEntone.ts +31 -1
  101. package/packages/driver-entone/src/keymap.ts +1 -0
  102. package/packages/driver-firetv/src/DeviceFireTV.ts +86 -0
  103. package/packages/driver-firetv/src/__mocks__/javaScriptBridge.ts +45 -0
  104. package/packages/driver-firetv/src/index.ts +1 -0
  105. package/packages/driver-firetv/src/types.ts +1 -0
  106. package/packages/driver-hbbtv/src/DeviceHbbTV.ts +26 -0
  107. package/packages/driver-kreatv/src/DeviceKreaTV.ts +26 -0
  108. package/packages/driver-saphi/src/DeviceSaphi.ts +26 -0
  109. package/packages/driver-smartcast/src/DeviceSmartCast.ts +380 -0
  110. package/packages/driver-smartcast/src/__mocks__/api.ts +69 -0
  111. package/packages/driver-smartcast/src/index.ts +1 -0
  112. package/packages/driver-smartcast/src/keymap.ts +9 -0
  113. package/packages/driver-smartcast/src/types.ts +102 -0
  114. package/packages/driver-tizen/src/DeviceTizen.ts +121 -7
  115. package/packages/driver-tizen/src/ITizen.ts +15116 -202
  116. package/packages/driver-tizen/src/IWebapis.ts +8643 -87
  117. package/packages/driver-tizen/src/TizenKeys.ts +4 -2
  118. package/packages/driver-tizen/src/__mocks__/tizen.ts +7 -8
  119. package/packages/driver-tizen/src/constants.ts +1 -195
  120. package/packages/driver-vidaa/src/DeviceVidaa.ts +29 -2
  121. package/packages/driver-vidaa/src/__mocks__/vidaa.ts +1 -1
  122. package/packages/driver-vidaa/src/keymap.ts +2 -0
  123. package/packages/driver-webos/src/DeviceWebos.ts +55 -0
  124. package/packages/driver-webos/src/__mocks__/webos.ts +33 -0
  125. package/packages/driver-webos/src/constants.ts +1 -0
  126. package/packages/driver-webos/src/keymap.ts +2 -1
  127. package/packages/driver-webos/src/types.ts +30 -0
  128. package/packages/driver-xbox/src/DeviceXbox.ts +30 -1
  129. package/packages/driver-xbox/src/keymap.ts +1 -1
  130. package/packages/epg/README.md +3 -1
  131. package/packages/epg/src/v2/Cell.tsx +16 -2
  132. package/packages/epg/src/v2/DataManager.ts +112 -41
  133. package/packages/epg/src/v2/DatePicker.tsx +9 -3
  134. package/packages/epg/src/v2/DateToast/DateToast.tsx +12 -9
  135. package/packages/epg/src/v2/Day.tsx +6 -3
  136. package/packages/epg/src/v2/Epg.tsx +5 -5
  137. package/packages/epg/src/v2/MockGenerator/generator.ts +3 -2
  138. package/packages/epg/src/v2/ProgramInfo/utils.ts +4 -3
  139. package/packages/epg/src/v2/Row.tsx +3 -1
  140. package/packages/epg/src/v2/TimelineSection.tsx +4 -1
  141. package/packages/epg/src/v2/basic/CellsManager.tsx +7 -2
  142. package/packages/epg/src/v2/basic/RowsManager.tsx +3 -1
  143. package/packages/epg/src/v2/interface.ts +13 -0
  144. package/packages/events-manager/src/EventsManager.ts +1 -56
  145. package/packages/focus/README.md +33 -0
  146. package/packages/focus/src/IFocusable.ts +1 -0
  147. package/packages/focus/src/Layout/Base.tsx +41 -6
  148. package/packages/focus/src/Layout/Matrix.tsx +51 -19
  149. package/packages/focus/src/focusFirstExisting.ts +7 -1
  150. package/packages/focus/src/hasFocus.ts +36 -0
  151. package/packages/focus/src/index.ts +2 -1
  152. package/packages/gallup/src/Gallup.ts +3 -3
  153. package/packages/grid/src/Base/Base.tsx +15 -10
  154. package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +4 -2
  155. package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +6 -6
  156. package/packages/icon/src/Icon.tsx +27 -5
  157. package/packages/input/README.md +1 -1
  158. package/packages/input/src/Input.tsx +10 -10
  159. package/packages/interactable/README.md +2 -1
  160. package/packages/interactable/src/Interactable.tsx +9 -3
  161. package/packages/interactable/src/interface.ts +1 -0
  162. package/packages/jsx/src/index.ts +1 -1
  163. package/packages/jsx/src/test-utils/index.ts +1 -0
  164. package/packages/jsx/src/test-utils/keyup.ts +27 -0
  165. package/packages/keyboard/README.md +2 -0
  166. package/packages/keyboard/src/Backdrop/Backdrop.scss +2 -0
  167. package/packages/keyboard/src/KeyboardBase.tsx +16 -4
  168. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +10 -0
  169. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +128 -142
  170. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.scss +4 -0
  171. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +1 -0
  172. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +1 -0
  173. package/packages/keyboard/src/WhitelabelKeyboard/icons/key_language.svg +20 -0
  174. package/packages/keyboard/src/WhitelabelKeyboard/index.ts +1 -1
  175. package/packages/keyboard/src/WhitelabelKeyboard/layouts/arabic.ts +27 -0
  176. package/packages/keyboard/src/WhitelabelKeyboard/layouts/burmese.ts +27 -0
  177. package/packages/keyboard/src/WhitelabelKeyboard/layouts/dari.ts +28 -0
  178. package/packages/keyboard/src/WhitelabelKeyboard/layouts/hebrew.ts +28 -0
  179. package/packages/keyboard/src/WhitelabelKeyboard/layouts/index.ts +15 -0
  180. package/packages/keyboard/src/WhitelabelKeyboard/layouts/korean.ts +26 -0
  181. package/packages/keyboard/src/WhitelabelKeyboard/layouts/latin.ts +26 -0
  182. package/packages/keyboard/src/WhitelabelKeyboard/layouts/pashto.ts +27 -0
  183. package/packages/keyboard/src/WhitelabelKeyboard/layouts/persian.ts +27 -0
  184. package/packages/keyboard/src/WhitelabelKeyboard/layouts/russian.ts +27 -0
  185. package/packages/keyboard/src/WhitelabelKeyboard/layouts/spanish.ts +26 -0
  186. package/packages/keyboard/src/WhitelabelKeyboard/layouts/special.ts +28 -0
  187. package/packages/keyboard/src/WhitelabelKeyboard/layouts/tibetan.ts +26 -0
  188. package/packages/keyboard/src/WhitelabelKeyboard/layouts/turkish.ts +26 -0
  189. package/packages/keyboard/src/WhitelabelKeyboard/layouts/ukrainian.ts +27 -0
  190. package/packages/keyboard/src/WhitelabelKeyboard/layouts/urdu.ts +26 -0
  191. package/packages/keyboard/src/WhitelabelKeyboard/types.ts +22 -2
  192. package/packages/keyboard/src/types/index.ts +1 -1
  193. package/packages/keyboard/src/utils/caret.ts +5 -8
  194. package/packages/keyboard/src/utils/input.ts +5 -6
  195. package/packages/keyboard/src/utils/setInputSelectionRange.ts +10 -0
  196. package/packages/l10n/README.md +18 -0
  197. package/packages/l10n/src/date/common.ts +18 -6
  198. package/packages/l10n/src/date/cs.ts +2 -8
  199. package/packages/l10n/src/date/de.ts +97 -0
  200. package/packages/l10n/src/date/en-001.ts +3 -3
  201. package/packages/l10n/src/date/en-common.ts +5 -4
  202. package/packages/l10n/src/date/en-us.ts +3 -3
  203. package/packages/l10n/src/date/es.ts +71 -0
  204. package/packages/l10n/src/date/fr.ts +94 -0
  205. package/packages/l10n/src/date/he.ts +101 -0
  206. package/packages/l10n/src/date/iso.ts +12 -13
  207. package/packages/l10n/src/date/types.ts +9 -0
  208. package/packages/l10n/src/l10n.ts +61 -3
  209. package/packages/list/src/Base/Base.tsx +19 -9
  210. package/packages/list/src/Base/interface.ts +2 -2
  211. package/packages/list/src/BasicList/BasicList.tsx +7 -7
  212. package/packages/list/src/CenteredList/CenteredList.tsx +2 -2
  213. package/packages/list/src/CenteredList/controller.ts +0 -1
  214. package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +10 -10
  215. package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +2 -2
  216. package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +2 -2
  217. package/packages/list/src/FixedToEndList/FixedToEndList.tsx +2 -2
  218. package/packages/list/src/UnifiedListController/UnifiedListController.ts +6 -2
  219. package/packages/list/src/interface.ts +2 -2
  220. package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +7 -1
  221. package/packages/logger/src/loggers/SentryLogger/Sentry.ts +1 -0
  222. package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +5 -3
  223. package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +31 -3
  224. package/packages/menu/src/MenuAndContentContainer/interface.ts +8 -0
  225. package/packages/modal-service/README.md +4 -1
  226. package/packages/modal-service/src/ModalService.tsx +29 -5
  227. package/packages/perf-utils/README.md +1 -120
  228. package/packages/perf-utils/src/array/filter.ts +1 -54
  229. package/packages/perf-utils/src/array/find.ts +1 -43
  230. package/packages/perf-utils/src/array/findIndex.ts +1 -43
  231. package/packages/perf-utils/src/array/forEach.ts +1 -48
  232. package/packages/perf-utils/src/array/includes.ts +1 -41
  233. package/packages/perf-utils/src/array/includesNaN.ts +1 -32
  234. package/packages/perf-utils/src/array/index.ts +1 -7
  235. package/packages/perf-utils/src/array/map.ts +1 -52
  236. package/packages/player-ui/README.md +1 -1
  237. package/packages/player-ui/src/CurrentTime.tsx +2 -2
  238. package/packages/player-ui/src/Duration.tsx +2 -2
  239. package/packages/player-ui/src/PauseButton.tsx +8 -0
  240. package/packages/player-ui/src/PlayerInteractable.tsx +1 -0
  241. package/packages/player-ui/src/PlayerTime.tsx +3 -1
  242. package/packages/player-ui/src/PlayerUI.tsx +68 -35
  243. package/packages/player-ui/src/RemainingTime.tsx +2 -2
  244. package/packages/player-ui/src/Seekbar.tsx +110 -18
  245. package/packages/player-ui/src/Seeking.ts +57 -16
  246. package/packages/player-ui/src/Subtitles.tsx +2 -2
  247. package/packages/player-ui/src/index.ts +1 -0
  248. package/packages/player-ui/src/mocks.ts +32 -8
  249. package/packages/player-ui/src/timeUtils.ts +3 -3
  250. package/packages/player-ui/src/types.ts +9 -3
  251. package/packages/router/README.md +1 -0
  252. package/packages/router/src/Route.tsx +61 -27
  253. package/packages/router/src/Router.tsx +63 -14
  254. package/packages/router/src/history.ts +8 -1
  255. package/packages/router/src/index.ts +1 -1
  256. package/packages/router/src/utils.ts +9 -4
  257. package/packages/sass-utils/src/linear-gradient.scss +9 -4
  258. package/packages/sass-utils/src/scale.1080.scss +3 -1
  259. package/packages/sass-utils/src/scale.720.scss +1 -1
  260. package/packages/time/README.md +4 -1
  261. package/packages/time/src/Time.ts +35 -13
  262. package/packages/time/src/adapters/24iMediaTimeApi.ts +47 -0
  263. package/packages/time/src/constants.ts +1 -0
  264. package/packages/time/src/services/24iMediaTimeApi/24iMediaTimeApi.ts +43 -0
  265. package/packages/time/src/services/24iMediaTimeApi/index.ts +6 -0
  266. package/packages/toast/src/ToastService.scss +1 -0
  267. package/packages/toast/src/ToastService.tsx +16 -5
  268. package/packages/types-bigscreen-jsx/README.md +5 -4
  269. package/packages/types-bigscreen-jsx/index.d.ts +72 -67
  270. package/packages/utils/README.md +27 -0
  271. package/packages/utils/src/elementUtils.ts +25 -0
  272. package/packages/utils/src/forceReflow.ts +14 -0
  273. package/packages/utils/src/index.ts +8 -0
  274. package/packages/utils/src/keyPress/index.ts +6 -0
  275. package/packages/utils/src/keyPress/keyPressSimulator.ts +74 -0
  276. package/packages/utils/src/keyPress/simulateKeyPress.ts +25 -0
  277. package/packages/utils/src/scaledImage.ts +6 -3
  278. package/packages/utils/src/textUtils.ts +46 -14
  279. package/packages/utils/src/wait.ts +3 -1
  280. package/packages/utils/src/xhr/xhrSend.ts +3 -1
  281. package/packages/utils/src/xhr/xhrSendRetry.ts +3 -1
  282. package/packages/zapping/src/ChannelZapping.ts +9 -0
  283. package/packages/zapping/src/Zapping.tsx +10 -0
  284. package/utils/release/release.ts +156 -0
  285. package/packages/driver-tizen/src/types.ts +0 -14
  286. package/packages/focus/src/Layout/__test__/Base.spec.ts +0 -180
  287. package/packages/focus/src/Layout/__test__/Horizontal.spec.ts +0 -94
  288. package/packages/focus/src/Layout/__test__/Matrix.spec.ts +0 -261
  289. package/packages/focus/src/Layout/__test__/Vertical.spec.ts +0 -46
  290. package/packages/focus/src/Layout/__test__/isRtl.spec.ts +0 -23
  291. package/packages/focus/src/Layout/__test__/shared.ts +0 -19
  292. package/packages/keyboard/src/WhitelabelKeyboard/focusMatrix.ts +0 -19
@@ -1,54 +1 @@
1
- /**
2
- * Performance optimized version of `Array.prototype.filter` method.
3
- *
4
- * Creates a new array with all elements that pass the test implemented by the provided function.
5
- * @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
6
- *
7
- * **Limitations against native implementation**:
8
- *
9
- * - **`callback` is invoked for all indexes of the array**,
10
- * (not only for indexes with assigned values like native filter implementation), see example.
11
- * - **Doesn't coerce returned value from a callback to `true` or `false`**,
12
- * the callback has to return a boolean value directly.
13
- * - Doesn't accept the `scope` as last argument.
14
- *
15
- * @param {Array} array - Input array.
16
- * @param {Function} callback - Predicate to test each element of the array.
17
- * Return true to keep the element, false otherwise.
18
- *
19
- * @return {Array} with filtered results.
20
- *
21
- * @example
22
- * import { filter } from '@24i/bigscreen-sdk/perf-utils/array';
23
- *
24
- * const array = ['spray', 'limit', 'elite', 'exuberant', 'destruction'];
25
- *
26
- * //const result = array.filter(word => word.length > 6); // slower native solution
27
- * const result = filter(array, word => word.length > 6); // faster
28
- *
29
- * console.log(result);
30
- * // expected output: Array ["exuberant", "destruction"]
31
- *
32
- * @example
33
- * import { filter } from '@24i/bigscreen-sdk/perf-utils/array';
34
- *
35
- * const nativeResult = [1, 2, , undefined].filter(() => true);
36
- * console.log(nativeResult); // Array [1, 2, undefined]. Yes, empty value is missing here.
37
- *
38
- * const customResult = filter([1, 2, , undefined], () => true);
39
- * console.log(customResult); // Array [1, 2, undefined, undefined]. With iteration over hole.
40
- */
41
- export const filter = <T>(
42
- array: T[],
43
- callback: (value: T, index: number, array: T[]) => boolean,
44
- ): T[] => {
45
- const output: T[] = [];
46
-
47
- for (let i = 0, len = array.length; i < len; i++) {
48
- if (callback(array[i], i, array) === true) {
49
- output.push(array[i]);
50
- }
51
- }
52
-
53
- return output;
54
- };
1
+ export { filter } from '@24i/appstage-shared-perf-utils/dist/array';
@@ -1,43 +1 @@
1
- /**
2
- * Performance optimized version of `Array.prototype.find` method.
3
- *
4
- * Returns the first element that satisfies the testing function. Undefined if no item satisfies
5
- * the testing function.
6
- * @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/find
7
- *
8
- * **Limitations against native implementation**:
9
- *
10
- * - **`callback` is invoked for all indexes of the array**,
11
- * (not only for indexes with assigned values like native filter implementation), see example.
12
- * - **Doesn't coerce returned value from a callback to `true` or `false`**,
13
- * the callback has to return a boolean value directly.
14
- * - Doesn't accept the `scope` as last argument.
15
- *
16
- * @param {Array<T>} array - Input array.
17
- * @param {Function} callback - Predicate to test each element of the array.
18
- * Return true to select the element, false otherwise.
19
- *
20
- * @return {T | undefined} The first element the satisfied the testing function. Or undefined.
21
- *
22
- * @example
23
- * import { find } from '@24i/bigscreen-sdk/perf-utils/array';
24
- *
25
- * const array = ['spray', 'limit', 'elite', 'exuberant', 'destruction'];
26
- *
27
- * //const result = array.find(word => word.length > 6); // slower native solution
28
- * const result = find(array, word => word.length > 6); // faster
29
- *
30
- * console.log(result);
31
- * // expected output: "exuberant"
32
- */
33
- export const find = <T>(
34
- array: T[],
35
- callback: (value: T, index: number, array: T[]) => boolean,
36
- ): T | undefined => {
37
- for (let i = 0, len = array.length; i < len; i++) {
38
- if (callback(array[i], i, array) === true) {
39
- return array[i];
40
- }
41
- }
42
- return undefined;
43
- };
1
+ export { find } from '@24i/appstage-shared-perf-utils/dist/array';
@@ -1,43 +1 @@
1
- /**
2
- * Performance optimized version of `Array.prototype.findIndex` method.
3
- *
4
- * Returns the index of the first element that satisfies the testing function.
5
- * Returns -1 if no item satisfies the testing function.
6
- * @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex
7
- *
8
- * **Limitations against native implementation**:
9
- *
10
- * - **`callback` is invoked for all indexes of the array**,
11
- * (not only for indexes with assigned values like native filter implementation), see example.
12
- * - **Doesn't coerce returned value from a callback to `true` or `false`**,
13
- * the callback has to return a boolean value directly.
14
- * - Doesn't accept the `scope` as last argument.
15
- *
16
- * @param {Array<T>} array - Input array.
17
- * @param {Function} callback - Predicate to test each element of the array.
18
- * Return true to select the index of the element, false otherwise.
19
- *
20
- * @return {number} Index of the first element the satisfied the testing function. Or -1.
21
- *
22
- * @example
23
- * import { findIndex } from '@24i/bigscreen-sdk/perf-utils/array';
24
- *
25
- * const array = ['spray', 'limit', 'elite', 'exuberant', 'destruction'];
26
- *
27
- * //const result = array.findIndex(word => word.length > 6); // slower native solution
28
- * const result = findIndex(array, word => word.length > 6); // faster
29
- *
30
- * console.log(result);
31
- * // expected output: 3
32
- */
33
- export const findIndex = <T>(
34
- array: T[],
35
- callback: (value: T, index: number, array: T[]) => boolean,
36
- ): number => {
37
- for (let i = 0, len = array.length; i < len; i++) {
38
- if (callback(array[i], i, array) === true) {
39
- return i;
40
- }
41
- }
42
- return -1;
43
- };
1
+ export { findIndex } from '@24i/appstage-shared-perf-utils/dist/array';
@@ -1,48 +1 @@
1
- /**
2
- * Performance optimized version of `Array.prototype.forEach` method.
3
- *
4
- * Executes a provided function once for each array element.
5
- * @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
6
- *
7
- * **Limitations against native implementation**:
8
- *
9
- * - **`callback` is invoked for all indexes of the array**,
10
- * (not only for indexes with assigned values like native filter implementation), see example.
11
- * - Doesn't accept the scope as last argument.
12
- *
13
- * @param {Array} array - Input array.
14
- * @param {Function} callback - Function to execute on each element.
15
- *
16
- * @return {void}
17
- *
18
- * @example
19
- * import { forEach } from '@24i/bigscreen-sdk/perf-utils/array';
20
- *
21
- * const array = ['a', 'b', 'c'];
22
- *
23
- * // array.forEach(item => console.log(item)); // slower native solution
24
- * forEach(array, item => console.log(item)); // faster
25
- *
26
- * // expected output: "a"
27
- * // expected output: "b"
28
- * // expected output: "c"
29
- *
30
- * @example
31
- * import { forEach } from '@24i/bigscreen-sdk/perf-utils/array';
32
- *
33
- * const array = new Array(1000); // creates an empty array with length 1000
34
- *
35
- * let iNative = 0;
36
- * array.forEach(() => iNative++);
37
- * console.log(iNative); // 0 - the callback was never called
38
- *
39
- * let iCustom = 0;
40
- * forEach(array, () => iCustom++);
41
- * console.log(iCustom); // 1000 - the callback was called for each item (hole) in array
42
- */
43
-
44
- export const forEach = <T>(array: T[], callback: (value: T, index: number, array: T[]) => void) => {
45
- for (let i = 0, len = array.length; i < len; i++) {
46
- callback(array[i], i, array);
47
- }
48
- };
1
+ export { forEach } from '@24i/appstage-shared-perf-utils/dist/array';
@@ -1,41 +1 @@
1
- /**
2
- * Performance optimized version of `Array.prototype.includes` method
3
- * (doesn't work for searching NaN value).
4
- *
5
- * Determines whether an array includes a certain value among its entries,
6
- * returning true or false as appropriate.
7
-
8
- * @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/includes
9
- * @see includesNaN()
10
- *
11
- * **Limitations against native implementation**:
12
- * - **Doesn't work for searching NaN value. For that purpose, please use includesNaN()**.
13
- * - Doesn't accept the scope as last argument.
14
- *
15
- * @param {Array} array - Input array.
16
- * @param {*} valueToFind - Value to find in array.
17
- * @param {number} [fromIndex=0] - Index to start search from.
18
- *
19
- * @return {boolean}
20
- *
21
- * @example
22
- * import { includes } from '@24i/bigscreen-sdk/perf-utils/array';
23
- *
24
- * const array = ['item0', 'item1', 'item2'];
25
- *
26
- * //console.log(array.includes('item1')); // slower native solution
27
- * console.log(includes(array, 'item1')); // faster
28
- * // expected output: true
29
- *
30
- * //console.log(array.includes('item1')); // slower native solution
31
- * console.log(includes(array, 'item1', 2)); // faster
32
- * // expected output: false
33
- */
34
- export const includes = <T>(array: T[], valueToFind: T, fromIndex = 0): boolean => {
35
- for (let i = fromIndex, len = array.length; i < len; i++) {
36
- if (array[i] === valueToFind) {
37
- return true;
38
- }
39
- }
40
- return false;
41
- };
1
+ export { includes } from '@24i/appstage-shared-perf-utils/dist/array';
@@ -1,32 +1 @@
1
- /**
2
- * Performance optimized version of `Array.prototype.includes` method for testing `NaN` value.
3
- *
4
- * Determines whether an array includes NaN value among its entries,
5
- * returning true or false as appropriate.
6
- *
7
- * @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/includes
8
- *
9
- * @param {Array} array - Input array.
10
- * @param {number} [fromIndex=0] - Index to start search from.
11
- *
12
- * @return {boolean}
13
- *
14
- * @example
15
- * import { includesNaN } from '@24i/bigscreen-sdk/perf-utils/array';
16
- *
17
- * // returns true
18
- * includesNaN([0, NaN, 2]);
19
- *
20
- * // returns false
21
- * includesNaN([0, NaN, 2], 2);
22
- */
23
- export const includesNaN = (array: any[], fromIndex = 0): boolean => {
24
- for (let i = fromIndex, len = array.length; i < len; i++) {
25
- const iValue = array[i];
26
- // eslint-disable-next-line no-self-compare
27
- if (iValue !== iValue) { // true only for NaN value
28
- return true;
29
- }
30
- }
31
- return false;
32
- };
1
+ export { includesNaN } from '@24i/appstage-shared-perf-utils/dist/array';
@@ -1,7 +1 @@
1
- export { filter } from './filter';
2
- export { find } from './find';
3
- export { findIndex } from './findIndex';
4
- export { forEach } from './forEach';
5
- export { includes } from './includes';
6
- export { includesNaN } from './includesNaN';
7
- export { map } from './map';
1
+ export * from '@24i/appstage-shared-perf-utils/dist/array';
@@ -1,52 +1 @@
1
- /**
2
- * Performance optimized version of `Array.prototype.map` method.
3
- *
4
- * Creates a new array populated with the results of calling a provided function
5
- * on every element in the calling array.
6
- *
7
- * @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map
8
- *
9
- * **Limitations against native implementation**:
10
- *
11
- * - **`callback` is invoked for all indexes of the array**,
12
- * (not only for indexes with assigned values like native filter implementation), see example.
13
- * - Doesn't accept the `scope` as last argument.
14
- *
15
- * @param {Array} array - Input array.
16
- * @param {Function} callback - Function that is called for every element of arr.
17
- * Each time callback executes, the returned value is added to output array.
18
- *
19
- * @return {Array} with mapped results.
20
- *
21
- * @example
22
- * import { map } from '@24i/bigscreen-sdk/perf-utils/array';
23
- *
24
- * const array = [1, 4, 9, 16];
25
- *
26
- * // const mappedArray = array.map(x => x * 2); // slower native solution
27
- * const mappedArray = map(array, x => x * 2); // faster
28
- *
29
- * console.log(mappedArray);
30
- * // expected output: Array [2, 8, 18, 32]
31
- *
32
- * @example
33
- * import { map } from '@24i/bigscreen-sdk/perf-utils/array';
34
- *
35
- * const array = [1, , 2].map(x => x * x) // [ 1, , 4 ]
36
- *
37
- * const nativeResult = array.map(x => x * x);
38
- * console.log(nativeResult); // [ 1, , 4 ] // keeps hole in array
39
- *
40
- * const customResult = map(array, x => x * x);
41
- * console.log(customResult); // [ 1, NaN , 4 ] NaN? -> undefined * undefined = NaN
42
- */
43
- export const map = <T, M>(array: T[], callback: (item: T, index: number, array: T[]) => M): M[] => {
44
- const len = array.length;
45
- const output = new Array(len);
46
-
47
- for (let i = 0; i < len; i++) {
48
- output[i] = callback(array[i], i, array);
49
- }
50
-
51
- return output;
52
- };
1
+ export { map } from '@24i/appstage-shared-perf-utils/dist/array';
@@ -70,7 +70,7 @@ Displays the current remaining time.
70
70
  - `longFormat` - long format of a displayed time (defaults to h:mm:ss)
71
71
  - `shortFormat` - short format of a displayed time (defaults to m:ss)
72
72
 
73
- ### Current Time
73
+ ### Duration
74
74
  Displays the duration.
75
75
  #### Props
76
76
  - `className` - optional className to add to default one
@@ -1,5 +1,5 @@
1
1
  import { Component, createRef, DeclareProps } from '@24i/bigscreen-sdk/jsx';
2
- import { ITimeUpdateEvent } from '@24i/player-base';
2
+ import { ITimeUpdateEvent } from '@24i/bigscreen-players-engine-base';
3
3
  import { PlayerTime } from './PlayerTime';
4
4
  import { PlayerUICommonProps, PlayerUITimeProps } from './types';
5
5
 
@@ -26,7 +26,7 @@ export class CurrentTime extends Component<Props> {
26
26
  const playerInstance = ui.getPlayer();
27
27
  this.isLive = playerInstance.live;
28
28
  playerInstance.addEventListener('timeupdate', this.onTimeUpdate);
29
- const { programStart = 0 } = playerInstance.getMetadata() || {};
29
+ const { programStart = 0 } = playerInstance.metadata || {};
30
30
  this.liveStartTime = programStart || Date.now();
31
31
  }
32
32
 
@@ -1,5 +1,5 @@
1
1
  import { Component, createRef, DeclareProps } from '@24i/bigscreen-sdk/jsx';
2
- import { IDurationChangeEvent } from '@24i/player-base';
2
+ import { IDurationChangeEvent } from '@24i/bigscreen-players-engine-base';
3
3
  import { PlayerTime } from './PlayerTime';
4
4
  import { PlayerUICommonProps, PlayerUITimeProps } from './types';
5
5
 
@@ -20,7 +20,7 @@ export class Duration extends Component<Props> {
20
20
  componentDidMount() {
21
21
  const { ui } = this.props;
22
22
  const playerInstance = ui.getPlayer();
23
- const { programStart = 0, programEnd = 0 } = playerInstance.getMetadata() || {};
23
+ const { programStart = 0, programEnd = 0 } = playerInstance.metadata || {};
24
24
  const isLive = playerInstance.live;
25
25
  if (isLive && programStart < programEnd) {
26
26
  this.time.current!.updateTime(programEnd - programStart);
@@ -8,6 +8,8 @@ type Props = PlayerUICommonProps;
8
8
  export class PauseButton extends Component<Props> implements IFocusable {
9
9
  button = createRef<PlayerInteractable>();
10
10
 
11
+ isPaused = false;
12
+
11
13
  static defaultProps = {
12
14
  className: '',
13
15
  };
@@ -31,10 +33,16 @@ export class PauseButton extends Component<Props> implements IFocusable {
31
33
 
32
34
  onPlaying = () => {
33
35
  this.button.current!.show();
36
+ if (this.isPaused) {
37
+ const { ui } = this.props;
38
+ ui.getPlayer().triggerEvent('unpause');
39
+ }
40
+ this.isPaused = false;
34
41
  };
35
42
 
36
43
  onPause = () => {
37
44
  this.button.current!.hide();
45
+ this.isPaused = true;
38
46
  };
39
47
 
40
48
  focus(options?: FocusOptions) {
@@ -58,6 +58,7 @@ export class PlayerInteractable extends Component<Props> {
58
58
  ref={this.div}
59
59
  className={`player-ui-button ${hidden ? DISPLAY_NONE : ''} ${className}`}
60
60
  onPress={this.onPress}
61
+ blockRepeatedKeyDown
61
62
  >
62
63
  {children}
63
64
  </Interactable>
@@ -8,6 +8,7 @@ type Props = PlayerUITimeProps & {
8
8
  longTreshold?: number,
9
9
  shortFormat?: string,
10
10
  longFormat?: string,
11
+ isHiddenForAria?: boolean,
11
12
  };
12
13
 
13
14
  export class PlayerTime extends Component<Props> {
@@ -42,11 +43,12 @@ export class PlayerTime extends Component<Props> {
42
43
  }
43
44
 
44
45
  render() {
45
- const { className } = this.props;
46
+ const { className, isHiddenForAria } = this.props;
46
47
  return (
47
48
  <div
48
49
  ref={this.div}
49
50
  className={`player-time ${className || ''}`}
51
+ {...isHiddenForAria && { 'aria-hidden': true }}
50
52
  >
51
53
  {this.formatTime()}
52
54
  </div>
@@ -1,6 +1,6 @@
1
1
  import { Component, createRef, DeclareProps } from '@24i/bigscreen-sdk/jsx';
2
- import { PlayerBase } from '@24i/player-base';
3
- import { switchByKey } from '@24i/bigscreen-sdk/device/keymap';
2
+ import { PlayerBase } from '@24i/bigscreen-players-engine-base';
3
+ import { FF, REW, switchByKey } from '@24i/bigscreen-sdk/device/keymap';
4
4
  import { stopEvent } from '@24i/bigscreen-sdk/utils/stopEvent';
5
5
  import {
6
6
  IDisplayToggler, getDisplayToggler, DISPLAY_NONE,
@@ -16,12 +16,15 @@ export type PlayerUIState = {
16
16
 
17
17
  type Props = {
18
18
  children: (state: PlayerUIState) => JSX.Element | JSX.Element[] | string | null | null[],
19
- player: PlayerBase<any>,
19
+ player: PlayerBase,
20
20
  timeout?: number,
21
21
  className?: string,
22
22
  hidden?: boolean,
23
+ disallowSeeking?: boolean,
23
24
  onClose?: () => void,
24
25
  onHide?: () => void,
26
+ isPauseAllowed?: () => boolean,
27
+ showSubtitlesPicker?: () => void,
25
28
  };
26
29
 
27
30
  export class PlayerUI extends Component<Props>
@@ -32,41 +35,47 @@ export class PlayerUI extends Component<Props>
32
35
 
33
36
  isHidingDisabled = false;
34
37
 
35
- seeking: Seeking;
38
+ isSeekingDisabled = false;
39
+
40
+ seeking: Seeking | undefined;
36
41
 
37
42
  div = createRef<HTMLDivElement>();
38
43
 
39
44
  // eslint-disable-next-line react/destructuring-assignment
40
45
  divDisplay: IDisplayToggler = getDisplayToggler(this.div, this.props.hidden);
41
46
 
42
- player: PlayerBase<any> | null = null;
47
+ player: PlayerBase | null = null;
43
48
 
44
49
  static defaultProps = {
45
50
  timeout: 5000,
46
51
  className: '',
47
52
  hidden: false,
53
+ disallowSeeking: false,
48
54
  onClose: noop,
49
55
  onHide: noop,
56
+ isPauseAllowed: () => true,
50
57
  };
51
58
 
52
59
  declare props: DeclareProps<Props, typeof PlayerUI.defaultProps>;
53
60
 
54
61
  constructor(props: Props) {
55
62
  super(props);
56
- const { hidden, player } = this.props;
63
+ const { hidden, player, disallowSeeking } = this.props;
57
64
  this.player = player;
58
- this.seeking = new Seeking(player);
65
+ if (!disallowSeeking) {
66
+ this.seeking = new Seeking(player);
67
+ }
59
68
  this.isHidden = hidden;
60
69
  }
61
70
 
62
71
  componentDidMount() {
63
72
  if (!this.isHidden) this.heartbeat();
64
- this.seeking.subscribeEvents();
73
+ if (this.seeking) this.seeking.subscribeEvents();
65
74
  }
66
75
 
67
76
  componentWillUnmount() {
68
77
  this.stopHeartbeat();
69
- this.seeking.unsubscribeEvents();
78
+ if (this.seeking) this.seeking.unsubscribeEvents();
70
79
  }
71
80
 
72
81
  onKeyDown = (event: KeyboardEvent) => {
@@ -82,13 +91,23 @@ export class PlayerUI extends Component<Props>
82
91
  STOP: this.onKeyStop,
83
92
  FF: this.onKeyForward,
84
93
  REW: this.onKeyRewind,
94
+ SUBTITLES: this.onKeySubtitles,
85
95
  });
86
- if (processed) stopEvent(event);
96
+ if (processed && !FF.is(event) && !REW.is(event)) stopEvent(event);
97
+ };
98
+
99
+ onKeySubtitles = () => {
100
+ const { showSubtitlesPicker } = this.props;
101
+ if (showSubtitlesPicker) {
102
+ showSubtitlesPicker();
103
+ }
104
+ return true;
87
105
  };
88
106
 
89
107
  onKeyPlay = () => {
90
- if (this.seeking.isSeeking()) {
108
+ if (this.seeking?.isSeeking()) {
91
109
  this.seeking.confirmSeek();
110
+ if (!this.isPlaying()) this.trigger(PlayerAction.PLAY);
92
111
  return true;
93
112
  }
94
113
  if (!this.isPlaying()) {
@@ -100,8 +119,11 @@ export class PlayerUI extends Component<Props>
100
119
  };
101
120
 
102
121
  onKeyPause = () => {
103
- if (this.seeking.isAutomaticallySeeking()) {
122
+ const { isPauseAllowed } = this.props;
123
+ if (!isPauseAllowed()) return false;
124
+ if (this.seeking?.isAutomaticallySeeking()) {
104
125
  this.seeking.stopAutomaticSeek();
126
+ if (this.isPlaying()) this.trigger(PlayerAction.PAUSE);
105
127
  return true;
106
128
  }
107
129
  if (this.isPlaying()) {
@@ -113,6 +135,13 @@ export class PlayerUI extends Component<Props>
113
135
  };
114
136
 
115
137
  onKeyPlayPause = () => {
138
+ const { isPauseAllowed } = this.props;
139
+ if (!isPauseAllowed()) return false;
140
+ if (this.seeking?.isSeeking()) {
141
+ this.seeking.confirmSeek();
142
+ if (!this.isPlaying()) this.trigger(PlayerAction.PLAY);
143
+ return true;
144
+ }
116
145
  this.show();
117
146
  if (this.isPlaying()) this.trigger(PlayerAction.PAUSE);
118
147
  else this.trigger(PlayerAction.PLAY);
@@ -126,36 +155,29 @@ export class PlayerUI extends Component<Props>
126
155
  };
127
156
 
128
157
  onKeyForward = () => {
129
- if (this.seeking.isAutomaticallySeekingBackward) {
130
- this.seeking.stopAutomaticSeek();
131
- return true;
132
- }
133
- if (!this.seeking.isAutomaticallySeekingForward) {
134
- this.seeking.startAutomaticSeekForward();
135
- return true;
136
- }
137
- return false;
158
+ if (!this.seeking) return true;
159
+ if (this.isSeekingDisabled) return true;
160
+ if (this.seeking.isAutomaticallySeekingBackward) this.seeking.stopAutomaticSeek();
161
+ this.disableHiding();
162
+ this.seeking.automaticSeekForward();
163
+ return true;
138
164
  };
139
165
 
140
166
  onKeyRewind = () => {
141
- if (this.seeking.isAutomaticallySeekingForward) {
142
- this.seeking.stopAutomaticSeek();
143
- return true;
144
- }
145
- if (!this.seeking.isAutomaticallySeekingBackward) {
146
- this.seeking.startAutomaticSeekBackward();
147
- return true;
148
- }
149
- return false;
167
+ if (!this.seeking) return true;
168
+ if (this.isSeekingDisabled) return true;
169
+ if (this.seeking.isAutomaticallySeekingForward) this.seeking.stopAutomaticSeek();
170
+ this.disableHiding();
171
+ this.seeking.automaticSeekBackward();
172
+ return true;
173
+
150
174
  };
151
175
 
152
- getPlayer() {
153
- return this.player!;
154
- }
176
+ getPlayer = () => this.player!;
155
177
 
156
- setPlayer(player: PlayerBase<any>) {
178
+ setPlayer(player: PlayerBase) {
157
179
  this.player = player;
158
- this.seeking.setPlayer(player);
180
+ if (this.seeking) this.seeking.setPlayer(player);
159
181
  }
160
182
 
161
183
  trigger(action: PlayerAction, payload?: any) {
@@ -219,6 +241,17 @@ export class PlayerUI extends Component<Props>
219
241
  this.isHidingDisabled = false;
220
242
  }
221
243
 
244
+ disableSeeking() {
245
+ if (this.seeking?.isSeeking() || this.seeking?.isAutomaticallySeeking()) {
246
+ this.seeking.cancelSeek();
247
+ }
248
+ this.isSeekingDisabled = true;
249
+ }
250
+
251
+ enableSeeking() {
252
+ this.isSeekingDisabled = false;
253
+ }
254
+
222
255
  render() {
223
256
  const { children, hidden, className } = this.props;
224
257
  return (
@@ -1,5 +1,5 @@
1
1
  import { Component, createRef, DeclareProps } from '@24i/bigscreen-sdk/jsx';
2
- import { IDurationChangeEvent, ITimeUpdateEvent } from '@24i/player-base';
2
+ import { IDurationChangeEvent, ITimeUpdateEvent } from '@24i/bigscreen-players-engine-base';
3
3
  import { PlayerTime } from './PlayerTime';
4
4
  import { PlayerUICommonProps, PlayerUITimeProps } from './types';
5
5
 
@@ -32,7 +32,7 @@ export class RemainingTime extends Component<Props> {
32
32
  this.duration = playerInstance.duration;
33
33
  playerInstance.addEventListener('timeupdate', this.onTimeUpdate);
34
34
  playerInstance.addEventListener('durationchange', this.onDurationChange);
35
- const { programEnd = 0 } = playerInstance.getMetadata() || {};
35
+ const { programEnd = 0 } = playerInstance.metadata || {};
36
36
  this.liveEndTime = programEnd || Date.now();
37
37
  }
38
38