@24i/bigscreen-sdk 1.0.54-alpha.2836 → 2.1.1-alpha.2133
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 +3 -2
- package/package.json +34 -53
- package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +9 -9
- package/packages/async-image/src/AsyncImage.tsx +10 -15
- package/packages/developer-tools/PlayerDebugWindow/README.md +1 -1
- package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +0 -11
- package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +5 -5
- package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +0 -15
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +1 -2
- package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +5 -57
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +0 -12
- package/packages/developer-tools/src/TechnicalInfo/translations.ts +0 -8
- package/packages/device/src/getKeyDigit.ts +2 -2
- package/packages/device/src/resolver/resolver.ts +5 -18
- package/packages/digital-clock/src/DigitalClock.tsx +4 -15
- package/packages/driver-androidtv/src/DeviceAndroidTV.ts +9 -92
- package/packages/driver-androidtv/src/__mocks__/javaScriptBridge.ts +5 -38
- package/packages/driver-androidtv/src/index.ts +0 -1
- package/packages/driver-androidtv/src/keymap.ts +0 -18
- package/packages/driver-androidtv/src/types.ts +16 -144
- package/packages/driver-base/src/DeviceBase.ts +2 -80
- package/packages/driver-base/src/KeyMap/Key.ts +1 -8
- package/packages/driver-base/src/KeyMap/KeyMap.ts +0 -4
- package/packages/driver-base/src/KeyMap/interface.ts +0 -1
- package/packages/driver-base/src/KeyMap/overrideValues.ts +1 -2
- package/packages/driver-base/src/__mocks__/DeviceBase.ts +0 -24
- package/packages/driver-base/src/__mocks__/keyMap.ts +0 -1
- package/packages/driver-base/src/index.ts +0 -3
- package/packages/driver-base/src/types/DeviceEvent.ts +0 -2
- package/packages/driver-base/src/types/KeycodeKeyMap.ts +0 -1
- package/packages/driver-browser/src/DeviceBrowser.ts +0 -26
- package/packages/driver-browser/src/keymap.ts +0 -8
- package/packages/driver-entone/src/DeviceEntone.ts +1 -31
- package/packages/driver-entone/src/keymap.ts +0 -1
- package/packages/driver-hbbtv/src/DeviceHbbTV.ts +0 -26
- package/packages/driver-kreatv/src/DeviceKreaTV.ts +0 -26
- package/packages/driver-saphi/src/DeviceSaphi.ts +0 -26
- package/packages/driver-tizen/src/DeviceTizen.ts +7 -126
- package/packages/driver-tizen/src/ITizen.ts +202 -15116
- package/packages/driver-tizen/src/IWebapis.ts +87 -8643
- package/packages/driver-tizen/src/TizenKeys.ts +2 -4
- package/packages/driver-tizen/src/__mocks__/tizen.ts +8 -7
- package/packages/driver-tizen/src/constants.ts +195 -1
- package/packages/driver-tizen/src/types.ts +14 -0
- package/packages/driver-vidaa/src/DeviceVidaa.ts +2 -29
- package/packages/driver-vidaa/src/__mocks__/vidaa.ts +1 -1
- package/packages/driver-vidaa/src/keymap.ts +0 -2
- package/packages/driver-webos/src/DeviceWebos.ts +0 -55
- package/packages/driver-webos/src/__mocks__/webos.ts +0 -33
- package/packages/driver-webos/src/constants.ts +0 -1
- package/packages/driver-webos/src/keymap.ts +1 -2
- package/packages/driver-webos/src/types.ts +0 -30
- package/packages/driver-xbox/src/DeviceXbox.ts +1 -30
- package/packages/driver-xbox/src/keymap.ts +1 -1
- package/packages/epg/README.md +1 -3
- package/packages/epg/src/v2/Cell.tsx +2 -16
- package/packages/epg/src/v2/DataManager.ts +41 -112
- package/packages/epg/src/v2/DatePicker.tsx +3 -9
- package/packages/epg/src/v2/DateToast/DateToast.tsx +9 -12
- package/packages/epg/src/v2/Day.tsx +3 -6
- package/packages/epg/src/v2/Epg.tsx +5 -5
- package/packages/epg/src/v2/MockGenerator/generator.ts +2 -3
- package/packages/epg/src/v2/ProgramInfo/utils.ts +3 -4
- package/packages/epg/src/v2/Row.tsx +1 -3
- package/packages/epg/src/v2/TimelineSection.tsx +1 -4
- package/packages/epg/src/v2/basic/CellsManager.tsx +2 -7
- package/packages/epg/src/v2/basic/RowsManager.tsx +1 -3
- package/packages/epg/src/v2/interface.ts +0 -13
- package/packages/events-manager/src/EventsManager.ts +56 -1
- package/packages/focus/README.md +0 -33
- package/packages/focus/src/IFocusable.ts +0 -1
- package/packages/focus/src/Layout/Base.tsx +6 -41
- package/packages/focus/src/Layout/Matrix.tsx +19 -51
- package/packages/focus/src/Layout/__test__/Base.spec.ts +180 -0
- package/packages/focus/src/Layout/__test__/Horizontal.spec.ts +94 -0
- package/packages/focus/src/Layout/__test__/Matrix.spec.ts +261 -0
- package/packages/focus/src/Layout/__test__/Vertical.spec.ts +46 -0
- package/packages/focus/src/Layout/__test__/isRtl.spec.ts +23 -0
- package/packages/focus/src/Layout/__test__/shared.ts +19 -0
- package/packages/focus/src/focusFirstExisting.ts +1 -7
- package/packages/focus/src/index.ts +1 -2
- package/packages/gallup/src/Gallup.ts +3 -3
- package/packages/grid/src/Base/Base.tsx +10 -15
- package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +2 -4
- package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +6 -6
- package/packages/icon/src/Icon.tsx +5 -27
- package/packages/input/README.md +1 -1
- package/packages/input/src/Input.tsx +10 -16
- package/packages/interactable/README.md +1 -2
- package/packages/interactable/src/Interactable.tsx +3 -9
- package/packages/interactable/src/interface.ts +0 -1
- package/packages/jsx/src/index.ts +1 -1
- package/packages/jsx/src/test-utils/index.ts +0 -1
- package/packages/keyboard/src/Backdrop/Backdrop.scss +0 -2
- package/packages/keyboard/src/KeyboardBase.tsx +4 -16
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +0 -4
- package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +20 -28
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +0 -1
- package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +0 -1
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/index.ts +0 -12
- package/packages/keyboard/src/WhitelabelKeyboard/types.ts +0 -1
- package/packages/keyboard/src/utils/caret.ts +8 -5
- package/packages/keyboard/src/utils/input.ts +6 -5
- package/packages/l10n/README.md +0 -18
- package/packages/l10n/src/date/common.ts +6 -18
- package/packages/l10n/src/date/cs.ts +8 -2
- package/packages/l10n/src/date/en-001.ts +3 -3
- package/packages/l10n/src/date/en-common.ts +4 -5
- package/packages/l10n/src/date/en-us.ts +3 -3
- package/packages/l10n/src/date/iso.ts +13 -12
- package/packages/l10n/src/date/types.ts +0 -9
- package/packages/l10n/src/l10n.ts +3 -61
- package/packages/list/src/Base/Base.tsx +9 -19
- 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 +1 -0
- 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 +2 -6
- package/packages/list/src/interface.ts +2 -2
- package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +1 -7
- package/packages/logger/src/loggers/SentryLogger/Sentry.ts +0 -1
- package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +3 -5
- package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +3 -31
- package/packages/menu/src/MenuAndContentContainer/interface.ts +0 -8
- package/packages/modal-service/README.md +1 -4
- package/packages/modal-service/src/ModalService.tsx +5 -29
- package/packages/perf-utils/README.md +120 -1
- package/packages/perf-utils/src/array/filter.ts +54 -1
- package/packages/perf-utils/src/array/find.ts +43 -1
- package/packages/perf-utils/src/array/findIndex.ts +43 -1
- package/packages/perf-utils/src/array/forEach.ts +48 -1
- package/packages/perf-utils/src/array/includes.ts +41 -1
- package/packages/perf-utils/src/array/includesNaN.ts +32 -1
- package/packages/perf-utils/src/array/index.ts +7 -1
- package/packages/perf-utils/src/array/map.ts +52 -1
- 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 +0 -8
- package/packages/player-ui/src/PlayerInteractable.tsx +0 -1
- package/packages/player-ui/src/PlayerTime.tsx +1 -3
- package/packages/player-ui/src/PlayerUI.tsx +35 -68
- package/packages/player-ui/src/RemainingTime.tsx +2 -2
- package/packages/player-ui/src/Seekbar.tsx +18 -110
- package/packages/player-ui/src/Seeking.ts +16 -57
- package/packages/player-ui/src/Subtitles.tsx +2 -2
- package/packages/player-ui/src/index.ts +0 -1
- package/packages/player-ui/src/mocks.ts +8 -32
- package/packages/player-ui/src/timeUtils.ts +3 -3
- package/packages/player-ui/src/types.ts +3 -9
- package/packages/router/README.md +0 -1
- package/packages/router/src/Route.tsx +27 -61
- package/packages/router/src/Router.tsx +14 -63
- package/packages/router/src/history.ts +1 -8
- package/packages/router/src/index.ts +1 -1
- package/packages/router/src/utils.ts +4 -9
- package/packages/sass-utils/src/linear-gradient.scss +4 -9
- package/packages/sass-utils/src/scale.1080.scss +1 -3
- package/packages/sass-utils/src/scale.720.scss +1 -1
- package/packages/time/README.md +1 -4
- package/packages/time/src/Time.ts +13 -35
- package/packages/time/src/constants.ts +0 -1
- package/packages/toast/src/ToastService.tsx +5 -16
- package/packages/types-bigscreen-jsx/README.md +4 -5
- package/packages/types-bigscreen-jsx/index.d.ts +67 -72
- package/packages/utils/README.md +0 -27
- package/packages/utils/src/elementUtils.ts +0 -25
- package/packages/utils/src/index.ts +0 -8
- package/packages/utils/src/scaledImage.ts +3 -6
- package/packages/utils/src/textUtils.ts +14 -46
- package/packages/utils/src/wait.ts +1 -3
- package/packages/utils/src/xhr/xhrSend.ts +1 -3
- package/packages/utils/src/xhr/xhrSendRetry.ts +1 -3
- package/packages/zapping/src/ChannelZapping.ts +0 -9
- package/packages/zapping/src/Zapping.tsx +0 -10
- package/ci/is_ci_job_skippable.sh +0 -153
- package/packages/analytics/README.md +0 -8
- package/packages/analytics/src/A.ts +0 -1
- package/packages/analytics/src/Analytics.ts +0 -1
- package/packages/analytics/src/analyticsOnScroll.ts +0 -1
- package/packages/analytics/src/clients/ConsoleAnalytics/ConsoleAnalytics.ts +0 -1
- package/packages/analytics/src/clients/ConsoleAnalytics/index.ts +0 -1
- package/packages/analytics/src/clients/GoogleAnalytics/GoogleAnalytics.ts +0 -196
- package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +0 -126
- package/packages/analytics/src/clients/GoogleAnalytics/getUrl.ts +0 -17
- package/packages/analytics/src/clients/GoogleAnalytics/index.ts +0 -2
- package/packages/analytics/src/clients/GoogleAnalytics/interface.ts +0 -82
- package/packages/analytics/src/clients/GoogleAnalytics/mapPayload.ts +0 -51
- package/packages/analytics/src/clients/GoogleAnalytics/prepareBody.ts +0 -14
- package/packages/analytics/src/clients/TealiumAnalytics/TealiumAnalytics.ts +0 -181
- package/packages/analytics/src/clients/TealiumAnalytics/constants.ts +0 -106
- package/packages/analytics/src/clients/TealiumAnalytics/findForLanguage.ts +0 -9
- package/packages/analytics/src/clients/TealiumAnalytics/index.ts +0 -4
- package/packages/analytics/src/clients/TealiumAnalytics/interface.ts +0 -35
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/__mocks__/mediaPayload.ts +0 -72
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/helper.ts +0 -36
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppError.ts +0 -13
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppOpen.ts +0 -13
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteAdd.ts +0 -11
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteRemove.ts +0 -11
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerClose.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerOpen.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSceneView.ts +0 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearch.ts +0 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchFailed.ts +0 -8
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchSuccess.ts +0 -8
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoPause.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoProgress.ts +0 -18
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoResume.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStart.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStop.ts +0 -15
- package/packages/analytics/src/clients/TealiumAnalytics/types.ts +0 -161
- package/packages/analytics/src/clients/TwentyFourIQ/TwentyFourIQClient.ts +0 -107
- package/packages/analytics/src/clients/TwentyFourIQ/constants.ts +0 -111
- package/packages/analytics/src/clients/TwentyFourIQ/helper.ts +0 -34
- package/packages/analytics/src/clients/TwentyFourIQ/index.ts +0 -2
- package/packages/analytics/src/clients/TwentyFourIQ/interface.ts +0 -34
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdEvent.ts +0 -20
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBase.ts +0 -24
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBuffering.ts +0 -15
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerClose.ts +0 -25
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerOpen.ts +0 -17
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapSceneView.ts +0 -15
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapScroll.ts +0 -17
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoComplete.ts +0 -22
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoPause.ts +0 -25
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoProgress.ts +0 -25
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStart.ts +0 -34
- package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStop.ts +0 -32
- package/packages/analytics/src/clients/TwentyFourIQ/types.ts +0 -132
- package/packages/analytics/src/constants.ts +0 -1
- package/packages/analytics/src/index.ts +0 -3
- package/packages/analytics/src/interface.ts +0 -1
- package/packages/analytics/src/utils/generateSessionId.ts +0 -8
- package/packages/device/src/driver/index.firetv.ts +0 -1
- package/packages/device/src/driver/index.smartcast.tv.ts +0 -1
- package/packages/driver-base/src/types/AdInfo.ts +0 -5
- package/packages/driver-base/src/types/InAppPurchase.ts +0 -25
- package/packages/driver-firetv/src/DeviceFireTV.ts +0 -91
- package/packages/driver-firetv/src/__mocks__/javaScriptBridge.ts +0 -45
- package/packages/driver-firetv/src/index.ts +0 -1
- package/packages/driver-firetv/src/types.ts +0 -1
- package/packages/driver-smartcast/src/DeviceSmartCast.ts +0 -394
- package/packages/driver-smartcast/src/__mocks__/api.ts +0 -79
- package/packages/driver-smartcast/src/index.ts +0 -1
- package/packages/driver-smartcast/src/keymap.ts +0 -9
- package/packages/driver-smartcast/src/types.ts +0 -111
- package/packages/focus/src/hasFocus.ts +0 -36
- package/packages/jsx/src/test-utils/keyup.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/arabic.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/burmese.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/dari.ts +0 -28
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/korean.ts +0 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/pashto.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/persian.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/russian.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/spanish.ts +0 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/tibetan.ts +0 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/turkish.ts +0 -26
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/ukrainian.ts +0 -27
- package/packages/keyboard/src/WhitelabelKeyboard/layouts/urdu.ts +0 -26
- package/packages/keyboard/src/utils/setInputSelectionRange.ts +0 -10
- package/packages/l10n/src/date/de.ts +0 -97
- package/packages/l10n/src/date/es.ts +0 -71
- package/packages/l10n/src/date/fr.ts +0 -94
- package/packages/l10n/src/date/he.ts +0 -101
- package/packages/time/src/adapters/24iMediaTimeApi.ts +0 -47
- package/packages/time/src/services/24iMediaTimeApi/24iMediaTimeApi.ts +0 -43
- package/packages/time/src/services/24iMediaTimeApi/index.ts +0 -6
- package/packages/utils/src/forceReflow.ts +0 -14
- package/packages/utils/src/keyPress/index.ts +0 -6
- package/packages/utils/src/keyPress/keyPressSimulator.ts +0 -74
- package/packages/utils/src/keyPress/simulateKeyPress.ts +0 -25
- package/utils/release/release.ts +0 -156
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KeyMap, KeycodeKeyMap } from '@24i/bigscreen-sdk/driver-base';
|
|
2
|
-
import {
|
|
2
|
+
import { ITizen } from './types';
|
|
3
3
|
|
|
4
|
-
declare const tizen:
|
|
4
|
+
declare const tizen: ITizen;
|
|
5
5
|
|
|
6
6
|
type KeyCodeMap = { [key: string]: number };
|
|
7
7
|
|
|
@@ -49,7 +49,6 @@ 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');
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
buildKeyMap(keyCodeMap: KeyCodeMap) {
|
|
@@ -85,7 +84,6 @@ export class TizenKeys {
|
|
|
85
84
|
EXIT: { keyCode: keyCodeMap.Exit },
|
|
86
85
|
INFO: { keyCode: keyCodeMap.Info },
|
|
87
86
|
GUIDE: { keyCode: keyCodeMap.Guide },
|
|
88
|
-
SUBTITLES: { keyCode: keyCodeMap.Caption },
|
|
89
87
|
});
|
|
90
88
|
this.keyMap = KeyMap.generateKeyCodeKeyMap();
|
|
91
89
|
}
|
|
@@ -8,10 +8,6 @@ export const webapis = {
|
|
|
8
8
|
getModelCode: () => 'model code',
|
|
9
9
|
getFirmware: () => 'firmware',
|
|
10
10
|
},
|
|
11
|
-
adinfo: {
|
|
12
|
-
getTIFA: () => 'adid',
|
|
13
|
-
isLATEnabled: () => true,
|
|
14
|
-
},
|
|
15
11
|
};
|
|
16
12
|
|
|
17
13
|
export const application = {
|
|
@@ -28,7 +24,12 @@ export const tizen = {
|
|
|
28
24
|
unregisterKey: () => {},
|
|
29
25
|
registerKey: () => {},
|
|
30
26
|
},
|
|
31
|
-
systeminfo: {
|
|
32
|
-
getPropertyValue: async () => {},
|
|
33
|
-
},
|
|
34
27
|
};
|
|
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,3 +1,197 @@
|
|
|
1
|
+
/* eslint-disable no-magic-numbers */
|
|
2
|
+
|
|
1
3
|
export const VENDOR = 'Samsung Tizen';
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
// MARK: TVAudioControl
|
|
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,10 +3,7 @@ import {
|
|
|
3
3
|
ConnectionType,
|
|
4
4
|
ScreenSaverStatus,
|
|
5
5
|
VolumeRange,
|
|
6
|
-
IAPSuccessPayload,
|
|
7
|
-
IAPPurchaseProductData,
|
|
8
6
|
} from '@24i/bigscreen-sdk/driver-base';
|
|
9
|
-
import { generateUuid } from '@24i/bigscreen-sdk/utils';
|
|
10
7
|
import { NetworkConnectionTypeMap } from './constants';
|
|
11
8
|
import { getPlatformInfo } from './formatUserAgent';
|
|
12
9
|
import { HisenseVidaaApi } from './types';
|
|
@@ -46,7 +43,7 @@ export class DeviceVidaa extends DeviceBase {
|
|
|
46
43
|
}
|
|
47
44
|
|
|
48
45
|
async getManufacturerName(): Promise<string> {
|
|
49
|
-
return
|
|
46
|
+
return 'Hisense';
|
|
50
47
|
}
|
|
51
48
|
|
|
52
49
|
async getPlatformName(): Promise<string> {
|
|
@@ -59,8 +56,7 @@ export class DeviceVidaa extends DeviceBase {
|
|
|
59
56
|
}
|
|
60
57
|
|
|
61
58
|
async getDeviceName(): Promise<string> {
|
|
62
|
-
|
|
63
|
-
return `${manufacturerName} VIDAA ${await this.getModelName()}`.trim();
|
|
59
|
+
return `Hisense VIDAA ${await this.getModelName()}`.trim();
|
|
64
60
|
}
|
|
65
61
|
|
|
66
62
|
async getModelName(): Promise<string> {
|
|
@@ -83,17 +79,6 @@ export class DeviceVidaa extends DeviceBase {
|
|
|
83
79
|
return window.Hisense_GetDeviceID() || '';
|
|
84
80
|
}
|
|
85
81
|
|
|
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
|
-
|
|
97
82
|
async getVolume(): Promise<number> {
|
|
98
83
|
return VolumeRange.UNSUPPORTED;
|
|
99
84
|
}
|
|
@@ -152,16 +137,4 @@ export class DeviceVidaa extends DeviceBase {
|
|
|
152
137
|
// not supported on Hisense VIDAA platform
|
|
153
138
|
return '';
|
|
154
139
|
}
|
|
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
|
-
}
|
|
167
140
|
}
|
|
@@ -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,8 +49,6 @@ 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 },
|
|
54
52
|
});
|
|
55
53
|
return KeyMap.generateKeyCodeKeyMap();
|
|
56
54
|
};
|
|
@@ -4,8 +4,6 @@ import {
|
|
|
4
4
|
ScreenSaverStatus,
|
|
5
5
|
VolumeRange,
|
|
6
6
|
ExitOptions,
|
|
7
|
-
IAPSuccessPayload,
|
|
8
|
-
IAPPurchaseProductData,
|
|
9
7
|
} from '@24i/bigscreen-sdk/driver-base';
|
|
10
8
|
import { Storage } from '@24i/bigscreen-sdk/storage';
|
|
11
9
|
import { initWebOSTVjs } from './webOSTVjs/webOSTVjs';
|
|
@@ -97,15 +95,7 @@ export class DeviceWebos extends DeviceBase {
|
|
|
97
95
|
}
|
|
98
96
|
|
|
99
97
|
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);
|
|
107
98
|
document.addEventListener('cursorStateChange', (event) => {
|
|
108
|
-
document.removeEventListener('mousemove', mouseActiveAtStartupHandler);
|
|
109
99
|
// @ts-ignore - the LG event has this structure.
|
|
110
100
|
this.isMouseActive = event.detail.visibility;
|
|
111
101
|
this.triggerEvent('mouseactive', {
|
|
@@ -247,39 +237,6 @@ export class DeviceWebos extends DeviceBase {
|
|
|
247
237
|
return this.duid!;
|
|
248
238
|
}
|
|
249
239
|
|
|
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
|
-
|
|
283
240
|
async getVolume() {
|
|
284
241
|
// TODO: not yet implemented
|
|
285
242
|
return VolumeRange.UNSUPPORTED;
|
|
@@ -345,16 +302,4 @@ export class DeviceWebos extends DeviceBase {
|
|
|
345
302
|
// Not supported on LG webOS platform (for date 12.4.2021, latest webOS TV 5.x)
|
|
346
303
|
return '';
|
|
347
304
|
}
|
|
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
|
-
}
|
|
360
305
|
}
|
|
@@ -63,39 +63,6 @@ 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
|
-
},
|
|
99
66
|
'luna://com.webos.service.connectionmanager#getStatus': {
|
|
100
67
|
responses: {
|
|
101
68
|
successWired: {
|
|
@@ -17,5 +17,4 @@ 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',
|
|
21
20
|
} as const;
|
|
@@ -2,9 +2,8 @@ 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 },
|
|
6
6
|
TXT: { keyCode: 110 },
|
|
7
|
-
SUBTITLES: { keyCode: 460 },
|
|
8
7
|
});
|
|
9
8
|
return generateKeyCodeKeyMap();
|
|
10
9
|
};
|
|
@@ -331,41 +331,11 @@ 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
|
-
|
|
363
334
|
interface RequestTypeMap {
|
|
364
335
|
[ApiUrls.CONNECTION_MANAGER_PALM]: ConnectionManagerOptions,
|
|
365
336
|
[ApiUrls.CONNECTION_MANAGER_WEBOS]: ConnectionManagerOptions,
|
|
366
337
|
[ApiUrls.SYSTEM_PROPERTY]: SystemPropertyOptions,
|
|
367
338
|
[ApiUrls.SM]: DuidOptions,
|
|
368
|
-
[ApiUrls.SETTINGS_SERVICE]: SettingsServiceOptions,
|
|
369
339
|
}
|
|
370
340
|
|
|
371
341
|
// MARK: IPalmSystem
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DeviceBase,
|
|
3
|
-
IAPPurchaseProductData,
|
|
4
|
-
IAPSuccessPayload,
|
|
5
|
-
ScreenSaverStatus,
|
|
6
|
-
VolumeRange,
|
|
7
|
-
} from '@24i/bigscreen-sdk/driver-base';
|
|
1
|
+
import { DeviceBase, ScreenSaverStatus, VolumeRange } from '@24i/bigscreen-sdk/driver-base';
|
|
8
2
|
import { runAsync } from '@24i/bigscreen-sdk/utils/timers';
|
|
9
3
|
import { generateUuid } from '@24i/bigscreen-sdk/utils/generateUuid';
|
|
10
4
|
import { find } from '@24i/bigscreen-sdk/perf-utils/array';
|
|
@@ -158,17 +152,6 @@ export class DeviceXbox extends DeviceBase {
|
|
|
158
152
|
return uuid;
|
|
159
153
|
}
|
|
160
154
|
|
|
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
|
-
|
|
172
155
|
async getVolume() {
|
|
173
156
|
return VolumeRange.UNSUPPORTED;
|
|
174
157
|
}
|
|
@@ -245,16 +228,4 @@ export class DeviceXbox extends DeviceBase {
|
|
|
245
228
|
getDeviceClass(): string {
|
|
246
229
|
return 'xbox';
|
|
247
230
|
}
|
|
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
|
-
}
|
|
260
231
|
}
|
package/packages/epg/README.md
CHANGED
|
@@ -18,7 +18,6 @@ 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`)
|
|
22
21
|
- `timelineWidthMs` - optional - the width of the timeline (the part where the programs are) in milliseconds (defaults to `90 minutes`)
|
|
23
22
|
- `scrollStepMs` - optional - the amount of movement step left/right in milliseconds (defaults to `0.5 hours`)
|
|
24
23
|
- `idleTimerMs` - optional - the amount of ms without user input after which epg jumps to the current time (defaults to `scrollStepMs`)
|
|
@@ -81,11 +80,10 @@ then the initial time of EPG will be `13:30` (if not set otherwise)
|
|
|
81
80
|
- `endTime` is always taken as excluded = not the part of the program
|
|
82
81
|
- so the program that gets focused/marked as live / etc. is the one that is just starting
|
|
83
82
|
- when the Program displayed by the cell is currently live, the cell has an `.live` class
|
|
84
|
-
- the Cell has also these following classes based on its width
|
|
83
|
+
- the Cell has also these following classes based on its width and breakpoints defined by `programTextModeResolver`
|
|
85
84
|
- `.with-text` - this cell should display full or ellipsis truncated text
|
|
86
85
|
- `.ellipsis-only` - this cell should display only ellipsis. You can use this class to center the text.
|
|
87
86
|
- `.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.
|
|
89
87
|
- the element of the currently focused row has an `.active` class
|
|
90
88
|
|
|
91
89
|
## Styles
|
|
@@ -17,7 +17,6 @@ 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';
|
|
21
20
|
|
|
22
21
|
const getClassByTextMode = (textMode: ProgramTextMode) => {
|
|
23
22
|
switch (textMode) {
|
|
@@ -41,8 +40,6 @@ export class Cell<
|
|
|
41
40
|
|
|
42
41
|
widthPx = this.props.widthPx;
|
|
43
42
|
|
|
44
|
-
smallestAllowedCellPx = this.props.smallestAllowedCellPx;
|
|
45
|
-
|
|
46
43
|
xOffsetPx = this.props.xOffsetPx;
|
|
47
44
|
|
|
48
45
|
textMode = this.props.programTextModeResolver(this.widthPx);
|
|
@@ -140,14 +137,6 @@ export class Cell<
|
|
|
140
137
|
this.textMode = textMode;
|
|
141
138
|
}
|
|
142
139
|
|
|
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
|
-
|
|
151
140
|
focus(options?: FocusOptions) {
|
|
152
141
|
if (!this.wasFocusedWithCurrentItem && document.activeElement === this.div.current) {
|
|
153
142
|
this.onFocusChange();
|
|
@@ -180,7 +169,6 @@ export class Cell<
|
|
|
180
169
|
this.item = item;
|
|
181
170
|
this.setLiveClass();
|
|
182
171
|
this.setTextModeClass(textMode);
|
|
183
|
-
this.setTooSmallClass();
|
|
184
172
|
this.programComponent.current!.updateData(
|
|
185
173
|
this.item!,
|
|
186
174
|
textMode,
|
|
@@ -191,15 +179,13 @@ export class Cell<
|
|
|
191
179
|
|
|
192
180
|
render() {
|
|
193
181
|
const {
|
|
194
|
-
isLoading, xOffsetPx, widthPx,
|
|
195
|
-
item, programTextModeResolver, renderProgram,
|
|
182
|
+
isLoading, xOffsetPx, widthPx, item, programTextModeResolver, renderProgram,
|
|
196
183
|
} = this.props;
|
|
197
184
|
const textMode = programTextModeResolver(widthPx);
|
|
198
|
-
const tooSmall = widthPx < smallestAllowedCellPx ? TOO_SMALL_CLASS : '';
|
|
199
185
|
return (
|
|
200
186
|
<Interactable
|
|
201
187
|
ref={this.div}
|
|
202
|
-
className={`epg-cell ${getClassByTextMode(textMode)}
|
|
188
|
+
className={`epg-cell ${getClassByTextMode(textMode)}`}
|
|
203
189
|
style={{
|
|
204
190
|
width: `${widthPx}px`,
|
|
205
191
|
...getXOffsetStyleObject(xOffsetPx),
|