@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.
- package/README.md +2 -3
- package/ci/is_ci_job_skippable.sh +153 -0
- package/package.json +55 -34
- package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +9 -9
- package/packages/analytics/README.md +8 -0
- package/packages/analytics/src/A.ts +1 -0
- package/packages/analytics/src/Analytics.ts +1 -0
- package/packages/analytics/src/analyticsOnScroll.ts +1 -0
- package/packages/analytics/src/clients/ConsoleAnalytics/ConsoleAnalytics.ts +1 -0
- package/packages/analytics/src/clients/ConsoleAnalytics/index.ts +1 -0
- package/packages/analytics/src/clients/GoogleAnalytics/GoogleAnalytics.ts +196 -0
- package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +126 -0
- package/packages/analytics/src/clients/GoogleAnalytics/getUrl.ts +17 -0
- package/packages/analytics/src/clients/GoogleAnalytics/index.ts +2 -0
- package/packages/analytics/src/clients/GoogleAnalytics/interface.ts +82 -0
- package/packages/analytics/src/clients/GoogleAnalytics/mapPayload.ts +51 -0
- package/packages/analytics/src/clients/GoogleAnalytics/prepareBody.ts +14 -0
- package/packages/analytics/src/clients/TealiumAnalytics/TealiumAnalytics.ts +181 -0
- package/packages/analytics/src/clients/TealiumAnalytics/constants.ts +106 -0
- package/packages/analytics/src/clients/TealiumAnalytics/findForLanguage.ts +9 -0
- package/packages/analytics/src/clients/TealiumAnalytics/index.ts +4 -0
- package/packages/analytics/src/clients/TealiumAnalytics/interface.ts +35 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/__mocks__/mediaPayload.ts +72 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/helper.ts +36 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppError.ts +13 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppOpen.ts +13 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteAdd.ts +11 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteRemove.ts +11 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerClose.ts +15 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerOpen.ts +15 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSceneView.ts +18 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearch.ts +18 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchFailed.ts +8 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchSuccess.ts +8 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoPause.ts +15 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoProgress.ts +18 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoResume.ts +15 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStart.ts +15 -0
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStop.ts +15 -0
- package/packages/analytics/src/clients/TealiumAnalytics/types.ts +161 -0
- package/packages/analytics/src/clients/TwentyFourIQ/TwentyFourIQClient.ts +107 -0
- package/packages/analytics/src/clients/TwentyFourIQ/constants.ts +111 -0
- package/packages/analytics/src/clients/TwentyFourIQ/helper.ts +34 -0
- package/packages/analytics/src/clients/TwentyFourIQ/index.ts +2 -0
- package/packages/analytics/src/clients/TwentyFourIQ/interface.ts +34 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdEvent.ts +20 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBase.ts +24 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBuffering.ts +15 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerClose.ts +25 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerOpen.ts +17 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapSceneView.ts +15 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapScroll.ts +17 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoComplete.ts +22 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoPause.ts +25 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoProgress.ts +25 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStart.ts +34 -0
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStop.ts +32 -0
- package/packages/analytics/src/clients/TwentyFourIQ/types.ts +132 -0
- package/packages/analytics/src/constants.ts +1 -0
- package/packages/analytics/src/index.ts +3 -0
- package/packages/analytics/src/interface.ts +1 -0
- package/packages/analytics/src/utils/generateSessionId.ts +8 -0
- package/packages/async-image/src/AsyncImage.tsx +15 -10
- package/packages/developer-tools/PlayerDebugWindow/README.md +1 -1
- package/packages/developer-tools/src/DeveloperConsole/DeveloperConsole.tsx +1 -0
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +11 -0
- package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +5 -5
- package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +15 -0
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfo.tsx +2 -0
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +2 -1
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +57 -5
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +12 -0
- package/packages/developer-tools/src/TechnicalInfo/translations.ts +8 -0
- package/packages/device/src/driver/index.android.tv.ts +1 -0
- package/packages/device/src/driver/index.firetv.ts +1 -0
- package/packages/device/src/driver/index.smartcast.tv.ts +1 -0
- package/packages/device/src/getKeyDigit.ts +2 -2
- package/packages/device/src/resolver/resolver.ts +19 -0
- package/packages/digital-clock/src/DigitalClock.tsx +15 -4
- package/packages/driver-androidtv/src/DeviceAndroidTV.ts +262 -0
- package/packages/driver-androidtv/src/__mocks__/javaScriptBridge.ts +45 -0
- package/packages/driver-androidtv/src/formatUserAgent.ts +11 -0
- package/packages/driver-androidtv/src/index.ts +2 -0
- package/packages/driver-androidtv/src/keymap.ts +27 -0
- package/packages/driver-androidtv/src/types.ts +155 -0
- package/packages/driver-base/src/DeviceBase.ts +73 -2
- package/packages/driver-base/src/KeyMap/Key.ts +8 -1
- package/packages/driver-base/src/KeyMap/KeyMap.ts +4 -0
- package/packages/driver-base/src/KeyMap/interface.ts +1 -0
- package/packages/driver-base/src/KeyMap/overrideValues.ts +2 -1
- package/packages/driver-base/src/__mocks__/DeviceBase.ts +24 -0
- package/packages/driver-base/src/__mocks__/keyMap.ts +1 -0
- package/packages/driver-base/src/index.ts +3 -0
- package/packages/driver-base/src/types/AdInfo.ts +5 -0
- package/packages/driver-base/src/types/DeviceEvent.ts +2 -0
- package/packages/driver-base/src/types/InAppPurchase.ts +20 -0
- package/packages/driver-base/src/types/KeycodeKeyMap.ts +1 -0
- package/packages/driver-browser/src/DeviceBrowser.ts +26 -0
- package/packages/driver-browser/src/keymap.ts +8 -0
- package/packages/driver-entone/src/DeviceEntone.ts +31 -1
- package/packages/driver-entone/src/keymap.ts +1 -0
- package/packages/driver-firetv/src/DeviceFireTV.ts +86 -0
- package/packages/driver-firetv/src/__mocks__/javaScriptBridge.ts +45 -0
- package/packages/driver-firetv/src/index.ts +1 -0
- package/packages/driver-firetv/src/types.ts +1 -0
- package/packages/driver-hbbtv/src/DeviceHbbTV.ts +26 -0
- package/packages/driver-kreatv/src/DeviceKreaTV.ts +26 -0
- package/packages/driver-saphi/src/DeviceSaphi.ts +26 -0
- package/packages/driver-smartcast/src/DeviceSmartCast.ts +380 -0
- package/packages/driver-smartcast/src/__mocks__/api.ts +69 -0
- package/packages/driver-smartcast/src/index.ts +1 -0
- package/packages/driver-smartcast/src/keymap.ts +9 -0
- package/packages/driver-smartcast/src/types.ts +102 -0
- package/packages/driver-tizen/src/DeviceTizen.ts +121 -7
- package/packages/driver-tizen/src/ITizen.ts +15116 -202
- package/packages/driver-tizen/src/IWebapis.ts +8643 -87
- package/packages/driver-tizen/src/TizenKeys.ts +4 -2
- package/packages/driver-tizen/src/__mocks__/tizen.ts +7 -8
- package/packages/driver-tizen/src/constants.ts +1 -195
- package/packages/driver-vidaa/src/DeviceVidaa.ts +29 -2
- package/packages/driver-vidaa/src/__mocks__/vidaa.ts +1 -1
- package/packages/driver-vidaa/src/keymap.ts +2 -0
- package/packages/driver-webos/src/DeviceWebos.ts +55 -0
- package/packages/driver-webos/src/__mocks__/webos.ts +33 -0
- package/packages/driver-webos/src/constants.ts +1 -0
- package/packages/driver-webos/src/keymap.ts +2 -1
- package/packages/driver-webos/src/types.ts +30 -0
- package/packages/driver-xbox/src/DeviceXbox.ts +30 -1
- package/packages/driver-xbox/src/keymap.ts +1 -1
- package/packages/epg/README.md +3 -1
- package/packages/epg/src/v2/Cell.tsx +16 -2
- package/packages/epg/src/v2/DataManager.ts +112 -41
- package/packages/epg/src/v2/DatePicker.tsx +9 -3
- package/packages/epg/src/v2/DateToast/DateToast.tsx +12 -9
- package/packages/epg/src/v2/Day.tsx +6 -3
- package/packages/epg/src/v2/Epg.tsx +5 -5
- package/packages/epg/src/v2/MockGenerator/generator.ts +3 -2
- package/packages/epg/src/v2/ProgramInfo/utils.ts +4 -3
- package/packages/epg/src/v2/Row.tsx +3 -1
- package/packages/epg/src/v2/TimelineSection.tsx +4 -1
- package/packages/epg/src/v2/basic/CellsManager.tsx +7 -2
- package/packages/epg/src/v2/basic/RowsManager.tsx +3 -1
- package/packages/epg/src/v2/interface.ts +13 -0
- package/packages/events-manager/src/EventsManager.ts +1 -56
- package/packages/focus/README.md +33 -0
- package/packages/focus/src/IFocusable.ts +1 -0
- package/packages/focus/src/Layout/Base.tsx +41 -6
- package/packages/focus/src/Layout/Matrix.tsx +51 -19
- package/packages/focus/src/focusFirstExisting.ts +7 -1
- package/packages/focus/src/hasFocus.ts +36 -0
- package/packages/focus/src/index.ts +2 -1
- package/packages/gallup/src/Gallup.ts +3 -3
- package/packages/grid/src/Base/Base.tsx +15 -10
- package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +4 -2
- package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +6 -6
- package/packages/icon/src/Icon.tsx +27 -5
- package/packages/input/README.md +1 -1
- package/packages/input/src/Input.tsx +10 -10
- package/packages/interactable/README.md +2 -1
- package/packages/interactable/src/Interactable.tsx +9 -3
- package/packages/interactable/src/interface.ts +1 -0
- package/packages/jsx/src/index.ts +1 -1
- package/packages/jsx/src/test-utils/index.ts +1 -0
- package/packages/jsx/src/test-utils/keyup.ts +27 -0
- package/packages/keyboard/README.md +2 -0
- package/packages/keyboard/src/Backdrop/Backdrop.scss +2 -0
- package/packages/keyboard/src/KeyboardBase.tsx +16 -4
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +10 -0
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +128 -142
- package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.scss +4 -0
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +1 -0
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +1 -0
- package/packages/keyboard/src/WhitelabelKeyboard/icons/key_language.svg +20 -0
- package/packages/keyboard/src/WhitelabelKeyboard/index.ts +1 -1
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/arabic.ts +27 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/burmese.ts +27 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/dari.ts +28 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/hebrew.ts +28 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/index.ts +15 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/korean.ts +26 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/latin.ts +26 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/pashto.ts +27 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/persian.ts +27 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/russian.ts +27 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/spanish.ts +26 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/special.ts +28 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/tibetan.ts +26 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/turkish.ts +26 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/ukrainian.ts +27 -0
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/urdu.ts +26 -0
- package/packages/keyboard/src/WhitelabelKeyboard/types.ts +22 -2
- package/packages/keyboard/src/types/index.ts +1 -1
- package/packages/keyboard/src/utils/caret.ts +5 -8
- package/packages/keyboard/src/utils/input.ts +5 -6
- package/packages/keyboard/src/utils/setInputSelectionRange.ts +10 -0
- package/packages/l10n/README.md +18 -0
- package/packages/l10n/src/date/common.ts +18 -6
- package/packages/l10n/src/date/cs.ts +2 -8
- package/packages/l10n/src/date/de.ts +97 -0
- package/packages/l10n/src/date/en-001.ts +3 -3
- package/packages/l10n/src/date/en-common.ts +5 -4
- package/packages/l10n/src/date/en-us.ts +3 -3
- package/packages/l10n/src/date/es.ts +71 -0
- package/packages/l10n/src/date/fr.ts +94 -0
- package/packages/l10n/src/date/he.ts +101 -0
- package/packages/l10n/src/date/iso.ts +12 -13
- package/packages/l10n/src/date/types.ts +9 -0
- package/packages/l10n/src/l10n.ts +61 -3
- package/packages/list/src/Base/Base.tsx +19 -9
- package/packages/list/src/Base/interface.ts +2 -2
- package/packages/list/src/BasicList/BasicList.tsx +7 -7
- package/packages/list/src/CenteredList/CenteredList.tsx +2 -2
- package/packages/list/src/CenteredList/controller.ts +0 -1
- package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +10 -10
- package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +2 -2
- package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +2 -2
- package/packages/list/src/FixedToEndList/FixedToEndList.tsx +2 -2
- package/packages/list/src/UnifiedListController/UnifiedListController.ts +6 -2
- package/packages/list/src/interface.ts +2 -2
- package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +7 -1
- package/packages/logger/src/loggers/SentryLogger/Sentry.ts +1 -0
- package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +5 -3
- package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +31 -3
- package/packages/menu/src/MenuAndContentContainer/interface.ts +8 -0
- package/packages/modal-service/README.md +4 -1
- package/packages/modal-service/src/ModalService.tsx +29 -5
- package/packages/perf-utils/README.md +1 -120
- package/packages/perf-utils/src/array/filter.ts +1 -54
- package/packages/perf-utils/src/array/find.ts +1 -43
- package/packages/perf-utils/src/array/findIndex.ts +1 -43
- package/packages/perf-utils/src/array/forEach.ts +1 -48
- package/packages/perf-utils/src/array/includes.ts +1 -41
- package/packages/perf-utils/src/array/includesNaN.ts +1 -32
- package/packages/perf-utils/src/array/index.ts +1 -7
- package/packages/perf-utils/src/array/map.ts +1 -52
- package/packages/player-ui/README.md +1 -1
- package/packages/player-ui/src/CurrentTime.tsx +2 -2
- package/packages/player-ui/src/Duration.tsx +2 -2
- package/packages/player-ui/src/PauseButton.tsx +8 -0
- package/packages/player-ui/src/PlayerInteractable.tsx +1 -0
- package/packages/player-ui/src/PlayerTime.tsx +3 -1
- package/packages/player-ui/src/PlayerUI.tsx +68 -35
- package/packages/player-ui/src/RemainingTime.tsx +2 -2
- package/packages/player-ui/src/Seekbar.tsx +110 -18
- package/packages/player-ui/src/Seeking.ts +57 -16
- package/packages/player-ui/src/Subtitles.tsx +2 -2
- package/packages/player-ui/src/index.ts +1 -0
- package/packages/player-ui/src/mocks.ts +32 -8
- package/packages/player-ui/src/timeUtils.ts +3 -3
- package/packages/player-ui/src/types.ts +9 -3
- package/packages/router/README.md +1 -0
- package/packages/router/src/Route.tsx +61 -27
- package/packages/router/src/Router.tsx +63 -14
- package/packages/router/src/history.ts +8 -1
- package/packages/router/src/index.ts +1 -1
- package/packages/router/src/utils.ts +9 -4
- package/packages/sass-utils/src/linear-gradient.scss +9 -4
- package/packages/sass-utils/src/scale.1080.scss +3 -1
- package/packages/sass-utils/src/scale.720.scss +1 -1
- package/packages/time/README.md +4 -1
- package/packages/time/src/Time.ts +35 -13
- package/packages/time/src/adapters/24iMediaTimeApi.ts +47 -0
- package/packages/time/src/constants.ts +1 -0
- package/packages/time/src/services/24iMediaTimeApi/24iMediaTimeApi.ts +43 -0
- package/packages/time/src/services/24iMediaTimeApi/index.ts +6 -0
- package/packages/toast/src/ToastService.scss +1 -0
- package/packages/toast/src/ToastService.tsx +16 -5
- package/packages/types-bigscreen-jsx/README.md +5 -4
- package/packages/types-bigscreen-jsx/index.d.ts +72 -67
- package/packages/utils/README.md +27 -0
- package/packages/utils/src/elementUtils.ts +25 -0
- package/packages/utils/src/forceReflow.ts +14 -0
- package/packages/utils/src/index.ts +8 -0
- package/packages/utils/src/keyPress/index.ts +6 -0
- package/packages/utils/src/keyPress/keyPressSimulator.ts +74 -0
- package/packages/utils/src/keyPress/simulateKeyPress.ts +25 -0
- package/packages/utils/src/scaledImage.ts +6 -3
- package/packages/utils/src/textUtils.ts +46 -14
- package/packages/utils/src/wait.ts +3 -1
- package/packages/utils/src/xhr/xhrSend.ts +3 -1
- package/packages/utils/src/xhr/xhrSendRetry.ts +3 -1
- package/packages/zapping/src/ChannelZapping.ts +9 -0
- package/packages/zapping/src/Zapping.tsx +10 -0
- package/utils/release/release.ts +156 -0
- package/packages/driver-tizen/src/types.ts +0 -14
- package/packages/focus/src/Layout/__test__/Base.spec.ts +0 -180
- package/packages/focus/src/Layout/__test__/Horizontal.spec.ts +0 -94
- package/packages/focus/src/Layout/__test__/Matrix.spec.ts +0 -261
- package/packages/focus/src/Layout/__test__/Vertical.spec.ts +0 -46
- package/packages/focus/src/Layout/__test__/isRtl.spec.ts +0 -23
- package/packages/focus/src/Layout/__test__/shared.ts +0 -19
- package/packages/keyboard/src/WhitelabelKeyboard/focusMatrix.ts +0 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KeyMap, KeycodeKeyMap } from '@24i/bigscreen-sdk/driver-base';
|
|
2
|
-
import {
|
|
2
|
+
import { Tizen } from './ITizen';
|
|
3
3
|
|
|
4
|
-
declare const tizen:
|
|
4
|
+
declare const tizen: Tizen;
|
|
5
5
|
|
|
6
6
|
type KeyCodeMap = { [key: string]: number };
|
|
7
7
|
|
|
@@ -49,6 +49,7 @@ export class TizenKeys {
|
|
|
49
49
|
tizen.tvinputdevice.registerKey('PreviousChannel');
|
|
50
50
|
tizen.tvinputdevice.registerKey('Info');
|
|
51
51
|
tizen.tvinputdevice.registerKey('Guide');
|
|
52
|
+
tizen.tvinputdevice.registerKey('Caption');
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
buildKeyMap(keyCodeMap: KeyCodeMap) {
|
|
@@ -84,6 +85,7 @@ export class TizenKeys {
|
|
|
84
85
|
EXIT: { keyCode: keyCodeMap.Exit },
|
|
85
86
|
INFO: { keyCode: keyCodeMap.Info },
|
|
86
87
|
GUIDE: { keyCode: keyCodeMap.Guide },
|
|
88
|
+
SUBTITLES: { keyCode: keyCodeMap.Caption },
|
|
87
89
|
});
|
|
88
90
|
this.keyMap = KeyMap.generateKeyCodeKeyMap();
|
|
89
91
|
}
|
|
@@ -8,6 +8,10 @@ export const webapis = {
|
|
|
8
8
|
getModelCode: () => 'model code',
|
|
9
9
|
getFirmware: () => 'firmware',
|
|
10
10
|
},
|
|
11
|
+
adinfo: {
|
|
12
|
+
getTIFA: () => 'adid',
|
|
13
|
+
isLATEnabled: () => true,
|
|
14
|
+
},
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
export const application = {
|
|
@@ -24,12 +28,7 @@ export const tizen = {
|
|
|
24
28
|
unregisterKey: () => {},
|
|
25
29
|
registerKey: () => {},
|
|
26
30
|
},
|
|
31
|
+
systeminfo: {
|
|
32
|
+
getPropertyValue: async () => {},
|
|
33
|
+
},
|
|
27
34
|
};
|
|
28
|
-
|
|
29
|
-
declare global {
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
-
interface Window {
|
|
32
|
-
webapis: typeof webapis,
|
|
33
|
-
tizen: typeof tizen,
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,197 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-magic-numbers */
|
|
2
|
-
|
|
3
1
|
export const VENDOR = 'Samsung Tizen';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export type AudioOutputMode = (
|
|
8
|
-
| 'PCM'
|
|
9
|
-
| 'DOLBY'
|
|
10
|
-
| 'DTS'
|
|
11
|
-
| 'AAC'
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
export type AudioBeepType = (
|
|
15
|
-
| 'UP'
|
|
16
|
-
| 'DOWN'
|
|
17
|
-
| 'LEFT'
|
|
18
|
-
| 'RIGHT'
|
|
19
|
-
| 'PAGE_LEFT'
|
|
20
|
-
| 'PAGE_RIGHT'
|
|
21
|
-
| 'BACK'
|
|
22
|
-
| 'SELECT'
|
|
23
|
-
| 'CANCEL'
|
|
24
|
-
| 'KEYPAD'
|
|
25
|
-
| 'KEYPAD_ENTER'
|
|
26
|
-
| 'KEYPAD_DEL'
|
|
27
|
-
| 'MOVE'
|
|
28
|
-
| 'PREPARING'
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
// MARK: SystemInfo
|
|
32
|
-
|
|
33
|
-
export type SystemInfoPropertyId = (
|
|
34
|
-
| 'BATTERY'
|
|
35
|
-
| 'CPU'
|
|
36
|
-
| 'STORAGE'
|
|
37
|
-
| 'DISPLAY'
|
|
38
|
-
| 'DEVICE_ORIENTATION'
|
|
39
|
-
| 'BUILD'
|
|
40
|
-
| 'LOCALE'
|
|
41
|
-
| 'NETWORK'
|
|
42
|
-
| 'WIFI_NETWORK'
|
|
43
|
-
| 'ETHERNET_NETWORK'
|
|
44
|
-
| 'CELLULAR_NETWORK'
|
|
45
|
-
| 'NET_PROXY_NETWORK'
|
|
46
|
-
| 'SIM'
|
|
47
|
-
| 'PERIPHERAL'
|
|
48
|
-
| 'MEMORY'
|
|
49
|
-
| 'VIDEOSOURCE'
|
|
50
|
-
| 'CAMERA_FLASH'
|
|
51
|
-
| 'ADS'
|
|
52
|
-
| 'SERVICE_COUNTRY'
|
|
53
|
-
| 'SOURCE_INFO'
|
|
54
|
-
| 'PANEL'
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
export type SystemInfoNetworkType = (
|
|
58
|
-
| 'NONE'
|
|
59
|
-
| '2G'
|
|
60
|
-
| '2.5G'
|
|
61
|
-
| '3G'
|
|
62
|
-
| '4G'
|
|
63
|
-
| 'WIFI'
|
|
64
|
-
| 'ETHERNET'
|
|
65
|
-
| 'NET_PROXY'
|
|
66
|
-
| 'UNKNOWN'
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
export type SystemInfoWifiSecurityMode = (
|
|
70
|
-
| 'NONE'
|
|
71
|
-
| 'WEP'
|
|
72
|
-
| 'WPA_PSK'
|
|
73
|
-
| 'WPA2_PSK'
|
|
74
|
-
| 'EAP'
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
export type SystemInfoWifiEncryptionType = (
|
|
78
|
-
| 'NONE'
|
|
79
|
-
| 'WEP'
|
|
80
|
-
| 'TKIP'
|
|
81
|
-
| 'AES'
|
|
82
|
-
| 'TKIP_AES_MIXED'
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
export type SystemInfoNetworkIpMode = (
|
|
86
|
-
| 'NONE'
|
|
87
|
-
| 'STATIC'
|
|
88
|
-
| 'DYNAMIC'
|
|
89
|
-
| 'AUTO'
|
|
90
|
-
| 'FIXED'
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
export type SystemInfoDeviceOrientationStatus = (
|
|
94
|
-
| 'PORTRAIT_PRIMARY'
|
|
95
|
-
| 'PORTRAIT_SECONDARY'
|
|
96
|
-
| 'LANDSCAPE_PRIMARY'
|
|
97
|
-
| 'LANDSCAPE_SECONDARY'
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
export type SystemInfoSimState = (
|
|
101
|
-
| 'ABSENT'
|
|
102
|
-
| 'INITIALIZING'
|
|
103
|
-
| 'READY'
|
|
104
|
-
| 'PIN_REQUIRED'
|
|
105
|
-
| 'PUK_REQUIRED'
|
|
106
|
-
| 'NETWORK_LOCKED'
|
|
107
|
-
| 'SIM_LOCKED'
|
|
108
|
-
| 'UNKNOWN'
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
export type SystemInfoProfile = 'MOBILE_FULL' | 'MOBILE_WEB' | 'MOBILE' | 'WEARABLE' | 'TV';
|
|
112
|
-
|
|
113
|
-
export type SystemInfoLowMemoryStatus = 'NORMAL' | 'WARNING';
|
|
114
|
-
|
|
115
|
-
export type SystemInfoVideoSourceType = (
|
|
116
|
-
| 'TV'
|
|
117
|
-
| 'AV'
|
|
118
|
-
| 'SVIDEO'
|
|
119
|
-
| 'COMP'
|
|
120
|
-
| 'PC'
|
|
121
|
-
| 'HDMI'
|
|
122
|
-
| 'SCART'
|
|
123
|
-
| 'DVI'
|
|
124
|
-
| 'MEDIA'
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
// MARK: ProductInfo
|
|
128
|
-
|
|
129
|
-
export enum ProductInfoConfigKey {
|
|
130
|
-
CONFIG_KEY_DATA_SERVICE = 0,
|
|
131
|
-
CONFIG_KEY_SERVICE_COUNTRY = 1,
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export enum ProductInfoNoGlass3dSupport {
|
|
135
|
-
NO_GLASS_3D_NOT_SUPPORTED = 0,
|
|
136
|
-
NO_GLASS_3D_SUPPORTED = 1,
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export enum ProductInfoSiServerType {
|
|
140
|
-
SI_TYPE_OPERATIING_SERVER = 0,
|
|
141
|
-
SI_TYPE_DEVELOPMENT_SERVER = 1,
|
|
142
|
-
SI_TYPE_DEVELOPING_SERVER = 2,
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// MARK: Network
|
|
146
|
-
|
|
147
|
-
export enum NetworkActiveConnectionType {
|
|
148
|
-
DISCONNECTED = 0,
|
|
149
|
-
WIFI = 1,
|
|
150
|
-
CELLULAR = 2,
|
|
151
|
-
ETHERNET = 3,
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export enum NetworkIpMode {
|
|
155
|
-
NONE = 0,
|
|
156
|
-
STATIC = 1,
|
|
157
|
-
DYNAMIC = 2,
|
|
158
|
-
AUTO = 3,
|
|
159
|
-
FIXED = 4,
|
|
160
|
-
UNKNOWN = 5,
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export enum NetworkState {
|
|
164
|
-
LAN_CABLE_ATTACHED = 1,
|
|
165
|
-
LAN_CABLE_DETACHED = 2,
|
|
166
|
-
LAN_CABLE_STATE_UNKNOWN = 3,
|
|
167
|
-
GATEWAY_CONNECTED = 4,
|
|
168
|
-
GATEWAY_DISCONNECTED = 5,
|
|
169
|
-
WIFI_MODULE_STATE_ATTACHED = 6,
|
|
170
|
-
WIFI_MODULE_STATE_DETACHED = 7,
|
|
171
|
-
WIFI_MODULE_STATE_UNKNOWN = 8,
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export enum NetworkWiFiSecurityMode {
|
|
175
|
-
WEP = 1,
|
|
176
|
-
WPA_PSK = 2,
|
|
177
|
-
WPA2_PSK = 3,
|
|
178
|
-
EAP = 4,
|
|
179
|
-
NONE = 5,
|
|
180
|
-
UNKNOWN = 6,
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export enum NetworkWiFiEncryptionType {
|
|
184
|
-
WEP = 1,
|
|
185
|
-
TKIP = 2,
|
|
186
|
-
AES = 3,
|
|
187
|
-
TKIP_AES_MIXED = 4,
|
|
188
|
-
NONE = 5,
|
|
189
|
-
UNKNOWN = 6,
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// MARK: AppCommon
|
|
193
|
-
|
|
194
|
-
export enum AppCommonScreenSaverState {
|
|
195
|
-
SCREEN_SAVER_OFF = 0,
|
|
196
|
-
SCREEN_SAVER_ON = 1,
|
|
197
|
-
}
|
|
3
|
+
export const DPI_SUCCESS = '100000';
|
|
@@ -3,7 +3,10 @@ import {
|
|
|
3
3
|
ConnectionType,
|
|
4
4
|
ScreenSaverStatus,
|
|
5
5
|
VolumeRange,
|
|
6
|
+
IAPSuccessPayload,
|
|
7
|
+
IAPPurchaseProductData,
|
|
6
8
|
} from '@24i/bigscreen-sdk/driver-base';
|
|
9
|
+
import { generateUuid } from '@24i/bigscreen-sdk/utils';
|
|
7
10
|
import { NetworkConnectionTypeMap } from './constants';
|
|
8
11
|
import { getPlatformInfo } from './formatUserAgent';
|
|
9
12
|
import { HisenseVidaaApi } from './types';
|
|
@@ -43,7 +46,7 @@ export class DeviceVidaa extends DeviceBase {
|
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
async getManufacturerName(): Promise<string> {
|
|
46
|
-
return '
|
|
49
|
+
return window.Hisense_GetBrand() || '';
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
async getPlatformName(): Promise<string> {
|
|
@@ -56,7 +59,8 @@ export class DeviceVidaa extends DeviceBase {
|
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
async getDeviceName(): Promise<string> {
|
|
59
|
-
|
|
62
|
+
const manufacturerName = await this.getManufacturerName();
|
|
63
|
+
return `${manufacturerName} VIDAA ${await this.getModelName()}`.trim();
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
async getModelName(): Promise<string> {
|
|
@@ -79,6 +83,17 @@ export class DeviceVidaa extends DeviceBase {
|
|
|
79
83
|
return window.Hisense_GetDeviceID() || '';
|
|
80
84
|
}
|
|
81
85
|
|
|
86
|
+
async getAdInfo() {
|
|
87
|
+
const adId = generateUuid();
|
|
88
|
+
const type = 'sessionid';
|
|
89
|
+
const latEnabled = null;
|
|
90
|
+
return { adId, type, latEnabled };
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async getOsLanguage() {
|
|
94
|
+
return (window.navigator.language || '').slice(0, 2);
|
|
95
|
+
}
|
|
96
|
+
|
|
82
97
|
async getVolume(): Promise<number> {
|
|
83
98
|
return VolumeRange.UNSUPPORTED;
|
|
84
99
|
}
|
|
@@ -137,4 +152,16 @@ export class DeviceVidaa extends DeviceBase {
|
|
|
137
152
|
// not supported on Hisense VIDAA platform
|
|
138
153
|
return '';
|
|
139
154
|
}
|
|
155
|
+
|
|
156
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
157
|
+
async purchaseProduct(data: IAPPurchaseProductData): Promise<IAPSuccessPayload> {
|
|
158
|
+
// not supported
|
|
159
|
+
throw new Error('Not supported');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
163
|
+
async cancelSubscription(data: IAPPurchaseProductData): Promise<void> {
|
|
164
|
+
// not supported
|
|
165
|
+
throw new Error('Not supported');
|
|
166
|
+
}
|
|
140
167
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HisenseVidaaApi, HisenseVidaaKeys } from '../types';
|
|
2
2
|
|
|
3
3
|
export const mockHisenseVidaaApi: HisenseVidaaApi = {
|
|
4
|
-
Hisense_GetBrand: () => '
|
|
4
|
+
Hisense_GetBrand: () => 'Hisense',
|
|
5
5
|
Hisense_GetModelName: () => '5U61FQEVS',
|
|
6
6
|
Hisense_GetFirmWareVersion: () => 'V0000.01.00Q.L0301',
|
|
7
7
|
Hisense_Get4KSupportState: () => true,
|
|
@@ -49,6 +49,8 @@ export const getKeyMap = () => {
|
|
|
49
49
|
CHANNEL_UP: { keyCode: window.VK_CHANNEL_UP || 427 },
|
|
50
50
|
CHANNEL_DOWN: { keyCode: window.VK_CHANNEL_DOWN || 428 },
|
|
51
51
|
INFO: { keyCode: window.VK_INFO },
|
|
52
|
+
// VK_SUBTITLE defined on 2019, not on 2021.
|
|
53
|
+
SUBTITLES: { keyCode: window.VK_SUBTITLE || 460 },
|
|
52
54
|
});
|
|
53
55
|
return KeyMap.generateKeyCodeKeyMap();
|
|
54
56
|
};
|
|
@@ -4,6 +4,8 @@ import {
|
|
|
4
4
|
ScreenSaverStatus,
|
|
5
5
|
VolumeRange,
|
|
6
6
|
ExitOptions,
|
|
7
|
+
IAPSuccessPayload,
|
|
8
|
+
IAPPurchaseProductData,
|
|
7
9
|
} from '@24i/bigscreen-sdk/driver-base';
|
|
8
10
|
import { Storage } from '@24i/bigscreen-sdk/storage';
|
|
9
11
|
import { initWebOSTVjs } from './webOSTVjs/webOSTVjs';
|
|
@@ -95,7 +97,15 @@ export class DeviceWebos extends DeviceBase {
|
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
initMouseActiveListener() {
|
|
100
|
+
// checks if mouse is already being used since startup - PRDSAPPSBW-1005
|
|
101
|
+
const mouseActiveAtStartupHandler = () => {
|
|
102
|
+
document.removeEventListener('mousemove', mouseActiveAtStartupHandler);
|
|
103
|
+
this.isMouseActive = true;
|
|
104
|
+
this.triggerEvent('mouseactive', { isMouseActive: true });
|
|
105
|
+
};
|
|
106
|
+
document.addEventListener('mousemove', mouseActiveAtStartupHandler);
|
|
98
107
|
document.addEventListener('cursorStateChange', (event) => {
|
|
108
|
+
document.removeEventListener('mousemove', mouseActiveAtStartupHandler);
|
|
99
109
|
// @ts-ignore - the LG event has this structure.
|
|
100
110
|
this.isMouseActive = event.detail.visibility;
|
|
101
111
|
this.triggerEvent('mouseactive', {
|
|
@@ -237,6 +247,39 @@ export class DeviceWebos extends DeviceBase {
|
|
|
237
247
|
return this.duid!;
|
|
238
248
|
}
|
|
239
249
|
|
|
250
|
+
async getAdInfo() {
|
|
251
|
+
const adId = await this.getLgDeviceId() ?? null;
|
|
252
|
+
const type = 'lgudid';
|
|
253
|
+
const latEnabled = null;
|
|
254
|
+
return { adId, type, latEnabled };
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
async getOsLanguage(): Promise<string> {
|
|
258
|
+
return new Promise<string>((resolve) => {
|
|
259
|
+
webOS.service.request(ApiUrls.SETTINGS_SERVICE, {
|
|
260
|
+
method: 'getSystemSettings',
|
|
261
|
+
parameters: {
|
|
262
|
+
keys: ['localeInfo'],
|
|
263
|
+
},
|
|
264
|
+
onSuccess: (response) => {
|
|
265
|
+
if (response.returnValue) {
|
|
266
|
+
const uiLanguage = response?.settings?.localeInfo?.locales?.UI;
|
|
267
|
+
resolve((uiLanguage || '').slice(0, 2));
|
|
268
|
+
}
|
|
269
|
+
resolve('');
|
|
270
|
+
},
|
|
271
|
+
onFailure: (error) => {
|
|
272
|
+
// ex. returns error for webOS 1.0, 2.0 as not supported
|
|
273
|
+
const { errorCode = '0', errorText } = error || {};
|
|
274
|
+
console.error(
|
|
275
|
+
`[DeviceWebos] getOsLanguage onFailure: [${errorCode}] ${errorText}`,
|
|
276
|
+
);
|
|
277
|
+
resolve('');
|
|
278
|
+
},
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
|
|
240
283
|
async getVolume() {
|
|
241
284
|
// TODO: not yet implemented
|
|
242
285
|
return VolumeRange.UNSUPPORTED;
|
|
@@ -302,4 +345,16 @@ export class DeviceWebos extends DeviceBase {
|
|
|
302
345
|
// Not supported on LG webOS platform (for date 12.4.2021, latest webOS TV 5.x)
|
|
303
346
|
return '';
|
|
304
347
|
}
|
|
348
|
+
|
|
349
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
350
|
+
async purchaseProduct(data: IAPPurchaseProductData): Promise<IAPSuccessPayload> {
|
|
351
|
+
// not supported
|
|
352
|
+
throw new Error('Not supported');
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
356
|
+
async cancelSubscription(data: IAPPurchaseProductData): Promise<void> {
|
|
357
|
+
// not supported
|
|
358
|
+
throw new Error('Not supported');
|
|
359
|
+
}
|
|
305
360
|
}
|
|
@@ -63,6 +63,39 @@ const mockServices = {
|
|
|
63
63
|
callbackName: 'onSuccess',
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
|
+
'luna://com.webos.settingsservice#getSystemSettings': {
|
|
67
|
+
responses: {
|
|
68
|
+
success: {
|
|
69
|
+
returnValue: true,
|
|
70
|
+
method: 'getSystemSettings',
|
|
71
|
+
settings: {
|
|
72
|
+
localeInfo: {
|
|
73
|
+
locales: {
|
|
74
|
+
UI: 'en-GB',
|
|
75
|
+
TV: 'en-GB',
|
|
76
|
+
FMT: 'en-GB',
|
|
77
|
+
NLP: 'en-GB',
|
|
78
|
+
STT: 'fr-FR',
|
|
79
|
+
AUD: 'fr-FR',
|
|
80
|
+
AUD2: 'en-GB',
|
|
81
|
+
},
|
|
82
|
+
clock: 'locale',
|
|
83
|
+
keyboards: ['en'],
|
|
84
|
+
timezone: '',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
error: {
|
|
89
|
+
returnValue: false,
|
|
90
|
+
errorCode: 'ERR.001',
|
|
91
|
+
errorText: 'There is no matched result from DB',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
selected: {
|
|
95
|
+
responseId: 'success',
|
|
96
|
+
callbackName: 'onSuccess',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
66
99
|
'luna://com.webos.service.connectionmanager#getStatus': {
|
|
67
100
|
responses: {
|
|
68
101
|
successWired: {
|
|
@@ -17,4 +17,5 @@ export const ApiUrls = {
|
|
|
17
17
|
CONNECTION_MANAGER_WEBOS: 'luna://com.webos.service.connectionmanager',
|
|
18
18
|
SYSTEM_PROPERTY: 'luna://com.webos.service.tv.systemproperty',
|
|
19
19
|
SM: 'luna://com.webos.service.sm',
|
|
20
|
+
SETTINGS_SERVICE: 'luna://com.webos.settingsservice',
|
|
20
21
|
} as const;
|
|
@@ -2,8 +2,9 @@ import { generateKeyCodeKeyMap, overrideValues } from '@24i/bigscreen-sdk/driver
|
|
|
2
2
|
|
|
3
3
|
export const getKeyMap = () => {
|
|
4
4
|
overrideValues({
|
|
5
|
-
BACK: { keyCode: 461 },
|
|
5
|
+
BACK: { keyCode: 461, key: 'RCUBack' },
|
|
6
6
|
TXT: { keyCode: 110 },
|
|
7
|
+
SUBTITLES: { keyCode: 460 },
|
|
7
8
|
});
|
|
8
9
|
return generateKeyCodeKeyMap();
|
|
9
10
|
};
|
|
@@ -331,11 +331,41 @@ export type DuidOptions = {
|
|
|
331
331
|
onComplete?: (response: NegativeResponse | DuidResponse) => any,
|
|
332
332
|
};
|
|
333
333
|
|
|
334
|
+
type SettingsService = {
|
|
335
|
+
method: 'getSystemSettings',
|
|
336
|
+
settings: {
|
|
337
|
+
localeInfo: {
|
|
338
|
+
locales: {
|
|
339
|
+
UI: string,
|
|
340
|
+
TV: string,
|
|
341
|
+
FMT: string,
|
|
342
|
+
NLP: string,
|
|
343
|
+
STT: string,
|
|
344
|
+
AUD: string,
|
|
345
|
+
AUD2: string,
|
|
346
|
+
},
|
|
347
|
+
clock: string,
|
|
348
|
+
keyboards: string[],
|
|
349
|
+
timezone: string,
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
export type SettingsServiceResponse = PositiveResponse & SettingsService;
|
|
354
|
+
export type SettingsServiceOptions = {
|
|
355
|
+
method: 'getSystemSettings',
|
|
356
|
+
parameters: {
|
|
357
|
+
keys: ['localeInfo'],
|
|
358
|
+
},
|
|
359
|
+
onSuccess?: (response: NegativeResponse | SettingsServiceResponse) => any,
|
|
360
|
+
onFailure?: (response: NegativeResponse) => any,
|
|
361
|
+
};
|
|
362
|
+
|
|
334
363
|
interface RequestTypeMap {
|
|
335
364
|
[ApiUrls.CONNECTION_MANAGER_PALM]: ConnectionManagerOptions,
|
|
336
365
|
[ApiUrls.CONNECTION_MANAGER_WEBOS]: ConnectionManagerOptions,
|
|
337
366
|
[ApiUrls.SYSTEM_PROPERTY]: SystemPropertyOptions,
|
|
338
367
|
[ApiUrls.SM]: DuidOptions,
|
|
368
|
+
[ApiUrls.SETTINGS_SERVICE]: SettingsServiceOptions,
|
|
339
369
|
}
|
|
340
370
|
|
|
341
371
|
// MARK: IPalmSystem
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
DeviceBase,
|
|
3
|
+
IAPPurchaseProductData,
|
|
4
|
+
IAPSuccessPayload,
|
|
5
|
+
ScreenSaverStatus,
|
|
6
|
+
VolumeRange,
|
|
7
|
+
} from '@24i/bigscreen-sdk/driver-base';
|
|
2
8
|
import { runAsync } from '@24i/bigscreen-sdk/utils/timers';
|
|
3
9
|
import { generateUuid } from '@24i/bigscreen-sdk/utils/generateUuid';
|
|
4
10
|
import { find } from '@24i/bigscreen-sdk/perf-utils/array';
|
|
@@ -152,6 +158,17 @@ export class DeviceXbox extends DeviceBase {
|
|
|
152
158
|
return uuid;
|
|
153
159
|
}
|
|
154
160
|
|
|
161
|
+
async getAdInfo() {
|
|
162
|
+
const adId = generateUuid();
|
|
163
|
+
const type = 'sessionid';
|
|
164
|
+
const latEnabled = null;
|
|
165
|
+
return { adId, type, latEnabled };
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
async getOsLanguage() {
|
|
169
|
+
return (window.navigator.language || '').slice(0, 2);
|
|
170
|
+
}
|
|
171
|
+
|
|
155
172
|
async getVolume() {
|
|
156
173
|
return VolumeRange.UNSUPPORTED;
|
|
157
174
|
}
|
|
@@ -228,4 +245,16 @@ export class DeviceXbox extends DeviceBase {
|
|
|
228
245
|
getDeviceClass(): string {
|
|
229
246
|
return 'xbox';
|
|
230
247
|
}
|
|
248
|
+
|
|
249
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
250
|
+
async purchaseProduct(data: IAPPurchaseProductData): Promise<IAPSuccessPayload> {
|
|
251
|
+
// not supported
|
|
252
|
+
throw new Error('Not supported');
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
256
|
+
async cancelSubscription(data: IAPPurchaseProductData): Promise<void> {
|
|
257
|
+
// not supported
|
|
258
|
+
throw new Error('Not supported');
|
|
259
|
+
}
|
|
231
260
|
}
|
package/packages/epg/README.md
CHANGED
|
@@ -18,6 +18,7 @@ This package contains a prepared Electronic Program Guide component.
|
|
|
18
18
|
- `channelHeaderWidthPx` - the width of the channel headers (the part before programs in a row) in pixels
|
|
19
19
|
- `channelData` - the array of channels of a type that extends `EpgChannel` from the data layer
|
|
20
20
|
- `fetchPrograms` - the function to fetch more programs for a channel in a given time range
|
|
21
|
+
- `smallestAllowedCellPx` - optional - cells with width less than this are marked with `.too-small` class (defaults to `0`)
|
|
21
22
|
- `timelineWidthMs` - optional - the width of the timeline (the part where the programs are) in milliseconds (defaults to `90 minutes`)
|
|
22
23
|
- `scrollStepMs` - optional - the amount of movement step left/right in milliseconds (defaults to `0.5 hours`)
|
|
23
24
|
- `idleTimerMs` - optional - the amount of ms without user input after which epg jumps to the current time (defaults to `scrollStepMs`)
|
|
@@ -80,10 +81,11 @@ then the initial time of EPG will be `13:30` (if not set otherwise)
|
|
|
80
81
|
- `endTime` is always taken as excluded = not the part of the program
|
|
81
82
|
- so the program that gets focused/marked as live / etc. is the one that is just starting
|
|
82
83
|
- when the Program displayed by the cell is currently live, the cell has an `.live` class
|
|
83
|
-
- the Cell has also these following classes based on its width
|
|
84
|
+
- the Cell has also these following classes based on its width, breakpoints defined by `programTextModeResolver` and `smallestAllowedCellPx`
|
|
84
85
|
- `.with-text` - this cell should display full or ellipsis truncated text
|
|
85
86
|
- `.ellipsis-only` - this cell should display only ellipsis. You can use this class to center the text.
|
|
86
87
|
- `.no-text` - this cell is so small that it should be empty
|
|
88
|
+
- `.too-small` - this cell is too small to render the usual way, as in its only several pixels wide, less than the needed margin/border etc.
|
|
87
89
|
- the element of the currently focused row has an `.active` class
|
|
88
90
|
|
|
89
91
|
## Styles
|
|
@@ -17,6 +17,7 @@ const LIVE_CLASS = 'live';
|
|
|
17
17
|
const NO_TEXT_CLASS = 'no-text';
|
|
18
18
|
const ELLIPSIS_ONLY_CLASS = 'ellipsis-only';
|
|
19
19
|
const WITH_TEXT_CLASS = 'with-text';
|
|
20
|
+
const TOO_SMALL_CLASS = 'too-small';
|
|
20
21
|
|
|
21
22
|
const getClassByTextMode = (textMode: ProgramTextMode) => {
|
|
22
23
|
switch (textMode) {
|
|
@@ -40,6 +41,8 @@ export class Cell<
|
|
|
40
41
|
|
|
41
42
|
widthPx = this.props.widthPx;
|
|
42
43
|
|
|
44
|
+
smallestAllowedCellPx = this.props.smallestAllowedCellPx;
|
|
45
|
+
|
|
43
46
|
xOffsetPx = this.props.xOffsetPx;
|
|
44
47
|
|
|
45
48
|
textMode = this.props.programTextModeResolver(this.widthPx);
|
|
@@ -137,6 +140,14 @@ export class Cell<
|
|
|
137
140
|
this.textMode = textMode;
|
|
138
141
|
}
|
|
139
142
|
|
|
143
|
+
private setTooSmallClass() {
|
|
144
|
+
if (this.widthPx < this.smallestAllowedCellPx) {
|
|
145
|
+
addClass(this.div, TOO_SMALL_CLASS);
|
|
146
|
+
} else {
|
|
147
|
+
removeClass(this.div, TOO_SMALL_CLASS);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
140
151
|
focus(options?: FocusOptions) {
|
|
141
152
|
if (!this.wasFocusedWithCurrentItem && document.activeElement === this.div.current) {
|
|
142
153
|
this.onFocusChange();
|
|
@@ -169,6 +180,7 @@ export class Cell<
|
|
|
169
180
|
this.item = item;
|
|
170
181
|
this.setLiveClass();
|
|
171
182
|
this.setTextModeClass(textMode);
|
|
183
|
+
this.setTooSmallClass();
|
|
172
184
|
this.programComponent.current!.updateData(
|
|
173
185
|
this.item!,
|
|
174
186
|
textMode,
|
|
@@ -179,13 +191,15 @@ export class Cell<
|
|
|
179
191
|
|
|
180
192
|
render() {
|
|
181
193
|
const {
|
|
182
|
-
isLoading, xOffsetPx, widthPx,
|
|
194
|
+
isLoading, xOffsetPx, widthPx, smallestAllowedCellPx,
|
|
195
|
+
item, programTextModeResolver, renderProgram,
|
|
183
196
|
} = this.props;
|
|
184
197
|
const textMode = programTextModeResolver(widthPx);
|
|
198
|
+
const tooSmall = widthPx < smallestAllowedCellPx ? TOO_SMALL_CLASS : '';
|
|
185
199
|
return (
|
|
186
200
|
<Interactable
|
|
187
201
|
ref={this.div}
|
|
188
|
-
className={`epg-cell ${getClassByTextMode(textMode)}`}
|
|
202
|
+
className={`epg-cell ${getClassByTextMode(textMode)} ${tooSmall}`}
|
|
189
203
|
style={{
|
|
190
204
|
width: `${widthPx}px`,
|
|
191
205
|
...getXOffsetStyleObject(xOffsetPx),
|