@24i/bigscreen-sdk 0.9.9-alpha.2148 → 0.9.9-alpha.2150
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/__mocks__/@24i/bigscreen-sdk/animations.ts +2 -0
- package/package.json +1 -1
- package/packages/animations/src/__mocks__/JSAnimations.ts +30 -0
- package/packages/conviva/src/__mocks__/ConvivaMock.ts +36 -0
- package/packages/developer-tools/src/DeveloperConsole/utils/formatTime.ts +13 -0
- package/packages/developer-tools/src/DeveloperConsole/utils/index.ts +3 -0
- package/packages/developer-tools/src/DeveloperConsole/utils/stringify.ts +10 -0
- package/packages/developer-tools/src/DeveloperConsole/utils/styles.ts +24 -0
- package/packages/developer-tools/src/EnvironmentSelection/utils/format.ts +4 -0
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +51 -0
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Player.ts +7 -0
- package/packages/developer-tools/src/TechnicalInfo/__mocks__/Storage.ts +9 -0
- package/packages/developer-tools/src/TechnicalInfo/utils/eme01bSupport.ts +58 -0
- package/packages/developer-tools/src/TechnicalInfo/utils/emeSupport.ts +80 -0
- package/packages/developer-tools/src/TechnicalInfo/utils/formatTimezone.ts +15 -0
- package/packages/developer-tools/src/TechnicalInfo/utils/mseSupport.ts +14 -0
- package/packages/developer-tools/src/utils/reload.ts +6 -0
- package/packages/driver-base/src/__mocks__/DeviceBase.ts +100 -0
- package/packages/driver-base/src/__mocks__/keyMap.ts +41 -0
- package/packages/driver-entone/src/__mocks__/entone.ts +177 -0
- package/packages/driver-hbbtv/src/__mocks__/hbbtv.ts +17 -0
- package/packages/driver-kreatv/src/__mocks__/toi2.ts +76 -0
- package/packages/driver-kreatv/src/__mocks__/toi3.ts +43 -0
- package/packages/driver-saphi/src/__mocks__/SmartTvA_API.ts +11 -0
- package/packages/driver-saphi/src/__mocks__/userAgent.ts +4 -0
- package/packages/driver-tizen/src/__mocks__/tizen.ts +35 -0
- package/packages/driver-webos/src/__mocks__/webos.ts +172 -0
- package/packages/driver-xbox/src/__mocks__/Windows.ts +94 -0
- package/packages/gallup/src/__mocks__/SpringStreams.js +18 -0
- package/packages/input/__mocks__/MockKeyboard.ts +40 -0
- package/packages/keyboard/src/utils/caret.ts +48 -0
- package/packages/keyboard/src/utils/generateFocusMatrixFromStringMatrix.ts +12 -0
- package/packages/keyboard/src/utils/input.ts +40 -0
- package/packages/list/utils/index.ts +1 -0
- package/packages/logger/src/__mocks__/LoggerBase.ts +13 -0
- package/packages/logger/src/utils/deviceInfo.ts +25 -0
- package/packages/logger/src/utils/index.ts +1 -0
- package/packages/utils/README.md +336 -0
- package/packages/utils/src/addClass.ts +9 -0
- package/packages/utils/src/counter.ts +47 -0
- package/packages/utils/src/debounce.ts +54 -0
- package/packages/utils/src/displayToggler.scss +3 -0
- package/packages/utils/src/displayToggler.ts +38 -0
- package/packages/utils/src/elementUtils.ts +58 -0
- package/packages/utils/src/generateUuid.ts +19 -0
- package/packages/utils/src/index.ts +35 -0
- package/packages/utils/src/memoryInfo.ts +21 -0
- package/packages/utils/src/nTimes.ts +9 -0
- package/packages/utils/src/noop.ts +1 -0
- package/packages/utils/src/offsetPosition.ts +56 -0
- package/packages/utils/src/removeClass.ts +9 -0
- package/packages/utils/src/scaledImage.ts +21 -0
- package/packages/utils/src/stopEvent.ts +10 -0
- package/packages/utils/src/timeConstants.ts +11 -0
- package/packages/utils/src/timers/createInterval.ts +19 -0
- package/packages/utils/src/timers/createTimeout.ts +22 -0
- package/packages/utils/src/timers/index.ts +4 -0
- package/packages/utils/src/timers/runAsync.ts +3 -0
- package/packages/utils/src/timers/types.ts +9 -0
- package/packages/utils/src/wait.ts +1 -0
- package/packages/utils/src/xhr/__mocks__/xhr.ts +29 -0
- package/packages/utils/src/xhr/index.ts +11 -0
- package/packages/utils/src/xhr/xhrSend.ts +139 -0
- package/packages/utils/src/xhr/xhrSendRetry.ts +77 -0
- package/packages/volume-control/src/__mocks__/VolumeControlUIMock.tsx +18 -0
- package/utils/create-export-maps/index.ts +3 -0
- package/utils/create-export-maps/src/__tests__/createExportMaps.spec.ts +50 -0
- package/utils/create-export-maps/src/createExportMaps.ts +61 -0
- package/utils/create-package/README.md +40 -0
- package/utils/create-package/src/createPackage.ts +72 -0
- package/utils/create-package/src/index.ts +3 -0
- package/utils/create-package/src/questionnaire/questions.ts +19 -0
- package/utils/create-package/src/settings/Settings.ts +5 -0
- package/utils/create-package/src/types.ts +4 -0
- package/utils/create-package/templates/typescript/README.md +9 -0
- package/utils/create-package/templates/typescript/exports.json +6 -0
- package/utils/create-package/templates/typescript/src/index.ts +0 -0
- package/utils/run-scripts/index.ts +3 -0
- package/utils/run-scripts/src/__tests__/runScripts.spec.ts +45 -0
- package/utils/run-scripts/src/runScripts.ts +20 -0
package/package.json
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export class JSAnimations {
|
|
2
|
+
animationRunning = false;
|
|
3
|
+
|
|
4
|
+
from = 0;
|
|
5
|
+
|
|
6
|
+
to = 0;
|
|
7
|
+
|
|
8
|
+
frameCallback?: (value: number) => void;
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
|
+
start(from: number, to: number, time: number, easingFunction: any): JSAnimations {
|
|
12
|
+
this.to = to;
|
|
13
|
+
this.animationRunning = true;
|
|
14
|
+
this.frameCallback = undefined;
|
|
15
|
+
setTimeout(this.frame, 0);
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
frame = (): void => {
|
|
20
|
+
if (this.frameCallback) {
|
|
21
|
+
this.frameCallback(this.to);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
onFrame(callback: (value: number) => void) {
|
|
26
|
+
if (typeof callback === 'function') {
|
|
27
|
+
this.frameCallback = callback;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ConvivaSDK } from '../ConvivaSDK';
|
|
2
|
+
|
|
3
|
+
export const ConvivaMock: ConvivaSDK = {
|
|
4
|
+
Constants: {
|
|
5
|
+
StreamType: {
|
|
6
|
+
LIVE: 'LIVE',
|
|
7
|
+
VOD: 'VOD',
|
|
8
|
+
},
|
|
9
|
+
LogLevel: {
|
|
10
|
+
DEBUG: 0,
|
|
11
|
+
INFO: 1,
|
|
12
|
+
WARNING: 2,
|
|
13
|
+
ERROR: 3,
|
|
14
|
+
NONE: 4,
|
|
15
|
+
},
|
|
16
|
+
DeviceMetadata: {
|
|
17
|
+
MANUFACTURER: 'MANUFACTURER',
|
|
18
|
+
MODEL: 'MODEL',
|
|
19
|
+
TYPE: 'TYPE',
|
|
20
|
+
},
|
|
21
|
+
DeviceType: {
|
|
22
|
+
SMARTTV: 'SMARTTV',
|
|
23
|
+
},
|
|
24
|
+
ASSET_NAME: 'ASSET_NAME',
|
|
25
|
+
CUSTOMER_KEY: 'CUSTOMER_KEY',
|
|
26
|
+
DEFAULT_RESOURCE: 'DEFAULT_RESOURCE',
|
|
27
|
+
DURATION: 'DURATION',
|
|
28
|
+
ENCODED_FRAMERATE: 'ENCODED_FRAMERATE',
|
|
29
|
+
GATEWAY_URL: 'GATEWAY_URL',
|
|
30
|
+
IS_LIVE: 'IS_LIVE',
|
|
31
|
+
LOG_LEVEL: 'LOG_LEVEL',
|
|
32
|
+
PLAYER_NAME: 'PLAYER_NAME',
|
|
33
|
+
STREAM_URL: 'STREAM_URL',
|
|
34
|
+
VIEWER_ID: 'VIEWER_ID',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const formatTimeToHMS = (timestamp: number) => {
|
|
2
|
+
if (!timestamp) {
|
|
3
|
+
return '00:00:00';
|
|
4
|
+
}
|
|
5
|
+
const date = new Date(timestamp);
|
|
6
|
+
const lastTwoChars = -2;
|
|
7
|
+
|
|
8
|
+
const hours = (`0${date.getHours()}`).slice(lastTwoChars);
|
|
9
|
+
const minutes = (`0${date.getMinutes()}`).slice(lastTwoChars);
|
|
10
|
+
const seconds = (`0${date.getSeconds()}`).slice(lastTwoChars);
|
|
11
|
+
|
|
12
|
+
return `${hours}:${minutes}:${seconds}`;
|
|
13
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const HttpStatusCodesLevels = {
|
|
2
|
+
LEVEL_2XX: '2',
|
|
3
|
+
LEVEL_3XX: '3',
|
|
4
|
+
LEVEL_4XX: '4',
|
|
5
|
+
LEVEL_5XX: '5',
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const getStatusCodeClass = (statusCode: number) => {
|
|
9
|
+
const { LEVEL_2XX, LEVEL_3XX, LEVEL_4XX, LEVEL_5XX } = HttpStatusCodesLevels;
|
|
10
|
+
const stringStatusCode = String(statusCode);
|
|
11
|
+
if (stringStatusCode.startsWith(LEVEL_2XX)) {
|
|
12
|
+
return 'status-ok';
|
|
13
|
+
}
|
|
14
|
+
if (stringStatusCode.startsWith(LEVEL_3XX)) {
|
|
15
|
+
return 'status-redirect';
|
|
16
|
+
}
|
|
17
|
+
if (stringStatusCode.startsWith(LEVEL_4XX)) {
|
|
18
|
+
return 'status-client-error';
|
|
19
|
+
}
|
|
20
|
+
if (stringStatusCode.startsWith(LEVEL_5XX)) {
|
|
21
|
+
return 'status-server-error';
|
|
22
|
+
}
|
|
23
|
+
return '';
|
|
24
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
class Device {
|
|
2
|
+
async getUuid() {
|
|
3
|
+
return 'uuidXYZ';
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async getManufacturerName() {
|
|
7
|
+
return 'manufacturer name';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async getPlatformName() {
|
|
11
|
+
return 'platform name';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async getPlatformVersion() {
|
|
15
|
+
return 'platform version';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async getDeviceName() {
|
|
19
|
+
return 'device name';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async getModelName() {
|
|
23
|
+
return 'model name';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async getFirmware() {
|
|
27
|
+
return 'device firmware';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async is4KSupported() {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async is8KSupported() {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async getLocalIP() {
|
|
39
|
+
return 'local ip';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async getConnectionType() {
|
|
43
|
+
return 'connection type';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async getMacAddress() {
|
|
47
|
+
return 'mac address';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { Device };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* To detect Encrypted Media Extensions (EME) and Content Decryption Module (CDM)
|
|
3
|
+
* support in a browser for various DRM technologies.
|
|
4
|
+
*
|
|
5
|
+
* Encrypted Media Extensions v0.1b (draft proposal)
|
|
6
|
+
* - The EME v0.1b is implemented on old devices like Tizen 2016, LG webOS 3.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Check the Encrypted Media Extensions v0.1b is supported in
|
|
11
|
+
*/
|
|
12
|
+
function hasEMESupport() {
|
|
13
|
+
const videoEl = document.createElement('video');
|
|
14
|
+
// any because the method is defined in EME v0.1b
|
|
15
|
+
const addKey = (videoEl as any).webkitAddKey;
|
|
16
|
+
return !!addKey;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param videoEl Video element
|
|
21
|
+
* @param keySystem Key System Identifier of a content protection (DRM) mechanism.
|
|
22
|
+
* @returns A boolean indicating whether key system is supported
|
|
23
|
+
*/
|
|
24
|
+
function isKeySystemSupported(videoEl: HTMLVideoElement, keySystem: string) {
|
|
25
|
+
// @ts-ignore - the optional second parameter is defined in EME v0.1b
|
|
26
|
+
return !!videoEl.canPlayType('video/mp4;codecs="avc1.42E01E"', keySystem);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const KeySystems = {
|
|
30
|
+
'webkit-org.w3.clearkey': { name: 'W3C Clear Key' }, // prefixed for EME v0.1b
|
|
31
|
+
'org.w3.clearkey': { name: 'W3C Clear Key' },
|
|
32
|
+
'com.microsoft.playready': { name: 'Microsoft PlayReady' },
|
|
33
|
+
'com.youtube.playready': { name: 'YouTube PlayReady' },
|
|
34
|
+
'com.widevine.alpha': { name: 'Google Widevine' },
|
|
35
|
+
'com.apple.fairplay': { name: 'Apple FairPlay' },
|
|
36
|
+
'com.adobe.access': { name: 'Adobe Access' },
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Get list of supported DRM/CDM
|
|
41
|
+
*/
|
|
42
|
+
async function getListOfSupportedDRM() {
|
|
43
|
+
const keySystems = Object.keys(KeySystems) as Array<keyof typeof KeySystems>;
|
|
44
|
+
const videoEl = document.createElement('video');
|
|
45
|
+
|
|
46
|
+
const supportedSystems = [];
|
|
47
|
+
for (let i = 0; i < keySystems.length; i++) {
|
|
48
|
+
const keySystem = keySystems[i];
|
|
49
|
+
const isSupported = isKeySystemSupported(videoEl, keySystem);
|
|
50
|
+
if (isSupported) {
|
|
51
|
+
supportedSystems.push({ id: keySystem, name: KeySystems[keySystem].name });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return supportedSystems;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { hasEMESupport, getListOfSupportedDRM };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* To detect Encrypted Media Extensions (EME) and Content Decryption Module (CDM)
|
|
3
|
+
* support in a browser for various DRM technologies.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Check the EME (Encrypted Media Extensions API) is supported in
|
|
8
|
+
*/
|
|
9
|
+
function hasEMESupport() {
|
|
10
|
+
// verified only "window.MediaKeys", other prefixed keys were not tested
|
|
11
|
+
const eme = window.MediaKeys || (window as any).MSMediaKeys || (window as any).WebKitMediaKeys;
|
|
12
|
+
return !!eme;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Check the navigator.requestMediaKeySystemAccess method is supported in
|
|
17
|
+
* Note: it can be used for EME support check, alternatively instead of hasEMESupport.
|
|
18
|
+
*/
|
|
19
|
+
function hasRMKSASupport() {
|
|
20
|
+
const rmksa = window.navigator.requestMediaKeySystemAccess;
|
|
21
|
+
return !!rmksa;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @param keySystem Key System Identifier of a content protection (DRM) mechanism.
|
|
26
|
+
* @param config A non-empty array of MediaKeySystemConfiguration objects.
|
|
27
|
+
*/
|
|
28
|
+
function isKeySystemSupported(keySystem: string, config: MediaKeySystemConfiguration[])
|
|
29
|
+
: Promise<boolean> {
|
|
30
|
+
return new Promise((resolve) => {
|
|
31
|
+
try {
|
|
32
|
+
window.navigator.requestMediaKeySystemAccess(keySystem, config)
|
|
33
|
+
.then(() => { resolve(true); })
|
|
34
|
+
.catch(() => { resolve(false); });
|
|
35
|
+
} catch (e) {
|
|
36
|
+
resolve(false);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const KeySystems = {
|
|
42
|
+
// 'webkit-org.w3.clearkey': { name: 'W3C Clear Key' }, // only EME v0.1b
|
|
43
|
+
'org.w3.clearkey': { name: 'W3C Clear Key' },
|
|
44
|
+
'com.microsoft.playready': { name: 'Microsoft PlayReady' },
|
|
45
|
+
'com.youtube.playready': { name: 'YouTube PlayReady' },
|
|
46
|
+
'com.widevine.alpha': { name: 'Google Widevine' },
|
|
47
|
+
'com.apple.fairplay': { name: 'Apple FairPlay' },
|
|
48
|
+
'com.adobe.access': { name: 'Adobe Access' },
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Get list of supported DRM/CDM
|
|
53
|
+
*/
|
|
54
|
+
async function getListOfSupportedDRM() {
|
|
55
|
+
const keySystems = Object.keys(KeySystems) as Array<keyof typeof KeySystems>;
|
|
56
|
+
|
|
57
|
+
const keySystemConfig = [{
|
|
58
|
+
initDataTypes: ['cenc'],
|
|
59
|
+
audioCapabilities: [{
|
|
60
|
+
contentType: 'audio/mp4;codecs="mp4a.40.2"',
|
|
61
|
+
}],
|
|
62
|
+
videoCapabilities: [{
|
|
63
|
+
contentType: 'video/mp4;codecs="avc1.42E01E"',
|
|
64
|
+
}],
|
|
65
|
+
}];
|
|
66
|
+
|
|
67
|
+
const supportedSystems = [];
|
|
68
|
+
for (let i = 0; i < keySystems.length; i++) {
|
|
69
|
+
const keySystem = keySystems[i];
|
|
70
|
+
// eslint-disable-next-line no-await-in-loop
|
|
71
|
+
const isSupported = await isKeySystemSupported(keySystem, keySystemConfig);
|
|
72
|
+
if (isSupported) {
|
|
73
|
+
supportedSystems.push({ id: keySystem, name: KeySystems[keySystem].name });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return supportedSystems;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { hasEMESupport, hasRMKSASupport, getListOfSupportedDRM };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const MINUTES_PER_HOUR = 60;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @param timezoneOffsetInMinutes The time-zone offset, in minutes, from local time to UTC.
|
|
5
|
+
* @returns time-zone string in RFC 822 4-digit time zone format, e.g. "+0100"
|
|
6
|
+
*/
|
|
7
|
+
function formatTimezone(timezoneOffsetInMinutes = 0) {
|
|
8
|
+
const hours = Math.floor(Math.abs(timezoneOffsetInMinutes / MINUTES_PER_HOUR));
|
|
9
|
+
const minutes = timezoneOffsetInMinutes % MINUTES_PER_HOUR;
|
|
10
|
+
const formattedHours = `0${hours}`.slice(-2); // eslint-disable-line no-magic-numbers
|
|
11
|
+
const formattedMinutes = `0${minutes}`.slice(-2); // eslint-disable-line no-magic-numbers
|
|
12
|
+
return `${timezoneOffsetInMinutes > 0 ? '-' : '+'}${formattedHours}${formattedMinutes}`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { formatTimezone };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* To detect Media Source Extensions API (MSE) support in a browser.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Check the MSE (Media Source Extensions API) is supported in
|
|
7
|
+
*/
|
|
8
|
+
function hasMSESupport() {
|
|
9
|
+
// any because webkit-prefixed key needed on old devices like LG webOS 1.0 (2014)
|
|
10
|
+
const mse = window.MediaSource || (window as any).WebKitMediaSource;
|
|
11
|
+
return !!mse;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { hasMSESupport };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { DeviceBase as AbstractDeviceBase } from '../DeviceBase';
|
|
2
|
+
import { ScreenSaverStatus } from '../types/ScreenSaverStatus';
|
|
3
|
+
import { ConnectionType } from '../ConnectionType';
|
|
4
|
+
|
|
5
|
+
export class DeviceBase extends AbstractDeviceBase {
|
|
6
|
+
volume = 0;
|
|
7
|
+
|
|
8
|
+
isMuted = false;
|
|
9
|
+
|
|
10
|
+
screenSaverStatus = { enabled: false };
|
|
11
|
+
|
|
12
|
+
async initDevice() {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
exit() {}
|
|
17
|
+
|
|
18
|
+
reboot() {}
|
|
19
|
+
|
|
20
|
+
async getManufacturerName() {
|
|
21
|
+
return 'manufacturer name';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async getPlatformName() {
|
|
25
|
+
return 'platform name';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async getPlatformVersion() {
|
|
29
|
+
return 'platform version';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async getDeviceName() {
|
|
33
|
+
return 'device name';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async getModelName() {
|
|
37
|
+
return 'model name';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async getFirmware() {
|
|
41
|
+
return 'device firmware';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async is4KSupported() {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async is8KSupported() {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async getUuid() {
|
|
53
|
+
return this.getBaseUuid();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async getVolume() {
|
|
57
|
+
return this.volume;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async setVolume(volumePercentage: number) {
|
|
61
|
+
this.volume = volumePercentage;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async mute(mute: boolean) {
|
|
65
|
+
this.isMuted = mute;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async isMute() {
|
|
69
|
+
return this.isMuted;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async getScreenSaver() {
|
|
73
|
+
return this.screenSaverStatus;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async setScreenSaver(status: ScreenSaverStatus) {
|
|
77
|
+
this.screenSaverStatus.enabled = status.enabled;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
81
|
+
async setUserAgent(userAgent: string) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async isNetworkConnected() {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async getConnectionType() {
|
|
90
|
+
return 'unknown' as ConnectionType;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async getLocalIP() {
|
|
94
|
+
return '1.2.3.4';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
async getMacAddress() {
|
|
98
|
+
return '00:11:22:33:44:55';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export const KEYMAP = {
|
|
2
|
+
LEFT: 37,
|
|
3
|
+
RIGHT: 39,
|
|
4
|
+
UP: 38,
|
|
5
|
+
DOWN: 40,
|
|
6
|
+
BACK: 8,
|
|
7
|
+
ENTER: 13,
|
|
8
|
+
ESC: 27,
|
|
9
|
+
PLAY: 415,
|
|
10
|
+
PAUSE: 19,
|
|
11
|
+
PLAYPAUSE: 1000,
|
|
12
|
+
STOP: 413,
|
|
13
|
+
FF: 417,
|
|
14
|
+
REW: 412,
|
|
15
|
+
RED: 82,
|
|
16
|
+
GREEN: 71,
|
|
17
|
+
YELLOW: 89,
|
|
18
|
+
BLUE: 66,
|
|
19
|
+
NUM_0: 48,
|
|
20
|
+
NUM_1: 49,
|
|
21
|
+
NUM_2: 50,
|
|
22
|
+
NUM_3: 51,
|
|
23
|
+
NUM_4: 52,
|
|
24
|
+
NUM_5: 53,
|
|
25
|
+
NUM_6: 54,
|
|
26
|
+
NUM_7: 55,
|
|
27
|
+
NUM_8: 56,
|
|
28
|
+
NUM_9: 57,
|
|
29
|
+
KP_0: 96,
|
|
30
|
+
KP_1: 97,
|
|
31
|
+
KP_2: 98,
|
|
32
|
+
KP_3: 99,
|
|
33
|
+
KP_4: 100,
|
|
34
|
+
KP_5: 101,
|
|
35
|
+
KP_6: 102,
|
|
36
|
+
KP_7: 103,
|
|
37
|
+
KP_8: 104,
|
|
38
|
+
KP_9: 105,
|
|
39
|
+
CHANNEL_UP: 33,
|
|
40
|
+
CHANNEL_DOWN: 34,
|
|
41
|
+
};
|