@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
|
@@ -320,6 +320,10 @@ export const GUIDE = new Key({
|
|
|
320
320
|
keyCode: 458,
|
|
321
321
|
});
|
|
322
322
|
|
|
323
|
+
export const SUBTITLES = new Key({
|
|
324
|
+
id: 'SUBTITLES',
|
|
325
|
+
});
|
|
326
|
+
|
|
323
327
|
// MARK: Xbox specials
|
|
324
328
|
export const GAMEPAD_LEFT_THUMBSTICK_UP = new Key({
|
|
325
329
|
id: 'GAMEPAD_LEFT_THUMBSTICK_UP',
|
|
@@ -6,11 +6,12 @@ import * as KeyMap from './KeyMap';
|
|
|
6
6
|
export const overrideValues = (map: Partial<Record<keyof KeycodeKeyMap, Partial<Key>>>) => {
|
|
7
7
|
// @ts-ignore - map and KeyMap have same keys
|
|
8
8
|
forEach(Object.entries(map), ([keyName, {
|
|
9
|
-
keyCode, code, alternativeKeyCodes, alternativeCodes,
|
|
9
|
+
keyCode, code, alternativeKeyCodes, alternativeCodes, key,
|
|
10
10
|
}]: [keyof typeof import('./KeyMap'), Partial<Key>]) => {
|
|
11
11
|
if (typeof keyCode === 'number') KeyMap[keyName].keyCode = keyCode;
|
|
12
12
|
if (typeof code === 'string') KeyMap[keyName].code = code;
|
|
13
13
|
if (alternativeKeyCodes) KeyMap[keyName].alternativeKeyCodes = alternativeKeyCodes;
|
|
14
14
|
if (alternativeCodes) KeyMap[keyName].alternativeCodes = alternativeCodes;
|
|
15
|
+
if (key) KeyMap[keyName].key = key;
|
|
15
16
|
});
|
|
16
17
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DeviceBase as AbstractDeviceBase } from '../DeviceBase';
|
|
2
2
|
import { ScreenSaverStatus } from '../types/ScreenSaverStatus';
|
|
3
3
|
import { ConnectionType } from '../ConnectionType';
|
|
4
|
+
import { IAPPurchaseProductData, IAPSuccessPayload } from '../types/InAppPurchase';
|
|
4
5
|
|
|
5
6
|
export class DeviceBase extends AbstractDeviceBase {
|
|
6
7
|
volume = 0;
|
|
@@ -53,6 +54,17 @@ export class DeviceBase extends AbstractDeviceBase {
|
|
|
53
54
|
return this.getBaseUuid();
|
|
54
55
|
}
|
|
55
56
|
|
|
57
|
+
async getOsLanguage() {
|
|
58
|
+
return '';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async getAdInfo() {
|
|
62
|
+
const adId = 'uuid';
|
|
63
|
+
const type = 'id type';
|
|
64
|
+
const latEnabled = null;
|
|
65
|
+
return { adId, type, latEnabled };
|
|
66
|
+
}
|
|
67
|
+
|
|
56
68
|
async getVolume() {
|
|
57
69
|
return this.volume;
|
|
58
70
|
}
|
|
@@ -97,4 +109,16 @@ export class DeviceBase extends AbstractDeviceBase {
|
|
|
97
109
|
async getMacAddress() {
|
|
98
110
|
return '00:11:22:33:44:55';
|
|
99
111
|
}
|
|
112
|
+
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
114
|
+
async purchaseProduct(data: IAPPurchaseProductData): Promise<IAPSuccessPayload> {
|
|
115
|
+
// not supported
|
|
116
|
+
throw new Error('Not supported');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
120
|
+
async cancelSubscription(data: IAPPurchaseProductData): Promise<void> {
|
|
121
|
+
// not supported
|
|
122
|
+
throw new Error('Not supported');
|
|
123
|
+
}
|
|
100
124
|
}
|
|
@@ -5,6 +5,9 @@ export { VolumeRange } from './VolumeRange';
|
|
|
5
5
|
export type { ScreenSize } from './ScreenSize';
|
|
6
6
|
export type { KeycodeKeyMap } from './types/KeycodeKeyMap';
|
|
7
7
|
export type { DeviceEventMap } from './types/DeviceEvent';
|
|
8
|
+
export type {
|
|
9
|
+
IAPSuccessPayload, IAPErrorPayload, IAPPromiseResolve, IAPPromiseReject, IAPPurchaseProductData,
|
|
10
|
+
} from './types/InAppPurchase';
|
|
8
11
|
export type { ScreenSaverStatus } from './types/ScreenSaverStatus';
|
|
9
12
|
export type { ExitOptions } from './types/ExitOptions';
|
|
10
13
|
export * as KeyMap from './KeyMap';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
type NetworkChangeListener = (payload: { isConnected: boolean }) => void;
|
|
2
2
|
type VisibilityChangeListener = (payload: { isVisible: boolean }) => void;
|
|
3
3
|
type MouseActiveListener = (payload: { isMouseActive: boolean }) => void;
|
|
4
|
+
type CCToggleListener = (payload: { isEnabled: boolean }) => void;
|
|
4
5
|
|
|
5
6
|
export interface DeviceEventMap {
|
|
6
7
|
'networkchange': NetworkChangeListener,
|
|
7
8
|
'visibilitychange': VisibilityChangeListener,
|
|
8
9
|
'mouseactive': MouseActiveListener,
|
|
10
|
+
'cctoggle': CCToggleListener,
|
|
9
11
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Product } from '@24i/smartapps-datalayer/models';
|
|
2
|
+
import { VendorType } from '@24i/smartapps-datalayer/src/api';
|
|
3
|
+
|
|
4
|
+
export type IAPSuccessPayload = {
|
|
5
|
+
platform: VendorType,
|
|
6
|
+
receiptPayload: object
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type IAPPurchaseProductData = {
|
|
10
|
+
sku: string,
|
|
11
|
+
serviceId?: string,
|
|
12
|
+
product?: Product,
|
|
13
|
+
appId?: string,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type IAPErrorPayload = { message: string };
|
|
17
|
+
|
|
18
|
+
export type IAPPromiseResolve = (value: IAPSuccessPayload | PromiseLike<IAPSuccessPayload>) => void;
|
|
19
|
+
|
|
20
|
+
export type IAPPromiseReject = (reason?: unknown) => void;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeviceBase, ConnectionType, ScreenSaverStatus, VolumeRange,
|
|
3
|
+
IAPSuccessPayload,
|
|
4
|
+
IAPPurchaseProductData,
|
|
3
5
|
} from '@24i/bigscreen-sdk/driver-base';
|
|
4
6
|
import { runAsync } from '@24i/bigscreen-sdk/utils/timers';
|
|
7
|
+
import { generateUuid } from '@24i/bigscreen-sdk/utils';
|
|
5
8
|
import { getKeyMap } from './keymap';
|
|
6
9
|
import { patchSuitestKeys } from './patchSuitestKeys';
|
|
7
10
|
import { getBrowser } from './getBrowser';
|
|
@@ -114,6 +117,17 @@ export class DeviceBrowser extends DeviceBase {
|
|
|
114
117
|
return this.getBaseUuid();
|
|
115
118
|
}
|
|
116
119
|
|
|
120
|
+
async getAdInfo() {
|
|
121
|
+
const adId = generateUuid();
|
|
122
|
+
const type = 'sessionid';
|
|
123
|
+
const latEnabled = null;
|
|
124
|
+
return { adId, type, latEnabled };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
async getOsLanguage() {
|
|
128
|
+
return (window.navigator.language || '').slice(0, 2);
|
|
129
|
+
}
|
|
130
|
+
|
|
117
131
|
async getVolume() {
|
|
118
132
|
return this.volume;
|
|
119
133
|
}
|
|
@@ -167,4 +181,16 @@ export class DeviceBrowser extends DeviceBase {
|
|
|
167
181
|
// for development purpose. Correctly, it should return '' for unknown MAC addr.
|
|
168
182
|
return '00:00:00:00:00:00';
|
|
169
183
|
}
|
|
184
|
+
|
|
185
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
186
|
+
async purchaseProduct(data: IAPPurchaseProductData): Promise<IAPSuccessPayload> {
|
|
187
|
+
// not supported
|
|
188
|
+
throw new Error('Not supported');
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
192
|
+
async cancelSubscription(data: IAPPurchaseProductData): Promise<void> {
|
|
193
|
+
// not supported
|
|
194
|
+
throw new Error('Not supported');
|
|
195
|
+
}
|
|
170
196
|
}
|
|
@@ -9,6 +9,14 @@ export const getKeyMap = () => {
|
|
|
9
9
|
VOL_UP: { code: 'KeyU', keyCode: 85 },
|
|
10
10
|
VOL_DOWN: { code: 'KeyJ', keyCode: 74 },
|
|
11
11
|
MUTE: { code: 'KeyM', keyCode: 77 },
|
|
12
|
+
PLAY: { code: 'KeyO', keyCode: 79 },
|
|
13
|
+
PAUSE: { code: 'KeyP', keyCode: 80 },
|
|
14
|
+
PLAYPAUSE: { code: 'Space', keyCode: 32 },
|
|
15
|
+
FF: { code: 'Period', keyCode: 190 },
|
|
16
|
+
REW: { code: 'Comma', keyCode: 188 },
|
|
17
|
+
STOP: { code: 'Escape', keyCode: 27 },
|
|
18
|
+
SUBTITLES: { code: 'KeyS', keyCode: 83 },
|
|
19
|
+
REC: { code: 'KeyI', keyCode: 73 },
|
|
12
20
|
});
|
|
13
21
|
return generateKeyCodeKeyMap();
|
|
14
22
|
};
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
DeviceBase,
|
|
3
|
+
IAPPurchaseProductData,
|
|
4
|
+
IAPSuccessPayload,
|
|
5
|
+
ScreenSaverStatus,
|
|
6
|
+
VolumeRange,
|
|
7
|
+
} from '@24i/bigscreen-sdk/driver-base';
|
|
8
|
+
import { generateUuid } from '@24i/bigscreen-sdk/utils';
|
|
2
9
|
import { getKeyMap } from './keymap';
|
|
3
10
|
import { EntoneDeviceModelName } from './constants';
|
|
4
11
|
import { IEntone, NetworkEvent } from './IEntone';
|
|
@@ -120,6 +127,17 @@ export class DeviceEntone extends DeviceBase {
|
|
|
120
127
|
return '';
|
|
121
128
|
}
|
|
122
129
|
|
|
130
|
+
async getAdInfo() {
|
|
131
|
+
const adId = generateUuid();
|
|
132
|
+
const type = 'sessionid';
|
|
133
|
+
const latEnabled = null;
|
|
134
|
+
return { adId, type, latEnabled };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
async getOsLanguage() {
|
|
138
|
+
return (window.navigator.language || '').slice(0, 2);
|
|
139
|
+
}
|
|
140
|
+
|
|
123
141
|
async getVolume() {
|
|
124
142
|
try {
|
|
125
143
|
const { leftVolPercentage, rightVolPercentage } = ENTONE.stb.getAudioVolume();
|
|
@@ -229,4 +247,16 @@ export class DeviceEntone extends DeviceBase {
|
|
|
229
247
|
}
|
|
230
248
|
return macAddress || '';
|
|
231
249
|
}
|
|
250
|
+
|
|
251
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
252
|
+
async purchaseProduct(data: IAPPurchaseProductData): Promise<IAPSuccessPayload> {
|
|
253
|
+
// not supported
|
|
254
|
+
throw new Error('Not supported');
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
258
|
+
async cancelSubscription(data: IAPPurchaseProductData): Promise<void> {
|
|
259
|
+
// not supported
|
|
260
|
+
throw new Error('Not supported');
|
|
261
|
+
}
|
|
232
262
|
}
|
|
@@ -51,6 +51,7 @@ export function getKeyMap() {
|
|
|
51
51
|
EXIT: { keyCode: EntoneInput.KEY_EXIT },
|
|
52
52
|
INFO: { keyCode: EntoneInput.KEY_INFO },
|
|
53
53
|
GUIDE: { keyCode: EntoneInput.KEY_GUIDE },
|
|
54
|
+
SUBTITLES: { keyCode: EntoneInput.KEY_SUBTITLE },
|
|
54
55
|
});
|
|
55
56
|
return KeyMap.generateKeyCodeKeyMap();
|
|
56
57
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DeviceAndroidTV,
|
|
3
|
+
IAPErrorEvent,
|
|
4
|
+
IAPSuccessEvent,
|
|
5
|
+
} from '@24i/bigscreen-sdk/driver-androidtv';
|
|
6
|
+
import {
|
|
7
|
+
IAPSuccessPayload, IAPPromiseReject, IAPPromiseResolve,
|
|
8
|
+
IAPPurchaseProductData,
|
|
9
|
+
} from '@24i/bigscreen-sdk/driver-base';
|
|
10
|
+
import { VendorType } from '@24i/smartapps-datalayer/api';
|
|
11
|
+
import { Receipt } from './types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Fire TV driver implementing API of Android TV Bridge.
|
|
15
|
+
*
|
|
16
|
+
* See https://github.com/24i/prd-smart-ott-androidtv
|
|
17
|
+
*/
|
|
18
|
+
export class DeviceFireTV extends DeviceAndroidTV {
|
|
19
|
+
async getPlatformName(): Promise<string> {
|
|
20
|
+
return 'FireTV';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async getDeviceName(): Promise<string> {
|
|
24
|
+
const modelName = await this.getModelName();
|
|
25
|
+
const manufacturerName = await this.getManufacturerName();
|
|
26
|
+
return `FireTV ${manufacturerName} ${modelName}`.trim();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async getAdInfo() {
|
|
30
|
+
let adId = null;
|
|
31
|
+
let latEnabled = null;
|
|
32
|
+
const type = 'afai';
|
|
33
|
+
try {
|
|
34
|
+
adId = window.JavaScriptBridge.bridgeJavaScriptToAndroid_GetAdId() ?? null;
|
|
35
|
+
latEnabled = window.JavaScriptBridge.bridgeJavaScriptToAndroid_GetLimitAdTracking()
|
|
36
|
+
?? true;
|
|
37
|
+
} catch (e) {
|
|
38
|
+
latEnabled = true;
|
|
39
|
+
console.error('[DeviceFireTV] Failed to getAdInfo', e);
|
|
40
|
+
}
|
|
41
|
+
return { adId, type, latEnabled };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
onIAPSuccess = (resolve: IAPPromiseResolve, reject: IAPPromiseReject) => (event: unknown) => {
|
|
45
|
+
this.removeIAPListeners(resolve, reject);
|
|
46
|
+
try {
|
|
47
|
+
const { userId, receipt: receiptToParse } = event as IAPSuccessEvent;
|
|
48
|
+
const receipt: Receipt = JSON.parse(receiptToParse);
|
|
49
|
+
window.JavaScriptBridge
|
|
50
|
+
.bridgeReceiptAmazonIAPValidated(receipt.receiptId);
|
|
51
|
+
resolve({
|
|
52
|
+
platform: VendorType.AMAZON,
|
|
53
|
+
receiptPayload: {
|
|
54
|
+
userId,
|
|
55
|
+
receiptId: receipt.receiptId,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
} catch (e) {
|
|
59
|
+
reject(e);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
onIAPError = (resolve: IAPPromiseResolve, reject: IAPPromiseReject) => (event: unknown) => {
|
|
64
|
+
this.removeIAPListeners(resolve, reject);
|
|
65
|
+
reject(new Error((event as IAPErrorEvent).message));
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
removeIAPListeners(resolve: IAPPromiseResolve, reject: IAPPromiseReject) {
|
|
69
|
+
document.removeEventListener('iapSuccess', this.onIAPSuccess(resolve, reject));
|
|
70
|
+
document.removeEventListener('iapError', this.onIAPError(resolve, reject));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async purchaseProduct(data: IAPPurchaseProductData): Promise<IAPSuccessPayload> {
|
|
74
|
+
return new Promise((resolve, reject) => {
|
|
75
|
+
document.addEventListener('iapSuccess', this.onIAPSuccess(resolve, reject));
|
|
76
|
+
document.addEventListener('iapError', this.onIAPError(resolve, reject));
|
|
77
|
+
window.JavaScriptBridge.bridgeReceiptAmazonIAPValidation(data.sku);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
82
|
+
async cancelSubscription(data: IAPPurchaseProductData): Promise<void> {
|
|
83
|
+
// not supported
|
|
84
|
+
throw new Error('Not supported');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IJavaScriptBridge } from '../../../driver-androidtv/src/types';
|
|
2
|
+
|
|
3
|
+
export const mockJavaScriptBridge: IJavaScriptBridge = {
|
|
4
|
+
JavaScriptBridge: {
|
|
5
|
+
bridgeJavaScriptToAndroid_GetDeviceInfo: () => (
|
|
6
|
+
JSON.stringify({
|
|
7
|
+
deviceBrand: 'Amazon',
|
|
8
|
+
deviceModel: 'AFTR',
|
|
9
|
+
osVersion: '8.0.0',
|
|
10
|
+
appVersion: '0.0.1',
|
|
11
|
+
appFlavor: 'appstage-bigscreen',
|
|
12
|
+
drmKeySystems: '["W3C Clear Key", "Google Widevine"]',
|
|
13
|
+
ipLocal: '127.0.0.1',
|
|
14
|
+
})
|
|
15
|
+
),
|
|
16
|
+
bridgeJavaScriptToAndroid_GetAdId: () => 'afai-id',
|
|
17
|
+
bridgeJavaScriptToAndroid_GetLimitAdTracking: () => false,
|
|
18
|
+
bridgeJavaScriptToAndroid_GetOsLanguage: () => '',
|
|
19
|
+
bridgeJavaScriptToAndroid_GetMediaInfo: () => '{}',
|
|
20
|
+
bridgeJavaScriptToAndroid_Back: () => {},
|
|
21
|
+
bridgeJavaScriptToAndroid_ReloadPlayer: () => {},
|
|
22
|
+
bridgeJavaScriptToAndroid_StopVideo: () => {},
|
|
23
|
+
bridgeJavaScriptToAndroid_FullScreenVideo: () => {},
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25
|
+
bridgeJavaScriptToAndroid_SetVideoPath: (url: string) => {},
|
|
26
|
+
bridgeJavaScriptToAndroid_IsPlaying: () => true,
|
|
27
|
+
bridgeJavaScriptToAndroid_PauseVideo: () => {},
|
|
28
|
+
bridgeJavaScriptToAndroid_PlayVideo: () => {},
|
|
29
|
+
bridgeJavaScriptToAndroid_IsLive: () => false,
|
|
30
|
+
bridgeJavaScriptToAndroid_GetCurrentTime: () => Date.now(),
|
|
31
|
+
bridgeJavaScriptToAndroid_GetTotalTime: () => Date.now(),
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
+
bridgeJavaScriptToAndroid_SeekTo: (milliseconds: number) => {},
|
|
34
|
+
bridgeJavaScriptToAndroid_getCurrentSubtitleTrack: () => '{}',
|
|
35
|
+
bridgeJavaScriptToAndroid_getCurrentAudioTrack: () => '{}',
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
|
+
bridgeJavaScriptToAndroid_SetTrack: (track: string) => {},
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
|
+
bridgeJavaScriptToAndroid_SetAudioTrack: (track: string) => {},
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
41
|
+
bridgeReceiptAmazonIAPValidation: (sku: string) => {},
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
43
|
+
bridgeReceiptAmazonIAPValidated: (receiptId: string) => {},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DeviceFireTV } from './DeviceFireTV';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Receipt = object & { receiptId: string };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeviceBase, ConnectionType, ScreenSaverStatus, loadObject, VolumeRange,
|
|
3
|
+
IAPSuccessPayload,
|
|
4
|
+
IAPPurchaseProductData,
|
|
3
5
|
} from '@24i/bigscreen-sdk/driver-base';
|
|
6
|
+
import { generateUuid } from '@24i/bigscreen-sdk/utils';
|
|
4
7
|
import { getKeyMap } from './keymap';
|
|
5
8
|
import { getVersion } from './getVersion';
|
|
6
9
|
import { getDeviceInfo } from './deviceInfo';
|
|
@@ -245,6 +248,17 @@ export class DeviceHbbTV extends DeviceBase {
|
|
|
245
248
|
return this.getBaseUuid();
|
|
246
249
|
}
|
|
247
250
|
|
|
251
|
+
async getAdInfo() {
|
|
252
|
+
const adId = generateUuid();
|
|
253
|
+
const type = 'sessionid';
|
|
254
|
+
const latEnabled = null;
|
|
255
|
+
return { adId, type, latEnabled };
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
async getOsLanguage() {
|
|
259
|
+
return (window.navigator.language || '').slice(0, 2);
|
|
260
|
+
}
|
|
261
|
+
|
|
248
262
|
async getVolume() {
|
|
249
263
|
// TODO: not yet implemented
|
|
250
264
|
return VolumeRange.UNSUPPORTED;
|
|
@@ -310,4 +324,16 @@ export class DeviceHbbTV extends DeviceBase {
|
|
|
310
324
|
console.warn('[HbbTV] Broadcast tune failed');
|
|
311
325
|
}
|
|
312
326
|
}
|
|
327
|
+
|
|
328
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
329
|
+
async purchaseProduct(data: IAPPurchaseProductData): Promise<IAPSuccessPayload> {
|
|
330
|
+
// not supported
|
|
331
|
+
throw new Error('Not supported');
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
335
|
+
async cancelSubscription(data: IAPPurchaseProductData): Promise<void> {
|
|
336
|
+
// not supported
|
|
337
|
+
throw new Error('Not supported');
|
|
338
|
+
}
|
|
313
339
|
}
|
|
@@ -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 { getKeyMap } from './keymap';
|
|
8
11
|
import { toi2 } from './toi2';
|
|
9
12
|
import { toi3 } from './toi3';
|
|
@@ -159,6 +162,17 @@ export class DeviceKreaTV extends DeviceBase {
|
|
|
159
162
|
return '';
|
|
160
163
|
}
|
|
161
164
|
|
|
165
|
+
async getAdInfo() {
|
|
166
|
+
const adId = generateUuid();
|
|
167
|
+
const type = 'sessionid';
|
|
168
|
+
const latEnabled = null;
|
|
169
|
+
return { adId, type, latEnabled };
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
async getOsLanguage() {
|
|
173
|
+
return (window.navigator.language || '').slice(0, 2);
|
|
174
|
+
}
|
|
175
|
+
|
|
162
176
|
getSupportedAudioConnections() {
|
|
163
177
|
const { audioOutputService } = this.toiInstance;
|
|
164
178
|
const { ToiAudioOutputService } = this.toiInstance.consts;
|
|
@@ -268,4 +282,16 @@ export class DeviceKreaTV extends DeviceBase {
|
|
|
268
282
|
async getMacAddress(): Promise<string> {
|
|
269
283
|
return this.toiResolver.getMacAddress();
|
|
270
284
|
}
|
|
285
|
+
|
|
286
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
287
|
+
async purchaseProduct(data: IAPPurchaseProductData): Promise<IAPSuccessPayload> {
|
|
288
|
+
// not supported
|
|
289
|
+
throw new Error('Not supported');
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
293
|
+
async cancelSubscription(data: IAPPurchaseProductData): Promise<void> {
|
|
294
|
+
// not supported
|
|
295
|
+
throw new Error('Not supported');
|
|
296
|
+
}
|
|
271
297
|
}
|
|
@@ -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 { getDeviceInfo, getFirmware, getPlatformInfo } from './formatUserAgent';
|
|
8
11
|
import { ISmartTvAApi } from './types';
|
|
9
12
|
import { getKeyMap } from './keymap';
|
|
@@ -81,6 +84,17 @@ export class DeviceSaphi extends DeviceBase {
|
|
|
81
84
|
return this.getBaseUuid();
|
|
82
85
|
}
|
|
83
86
|
|
|
87
|
+
async getAdInfo() {
|
|
88
|
+
const adId = generateUuid();
|
|
89
|
+
const type = 'sessionid';
|
|
90
|
+
const latEnabled = null;
|
|
91
|
+
return { adId, type, latEnabled };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async getOsLanguage() {
|
|
95
|
+
return (window.navigator.language || '').slice(0, 2);
|
|
96
|
+
}
|
|
97
|
+
|
|
84
98
|
async getVolume(): Promise<number> {
|
|
85
99
|
return VolumeRange.UNSUPPORTED;
|
|
86
100
|
}
|
|
@@ -141,4 +155,16 @@ export class DeviceSaphi extends DeviceBase {
|
|
|
141
155
|
// not supported on Saphi platform
|
|
142
156
|
return '';
|
|
143
157
|
}
|
|
158
|
+
|
|
159
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
160
|
+
async purchaseProduct(data: IAPPurchaseProductData): Promise<IAPSuccessPayload> {
|
|
161
|
+
// not supported
|
|
162
|
+
throw new Error('Not supported');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
166
|
+
async cancelSubscription(data: IAPPurchaseProductData): Promise<void> {
|
|
167
|
+
// not supported
|
|
168
|
+
throw new Error('Not supported');
|
|
169
|
+
}
|
|
144
170
|
}
|