@signageos/front-applet 4.11.0
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/CHANGELOG.md +207 -0
- package/README.md +3 -0
- package/dist/bundle.js +9 -0
- package/dist/bundle.js.map +1 -0
- package/docs/README.md +5 -0
- package/docs/js-api/js-api-introduction.md +73 -0
- package/docs/js-api/js-applet-basics.md +294 -0
- package/docs/js-api/js-applet-resources.md +172 -0
- package/docs/js-api/js-browser.md +170 -0
- package/docs/js-api/js-command.md +208 -0
- package/docs/js-api/js-display.md +48 -0
- package/docs/js-api/js-file-system.md +568 -0
- package/docs/js-api/js-hardware-serial.md +142 -0
- package/docs/js-api/js-hardware.md +70 -0
- package/docs/js-api/js-iframes.md +88 -0
- package/docs/js-api/js-input.md +84 -0
- package/docs/js-api/js-loading-fonts.md +138 -0
- package/docs/js-api/js-monitoring-commands.md +108 -0
- package/docs/js-api/js-monitors.md +55 -0
- package/docs/js-api/js-offline-cache-media-files.md +314 -0
- package/docs/js-api/js-offline-cache-simple-data.md +134 -0
- package/docs/js-api/js-sensors.md +70 -0
- package/docs/js-api/js-sync-playback.md +197 -0
- package/docs/js-api/js-timing.md +54 -0
- package/docs/js-api/js-video-inputs-internal-ports.md +149 -0
- package/docs/js-api/js-video-stream.md +230 -0
- package/docs/js-api/js-video.md +282 -0
- package/docs/management-api/1-js-management.md +133 -0
- package/docs/management-api/10-js-management-application.md +123 -0
- package/docs/management-api/11-js-management-network.md +185 -0
- package/docs/management-api/12-js-management-security.md +86 -0
- package/docs/management-api/13-js-management-wifi.md +357 -0
- package/docs/management-api/2-js-management-firmware.md +93 -0
- package/docs/management-api/3-js-management-remote-control.md +73 -0
- package/docs/management-api/4-js-management-power.md +94 -0
- package/docs/management-api/5-js-management-screen.md +263 -0
- package/docs/management-api/6-js-management-time.md +166 -0
- package/docs/management-api/7-js-management-volume.md +46 -0
- package/docs/management-api/8-js-management-package.md +62 -0
- package/docs/management-api/9-js-management-debug.md +53 -0
- package/es6/FrontApplet/Browser/Browser.d.ts +24 -0
- package/es6/FrontApplet/Browser/Browser.js +73 -0
- package/es6/FrontApplet/Browser/Browser.js.map +1 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +174 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js +55 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -0
- package/es6/FrontApplet/Browser/events.d.ts +15 -0
- package/es6/FrontApplet/Browser/events.js +14 -0
- package/es6/FrontApplet/Browser/events.js.map +1 -0
- package/es6/FrontApplet/Browser/messages.d.ts +5 -0
- package/es6/FrontApplet/Browser/messages.js +3 -0
- package/es6/FrontApplet/Browser/messages.js.map +1 -0
- package/es6/FrontApplet/Command/Command.d.ts +16 -0
- package/es6/FrontApplet/Command/Command.js +68 -0
- package/es6/FrontApplet/Command/Command.js.map +1 -0
- package/es6/FrontApplet/Command/ICommand.d.ts +4 -0
- package/es6/FrontApplet/Command/ICommand.js +3 -0
- package/es6/FrontApplet/Command/ICommand.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.js +3 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandEvent.js +3 -0
- package/es6/FrontApplet/Command/ICommandEvent.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandEventListener.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandEventListener.js +3 -0
- package/es6/FrontApplet/Command/ICommandEventListener.js.map +1 -0
- package/es6/FrontApplet/Debug/Debug.d.ts +22 -0
- package/es6/FrontApplet/Debug/Debug.js +35 -0
- package/es6/FrontApplet/Debug/Debug.js.map +1 -0
- package/es6/FrontApplet/Display/Display.d.ts +11 -0
- package/es6/FrontApplet/Display/Display.js +35 -0
- package/es6/FrontApplet/Display/Display.js.map +1 -0
- package/es6/FrontApplet/Error/AppletCommandError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletCommandError.js +11 -0
- package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletError.d.ts +7 -0
- package/es6/FrontApplet/Error/AppletError.js +10 -0
- package/es6/FrontApplet/Error/AppletError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletHardwareError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletHardwareError.js +11 -0
- package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.d.ts +8 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js +10 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletResourcesError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletResourcesError.js +11 -0
- package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletSecurityError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletSecurityError.js +11 -0
- package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletStreamError.d.ts +8 -0
- package/es6/FrontApplet/Error/AppletStreamError.js +10 -0
- package/es6/FrontApplet/Error/AppletStreamError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletVideoError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletVideoError.js +11 -0
- package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorCodes.d.ts +18 -0
- package/es6/FrontApplet/Error/ErrorCodes.js +23 -0
- package/es6/FrontApplet/Error/ErrorCodes.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.d.ts +3 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.js +22 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.d.ts +6 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js +10 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js.map +1 -0
- package/es6/FrontApplet/Error/FileNotFoundError.d.ts +8 -0
- package/es6/FrontApplet/Error/FileNotFoundError.js +10 -0
- package/es6/FrontApplet/Error/FileNotFoundError.js.map +1 -0
- package/es6/FrontApplet/Error/SosError.d.ts +20 -0
- package/es6/FrontApplet/Error/SosError.js +22 -0
- package/es6/FrontApplet/Error/SosError.js.map +1 -0
- package/es6/FrontApplet/Error/errorHelper.d.ts +12 -0
- package/es6/FrontApplet/Error/errorHelper.js +50 -0
- package/es6/FrontApplet/Error/errorHelper.js.map +1 -0
- package/es6/FrontApplet/Exchange/Exchange.d.ts +7 -0
- package/es6/FrontApplet/Exchange/Exchange.js +28 -0
- package/es6/FrontApplet/Exchange/Exchange.js.map +1 -0
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +30 -0
- package/es6/FrontApplet/FileSystem/FileSystem.js +210 -0
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.d.ts +4 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.js +3 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.js.map +1 -0
- package/es6/FrontApplet/FileSystem/types.d.ts +66 -0
- package/es6/FrontApplet/FileSystem/types.js +20 -0
- package/es6/FrontApplet/FileSystem/types.js.map +1 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.d.ts +6 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js +46 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -0
- package/es6/FrontApplet/FrontApplet.d.ts +56 -0
- package/es6/FrontApplet/FrontApplet.js +183 -0
- package/es6/FrontApplet/FrontApplet.js.map +1 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +30 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +92 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.d.ts +5 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.js +3 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/Hardware.d.ts +20 -0
- package/es6/FrontApplet/Hardware/Hardware.js +51 -0
- package/es6/FrontApplet/Hardware/Hardware.js.map +1 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.d.ts +6 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.js +3 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.d.ts +15 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js +11 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.d.ts +5 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.js +3 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/Led/Led.d.ts +11 -0
- package/es6/FrontApplet/Hardware/Led/Led.js +38 -0
- package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -0
- package/es6/FrontApplet/Hardware/SerialPort.d.ts +14 -0
- package/es6/FrontApplet/Hardware/SerialPort.js +45 -0
- package/es6/FrontApplet/Hardware/SerialPort.js.map +1 -0
- package/es6/FrontApplet/Hash/generator.d.ts +1 -0
- package/es6/FrontApplet/Hash/generator.js +10 -0
- package/es6/FrontApplet/Hash/generator.js.map +1 -0
- package/es6/FrontApplet/IMessage.d.ts +6 -0
- package/es6/FrontApplet/IMessage.js +3 -0
- package/es6/FrontApplet/IMessage.js.map +1 -0
- package/es6/FrontApplet/IPostMessage.d.ts +5 -0
- package/es6/FrontApplet/IPostMessage.js +3 -0
- package/es6/FrontApplet/IPostMessage.js.map +1 -0
- package/es6/FrontApplet/Iframe/Iframe.d.ts +24 -0
- package/es6/FrontApplet/Iframe/Iframe.js +51 -0
- package/es6/FrontApplet/Iframe/Iframe.js.map +1 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.d.ts +6 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.js +3 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.js.map +1 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +6 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js +3 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.d.ts +5 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.js +3 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.js.map +1 -0
- package/es6/FrontApplet/Input/Input.d.ts +20 -0
- package/es6/FrontApplet/Input/Input.js +35 -0
- package/es6/FrontApplet/Input/Input.js.map +1 -0
- package/es6/FrontApplet/Management/App.d.ts +37 -0
- package/es6/FrontApplet/Management/App.js +50 -0
- package/es6/FrontApplet/Management/App.js.map +1 -0
- package/es6/FrontApplet/Management/Audio.d.ts +9 -0
- package/es6/FrontApplet/Management/Audio.js +40 -0
- package/es6/FrontApplet/Management/Audio.js.map +1 -0
- package/es6/FrontApplet/Management/Debug.d.ts +11 -0
- package/es6/FrontApplet/Management/Debug.js +50 -0
- package/es6/FrontApplet/Management/Debug.js.map +1 -0
- package/es6/FrontApplet/Management/Firmware.d.ts +37 -0
- package/es6/FrontApplet/Management/Firmware.js +50 -0
- package/es6/FrontApplet/Management/Firmware.js.map +1 -0
- package/es6/FrontApplet/Management/FirmwareType.d.ts +4 -0
- package/es6/FrontApplet/Management/FirmwareType.js +8 -0
- package/es6/FrontApplet/Management/FirmwareType.js.map +1 -0
- package/es6/FrontApplet/Management/IBatteryStatus.d.ts +7 -0
- package/es6/FrontApplet/Management/IBatteryStatus.js +3 -0
- package/es6/FrontApplet/Management/IBatteryStatus.js.map +1 -0
- package/es6/FrontApplet/Management/IBrightness.d.ts +6 -0
- package/es6/FrontApplet/Management/IBrightness.js +3 -0
- package/es6/FrontApplet/Management/IBrightness.js.map +1 -0
- package/es6/FrontApplet/Management/INetworkInfo.d.ts +53 -0
- package/es6/FrontApplet/Management/INetworkInfo.js +17 -0
- package/es6/FrontApplet/Management/INetworkInfo.js.map +1 -0
- package/es6/FrontApplet/Management/IOrientation.d.ts +4 -0
- package/es6/FrontApplet/Management/IOrientation.js +3 -0
- package/es6/FrontApplet/Management/IOrientation.js.map +1 -0
- package/es6/FrontApplet/Management/IWifiEvent.d.ts +11 -0
- package/es6/FrontApplet/Management/IWifiEvent.js +12 -0
- package/es6/FrontApplet/Management/IWifiEvent.js.map +1 -0
- package/es6/FrontApplet/Management/Management.d.ts +44 -0
- package/es6/FrontApplet/Management/Management.js +113 -0
- package/es6/FrontApplet/Management/Management.js.map +1 -0
- package/es6/FrontApplet/Management/Network.d.ts +26 -0
- package/es6/FrontApplet/Management/Network.js +83 -0
- package/es6/FrontApplet/Management/Network.js.map +1 -0
- package/es6/FrontApplet/Management/Package.d.ts +8 -0
- package/es6/FrontApplet/Management/Package.js +38 -0
- package/es6/FrontApplet/Management/Package.js.map +1 -0
- package/es6/FrontApplet/Management/Power.d.ts +13 -0
- package/es6/FrontApplet/Management/Power.js +78 -0
- package/es6/FrontApplet/Management/Power.js.map +1 -0
- package/es6/FrontApplet/Management/RemoteControl.d.ts +14 -0
- package/es6/FrontApplet/Management/RemoteControl.js +61 -0
- package/es6/FrontApplet/Management/RemoteControl.js.map +1 -0
- package/es6/FrontApplet/Management/Screen.d.ts +18 -0
- package/es6/FrontApplet/Management/Screen.js +114 -0
- package/es6/FrontApplet/Management/Screen.js.map +1 -0
- package/es6/FrontApplet/Management/Security.d.ts +21 -0
- package/es6/FrontApplet/Management/Security.js +56 -0
- package/es6/FrontApplet/Management/Security.js.map +1 -0
- package/es6/FrontApplet/Management/Time.d.ts +16 -0
- package/es6/FrontApplet/Management/Time.js +59 -0
- package/es6/FrontApplet/Management/Time.js.map +1 -0
- package/es6/FrontApplet/Management/Wifi.d.ts +29 -0
- package/es6/FrontApplet/Management/Wifi.js +151 -0
- package/es6/FrontApplet/Management/Wifi.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.d.ts +21 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js +16 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.d.ts +2 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js +21 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.d.ts +25 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.js +23 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.d.ts +5 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js +35 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.d.ts +4 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.js +8 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.js.map +1 -0
- package/es6/FrontApplet/Monitors/Monitors.d.ts +16 -0
- package/es6/FrontApplet/Monitors/Monitors.js +31 -0
- package/es6/FrontApplet/Monitors/Monitors.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/Cache.d.ts +38 -0
- package/es6/FrontApplet/Offline/Cache/Cache.js +199 -0
- package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IFile.d.ts +4 -0
- package/es6/FrontApplet/Offline/Cache/IFile.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IFile.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.d.ts +6 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.d.ts +4 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.d.ts +6 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +12 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +47 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.d.ts +16 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.js +8 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.d.ts +12 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.js +3 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +7 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.js +3 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.js.map +1 -0
- package/es6/FrontApplet/Offline/IAddFont.d.ts +50 -0
- package/es6/FrontApplet/Offline/IAddFont.js +22 -0
- package/es6/FrontApplet/Offline/IAddFont.js.map +1 -0
- package/es6/FrontApplet/Offline/IElement.d.ts +7 -0
- package/es6/FrontApplet/Offline/IElement.js +6 -0
- package/es6/FrontApplet/Offline/IElement.js.map +1 -0
- package/es6/FrontApplet/Offline/IFileType.d.ts +3 -0
- package/es6/FrontApplet/Offline/IFileType.js +4 -0
- package/es6/FrontApplet/Offline/IFileType.js.map +1 -0
- package/es6/FrontApplet/Offline/ISaveFile.d.ts +49 -0
- package/es6/FrontApplet/Offline/ISaveFile.js +26 -0
- package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.d.ts +7 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js +26 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.d.ts +8 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.js +3 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.d.ts +8 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.js +3 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.d.ts +7 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js +25 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/Offline.d.ts +27 -0
- package/es6/FrontApplet/Offline/Offline.js +105 -0
- package/es6/FrontApplet/Offline/Offline.js.map +1 -0
- package/es6/FrontApplet/Offline/Types.d.ts +7 -0
- package/es6/FrontApplet/Offline/Types.js +9 -0
- package/es6/FrontApplet/Offline/Types.js.map +1 -0
- package/es6/FrontApplet/Sensors/Proximity.d.ts +16 -0
- package/es6/FrontApplet/Sensors/Proximity.js +36 -0
- package/es6/FrontApplet/Sensors/Proximity.js.map +1 -0
- package/es6/FrontApplet/Sensors/Sensors.d.ts +11 -0
- package/es6/FrontApplet/Sensors/Sensors.js +18 -0
- package/es6/FrontApplet/Sensors/Sensors.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamEvent.d.ts +6 -0
- package/es6/FrontApplet/Stream/IStreamEvent.js +3 -0
- package/es6/FrontApplet/Stream/IStreamEvent.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.d.ts +5 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.js +3 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamMessage.d.ts +6 -0
- package/es6/FrontApplet/Stream/IStreamMessage.js +3 -0
- package/es6/FrontApplet/Stream/IStreamMessage.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamProperties.d.ts +10 -0
- package/es6/FrontApplet/Stream/IStreamProperties.js +3 -0
- package/es6/FrontApplet/Stream/IStreamProperties.js.map +1 -0
- package/es6/FrontApplet/Stream/Stream.d.ts +22 -0
- package/es6/FrontApplet/Stream/Stream.js +131 -0
- package/es6/FrontApplet/Stream/Stream.js.map +1 -0
- package/es6/FrontApplet/Stream/StreamProtocol.d.ts +9 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js +13 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -0
- package/es6/FrontApplet/Stream/streamEvents.d.ts +8 -0
- package/es6/FrontApplet/Stream/streamEvents.js +3 -0
- package/es6/FrontApplet/Stream/streamEvents.js.map +1 -0
- package/es6/FrontApplet/Sync/ISyncEvent.d.ts +4 -0
- package/es6/FrontApplet/Sync/ISyncEvent.js +3 -0
- package/es6/FrontApplet/Sync/ISyncEvent.js.map +1 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.d.ts +7 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.js +3 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.js.map +1 -0
- package/es6/FrontApplet/Sync/Sync.d.ts +20 -0
- package/es6/FrontApplet/Sync/Sync.js +102 -0
- package/es6/FrontApplet/Sync/Sync.js.map +1 -0
- package/es6/FrontApplet/Sync/syncEvents.d.ts +6 -0
- package/es6/FrontApplet/Sync/syncEvents.js +3 -0
- package/es6/FrontApplet/Sync/syncEvents.js.map +1 -0
- package/es6/FrontApplet/Timing/Timing.d.ts +10 -0
- package/es6/FrontApplet/Timing/Timing.js +16 -0
- package/es6/FrontApplet/Timing/Timing.js.map +1 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.d.ts +2 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.js +4 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.js.map +1 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.d.ts +11 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js +33 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.d.ts +6 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.js +3 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.js.map +1 -0
- package/es6/FrontApplet/Touch/Touch.d.ts +13 -0
- package/es6/FrontApplet/Touch/Touch.js +54 -0
- package/es6/FrontApplet/Touch/Touch.js.map +1 -0
- package/es6/FrontApplet/Validate/Validate.d.ts +43 -0
- package/es6/FrontApplet/Validate/Validate.js +266 -0
- package/es6/FrontApplet/Validate/Validate.js.map +1 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.d.ts +8 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js +140 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoEvent.d.ts +8 -0
- package/es6/FrontApplet/Video/IVideoEvent.js +6 -0
- package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoEventListener.d.ts +5 -0
- package/es6/FrontApplet/Video/IVideoEventListener.js +3 -0
- package/es6/FrontApplet/Video/IVideoEventListener.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoMessage.d.ts +4 -0
- package/es6/FrontApplet/Video/IVideoMessage.js +3 -0
- package/es6/FrontApplet/Video/IVideoMessage.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoProperties.d.ts +8 -0
- package/es6/FrontApplet/Video/IVideoProperties.js +3 -0
- package/es6/FrontApplet/Video/IVideoProperties.js.map +1 -0
- package/es6/FrontApplet/Video/Video.d.ts +39 -0
- package/es6/FrontApplet/Video/Video.js +242 -0
- package/es6/FrontApplet/Video/Video.js.map +1 -0
- package/es6/FrontApplet/createFrontApplet.d.ts +2 -0
- package/es6/FrontApplet/createFrontApplet.js +9 -0
- package/es6/FrontApplet/createFrontApplet.js.map +1 -0
- package/es6/Monitoring/Console/consoleCommands.d.ts +6 -0
- package/es6/Monitoring/Console/consoleCommands.js +4 -0
- package/es6/Monitoring/Console/consoleCommands.js.map +1 -0
- package/es6/Monitoring/Html/htmlCommands.d.ts +9 -0
- package/es6/Monitoring/Html/htmlCommands.js +5 -0
- package/es6/Monitoring/Html/htmlCommands.js.map +1 -0
- package/es6/Monitoring/Montoring.d.ts +12 -0
- package/es6/Monitoring/Montoring.js +159 -0
- package/es6/Monitoring/Montoring.js.map +1 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.d.ts +20 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.js +7 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.js.map +1 -0
- package/es6/Monitoring/Timing/timingCommands.d.ts +4 -0
- package/es6/Monitoring/Timing/timingCommands.js +4 -0
- package/es6/Monitoring/Timing/timingCommands.js.map +1 -0
- package/es6/Monitoring/Video/videoCommands.d.ts +10 -0
- package/es6/Monitoring/Video/videoCommands.js +4 -0
- package/es6/Monitoring/Video/videoCommands.js.map +1 -0
- package/es6/Monitoring/monitoringCommands.d.ts +8 -0
- package/es6/Monitoring/monitoringCommands.js +5 -0
- package/es6/Monitoring/monitoringCommands.js.map +1 -0
- package/es6/Sensors/IButton.d.ts +9 -0
- package/es6/Sensors/IButton.js +8 -0
- package/es6/Sensors/IButton.js.map +1 -0
- package/es6/Sensors/IRfidAntenna.d.ts +10 -0
- package/es6/Sensors/IRfidAntenna.js +8 -0
- package/es6/Sensors/IRfidAntenna.js.map +1 -0
- package/es6/bundle.d.ts +12 -0
- package/es6/bundle.js +13 -0
- package/es6/bundle.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Browser
|
|
3
|
+
author: Miroslav Behina
|
|
4
|
+
date: 22.11.2018
|
|
5
|
+
type: js-api
|
|
6
|
+
tags:
|
|
7
|
+
- applet
|
|
8
|
+
- applet_api
|
|
9
|
+
- api
|
|
10
|
+
- js_api
|
|
11
|
+
description: "[Content JS API] There are several use-cases when you need to open a web browser on a touch-enabled device (also known as a tablet). For these cases, you can use a custom web browser we built."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Browser
|
|
15
|
+
|
|
16
|
+
There are several use-cases when you need to open a web browser on a touch-enabled device (also known as a tablet).
|
|
17
|
+
For these cases, you can use a custom web browser we built.
|
|
18
|
+
Default URL can be opened and even the whitelisting/blacklisting of certain domains is supported.
|
|
19
|
+
|
|
20
|
+
## All methods
|
|
21
|
+
::: table-responsive
|
|
22
|
+
| Methods | Description | Supported since |
|
|
23
|
+
| ----------------- | ----------- | ----- | :---------------: |
|
|
24
|
+
| `openLink()` | **Deprecated:** Use `open()` instead. | 1.0.19 |
|
|
25
|
+
| `open()` | Open page in integrated browser | 4.0.0 |
|
|
26
|
+
| `close()` | Open page in integrated browser | 4.4.0 |
|
|
27
|
+
:::
|
|
28
|
+
|
|
29
|
+
## open()
|
|
30
|
+
|
|
31
|
+
::: alert alert--info
|
|
32
|
+
**This API is currently available on:**
|
|
33
|
+
- Android devices with Android 5+ (Philips, Benq, Sharp, generic Android device)
|
|
34
|
+
|
|
35
|
+
**With some limitation you can use this API also on**
|
|
36
|
+
- Samsung Tizen (SSSP 4 and above); where the website is just in fullscreen without any addressbar or theme options
|
|
37
|
+
- LG webOS (webOS 3.0 and above); where the website is just in fullscreen without any addressbar or theme options
|
|
38
|
+
- Raspberry Pi and NEC Compute Module; where the website is just in fullscreen without any addressbar or theme options
|
|
39
|
+
:::
|
|
40
|
+
|
|
41
|
+
### Javascript
|
|
42
|
+
Simple opening some page ex. our main company page.
|
|
43
|
+
```javascript
|
|
44
|
+
sos.browser.open('https://www.signageos.io'); // Open link in the browser
|
|
45
|
+
```
|
|
46
|
+
<br>
|
|
47
|
+
|
|
48
|
+
Method `open()` also supports properties for browser. You can set height, width or CORS domains. All properties are optional.
|
|
49
|
+
|
|
50
|
+
::: table-responsive
|
|
51
|
+
| Property | Type | Description |
|
|
52
|
+
| -------- | ------ | -------- |
|
|
53
|
+
| `aclDomains` | Array | ? |
|
|
54
|
+
| `aclMode` | String | Can be only **blacklist** or **whitelist**. |
|
|
55
|
+
| `readOnlyAddressBar` | Boolean | Accessible address bar |
|
|
56
|
+
| `coordinates` | Object | Size of browser screen (only Raspberry Pi) |
|
|
57
|
+
| `idleTimeout` | Number | Timeout in milliseconds for loading page |
|
|
58
|
+
| `theme` | Object | Setting custom theme for Android |
|
|
59
|
+
:::
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
```javascript
|
|
63
|
+
sos.browser.open('https://www.signageos.io', {
|
|
64
|
+
aclDomains: ['google.com', 'yahoo.com'],
|
|
65
|
+
aclMode: 'blacklist', // or 'whitelist'
|
|
66
|
+
readOnlyAddressBar: true,
|
|
67
|
+
coordinates: { // Supported only on Raspberry Pi
|
|
68
|
+
x: 0,
|
|
69
|
+
y: 0,
|
|
70
|
+
height: 500,
|
|
71
|
+
width: 500,
|
|
72
|
+
},
|
|
73
|
+
// theme: { ... } // supported only on Android
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
77
|
+
<div class="col-12 d-flex">
|
|
78
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/browser">
|
|
79
|
+
<div>
|
|
80
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
81
|
+
<i class="fab fa-github svg-black"></i>
|
|
82
|
+
</div>
|
|
83
|
+
<div>
|
|
84
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Example of Applet for using browser on Android</h3>
|
|
85
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</a>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
### Browser themes usage with Typescript
|
|
93
|
+
You can also use all these methods with [signageOS TypeScript](/knowledge-base/dev-tools-cli-typescript).
|
|
94
|
+
|
|
95
|
+
::: alert alert--info
|
|
96
|
+
Browser themes are only available on Android devices.
|
|
97
|
+
:::
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
type Color = string;
|
|
101
|
+
|
|
102
|
+
export type ITheme = {
|
|
103
|
+
base?: 'light' | 'dark'; // Default light
|
|
104
|
+
shape?: {
|
|
105
|
+
cornerSize?: number; // Default 2
|
|
106
|
+
};
|
|
107
|
+
colors?: {
|
|
108
|
+
primary?: Color;
|
|
109
|
+
background?: Color;
|
|
110
|
+
control?: Color;
|
|
111
|
+
};
|
|
112
|
+
widgets?: {
|
|
113
|
+
editAddress?: {
|
|
114
|
+
colors?: {
|
|
115
|
+
background?: Color;
|
|
116
|
+
text?: Color;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
buttonClose?: {
|
|
120
|
+
colors?: {
|
|
121
|
+
background?: Color | '@primary';
|
|
122
|
+
text?: Color;
|
|
123
|
+
icon?: Color;
|
|
124
|
+
};
|
|
125
|
+
icon?: 'none' | 'exit_to_app' | 'close' | 'cancel';
|
|
126
|
+
text?: string;
|
|
127
|
+
};
|
|
128
|
+
progress?: {
|
|
129
|
+
color?: Color | '@primary';
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
interface IOpenLinkOptions {
|
|
135
|
+
aclDomains?: string[];
|
|
136
|
+
aclMode?: 'blacklist' | 'whitelist';
|
|
137
|
+
readOnlyAddressBar?: boolean;
|
|
138
|
+
coordinates?: {
|
|
139
|
+
x: number;
|
|
140
|
+
y: number;
|
|
141
|
+
width: number;
|
|
142
|
+
height: number;
|
|
143
|
+
};
|
|
144
|
+
theme?: ITheme; // supported since 5.0.0
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
open(uri: string, options?: IOpenLinkOptions): void;
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## close()
|
|
151
|
+
|
|
152
|
+
Closing the Browser instance. The whole page is closed. If you call `open()` again, the page will be loaded from the beginning.
|
|
153
|
+
|
|
154
|
+
### Javascript
|
|
155
|
+
Simple opening some page ex. our main company page.
|
|
156
|
+
```javascript
|
|
157
|
+
sos.browser.close(); // Close the browser
|
|
158
|
+
```
|
|
159
|
+
<br>
|
|
160
|
+
|
|
161
|
+
## Errors
|
|
162
|
+
Although we are doing our best, following errors may occur when opening a link.
|
|
163
|
+
|
|
164
|
+
::: table-responsive
|
|
165
|
+
| Code | Type | Message |
|
|
166
|
+
| ---- | ---- | ------- |
|
|
167
|
+
| 40301 | AppletBrowserUriError | Property argument `uri` must be a string |
|
|
168
|
+
| 50301 | InternalBrowserOpenLinkError | Unexpected error occurred when opening `$$LINK$$` |
|
|
169
|
+
:::
|
|
170
|
+
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Command
|
|
3
|
+
author: Miroslav Behina
|
|
4
|
+
date: 22.11.2018
|
|
5
|
+
type: js-api
|
|
6
|
+
tags:
|
|
7
|
+
- applet
|
|
8
|
+
- applet_api
|
|
9
|
+
- api
|
|
10
|
+
- js_api
|
|
11
|
+
description: "[Content JS API] In some cases, you might be interested in a complete log of what the device was doing during its operation. All of your business or technical logs can be stored in our storage for later usage. You can identify which events happened or even trigger self-repairing logic."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Command
|
|
15
|
+
|
|
16
|
+
In some cases, you might be interested in a complete log of what the device was doing during its operation. All of your business or technical logs can be stored in our storage for later usage. You can identify which events happened or even trigger self-repairing logic.
|
|
17
|
+
|
|
18
|
+
All commands will be available in [Applet Command REST API](https://api.docs.signageos.io/#8e7a8814-e612-1fad-0152-72f37591c7f2) and can be downloaded [historically as CSV export](https://api.docs.signageos.io/#5dceec58-ac4f-7a0c-f5ef-0854f9376e6d).
|
|
19
|
+
|
|
20
|
+
## All methods
|
|
21
|
+
::: table-responsive
|
|
22
|
+
| Methods | Description | Supported since |
|
|
23
|
+
| ----------------- | ----------- | ----- |
|
|
24
|
+
| `dispatch()` | Dispatch method for sending logs and data from device | 1.0.3 |
|
|
25
|
+
| `onCommand()` | Event listener for incoming commands from server | 1.0.3 |
|
|
26
|
+
|
|
27
|
+
:::
|
|
28
|
+
|
|
29
|
+
## dispatch()
|
|
30
|
+
|
|
31
|
+
Dispatch() is used for sending your custom logs or data from device to signageOS.
|
|
32
|
+
|
|
33
|
+
### Parameters
|
|
34
|
+
::: table-responsive
|
|
35
|
+
| Parameter | Type | Required | Description |
|
|
36
|
+
| -------------- | -------------| :----------------: | ------------- |
|
|
37
|
+
| `type` | String | <div class="red">Yes</div> | Event type; can be any string **up to 100 characters**|
|
|
38
|
+
| custom `parameter` | String | No | Custom parameters and values that you need to be dispatched |
|
|
39
|
+
:::
|
|
40
|
+
|
|
41
|
+
### Javascript example
|
|
42
|
+
```javascript
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
Example of dispatching information about file download
|
|
46
|
+
*/
|
|
47
|
+
await sos.command.dispatch({
|
|
48
|
+
type: 'Files.StartLoading', // mandatory *type* with custom value
|
|
49
|
+
fileName: 'my-file', // custom parameter and value
|
|
50
|
+
fileType: 'txt' // custom parameter and value
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
Example of dispatching applet heartbeat
|
|
55
|
+
*/
|
|
56
|
+
await sos.command.dispatch({
|
|
57
|
+
type: 'Heartbeat' // mandatory *type* with custom value
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/*
|
|
61
|
+
Example of dispatching applet new data
|
|
62
|
+
*/
|
|
63
|
+
const myCMSJSON = {playlist: "myPlaylist", items: [...]};
|
|
64
|
+
|
|
65
|
+
await sos.command.dispatch({
|
|
66
|
+
type: 'Content.update', // mandatory *type* with custom value
|
|
67
|
+
content: JSON.stringify(myCMSJSON) // custom parameter and value
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
74
|
+
<div class="col-12 d-flex">
|
|
75
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/sending/">
|
|
76
|
+
<div>
|
|
77
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
78
|
+
<i class="fab fa-github svg-black"></i>
|
|
79
|
+
</div>
|
|
80
|
+
<div>
|
|
81
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Sending commands</h3>
|
|
82
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</a>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
### Errors
|
|
90
|
+
::: table-responsive
|
|
91
|
+
| Code | Type | Message |
|
|
92
|
+
| ---- | ---- | ------- |
|
|
93
|
+
| 40401 | AppletCommandTypeError | Type contains invalid characters. |
|
|
94
|
+
| 40402 | AppletCommandTypeError | Type is longer then 100 characters. |
|
|
95
|
+
| 40403 | AppletCommandTypeError | Command type must be a string. |
|
|
96
|
+
:::
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### Usage with Typescript
|
|
100
|
+
```typescript
|
|
101
|
+
interface ICommand {
|
|
102
|
+
type: string;
|
|
103
|
+
}
|
|
104
|
+
dispatch(command: ICommand): void;
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
108
|
+
<div class="col-12 d-flex">
|
|
109
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" href="https://api.docs.signageos.io/#8e7a8814-e612-1fad-0152-72f37591c7f2">
|
|
110
|
+
<div>
|
|
111
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
112
|
+
<i class="fas fa-server svg-black"></i>
|
|
113
|
+
</div>
|
|
114
|
+
<div>
|
|
115
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Rest API: Get Commands</h3>
|
|
116
|
+
<div class="wide-box__description">Receiving your data dispatched from devices</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</a>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
124
|
+
<div class="col-12 d-flex">
|
|
125
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" href="https://api.docs.signageos.io/#5dceec58-ac4f-7a0c-f5ef-0854f9376e6d">
|
|
126
|
+
<div>
|
|
127
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
128
|
+
<i class="fas fa-server svg-black"></i>
|
|
129
|
+
</div>
|
|
130
|
+
<div>
|
|
131
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Rest API: Monitoring/Device Reports</h3>
|
|
132
|
+
<div class="wide-box__description">Receiving historical data</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</a>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
## onCommand()
|
|
140
|
+
Used for sending custom messages to online connected devices.
|
|
141
|
+
This can be done through the REST API by [POST new applet command](https://api.docs.signageos.io/#511e18f3-b61b-a049-6395-8541132adc44).
|
|
142
|
+
The command will be dispatched to the device & the applet can set up the logic by subscribing `onCommand` method.
|
|
143
|
+
|
|
144
|
+
**Parameters:**
|
|
145
|
+
::: table-responsive
|
|
146
|
+
| Param | Type | Required | Description |
|
|
147
|
+
| -------------- | ---------- | :-------: | ---------------------- |
|
|
148
|
+
| `command` | object | <div class="red">Yes</div> | Any JS object with required property type. |
|
|
149
|
+
| `append` | HTMLElement | <div class="red">Yes</div> | Type property must be string not longer then 50 characters and must contain only characters a-zA-Z0-9_- and . |
|
|
150
|
+
:::
|
|
151
|
+
|
|
152
|
+
### Javascript
|
|
153
|
+
```javascript
|
|
154
|
+
sos.command.onCommand((command) => {
|
|
155
|
+
// ... logic
|
|
156
|
+
});
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
160
|
+
<div class="col-12 d-flex">
|
|
161
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/receiving">
|
|
162
|
+
<div>
|
|
163
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
164
|
+
<i class="fab fa-github svg-black"></i>
|
|
165
|
+
</div>
|
|
166
|
+
<div>
|
|
167
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Receiving commands</h3>
|
|
168
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</a>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
### Usage with Typescript
|
|
176
|
+
```typescript
|
|
177
|
+
interface ICommand {
|
|
178
|
+
type: string;
|
|
179
|
+
}
|
|
180
|
+
onCommand(listener: (command: ICommand) => void): void;
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
184
|
+
<div class="col-12 d-flex">
|
|
185
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" href="https://api.docs.signageos.io/#511e18f3-b61b-a049-6395-8541132adc44">
|
|
186
|
+
<div>
|
|
187
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
188
|
+
<i class="fas fa-server svg-black"></i>
|
|
189
|
+
</div>
|
|
190
|
+
<div>
|
|
191
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Rest API: Monitoring</h3>
|
|
192
|
+
<div class="wide-box__description">Creating monitoring data</div>
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
195
|
+
</a>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
## Errors
|
|
200
|
+
Although we are doing our best, following errors may occur when working with the commands.
|
|
201
|
+
|
|
202
|
+
::: table-responsive
|
|
203
|
+
| Code | Type | Message |
|
|
204
|
+
| ---- | ---- | ------- |
|
|
205
|
+
| 40401 | AppletCommandTypeError | Type contains invalid characters, allowed are `/^[a-zA-Z0-9\.\-_]+$/g`|
|
|
206
|
+
| 40402 | AppletCommandTypeError | Type is longer then 100 characters. |
|
|
207
|
+
| 40403 | AppletCommandTypeError | Command type must be a string. |
|
|
208
|
+
:::
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Display
|
|
3
|
+
author: Michal Artazov
|
|
4
|
+
date: 12.4.2021
|
|
5
|
+
type: js-api
|
|
6
|
+
tags:
|
|
7
|
+
- applet
|
|
8
|
+
- applet_api
|
|
9
|
+
- api
|
|
10
|
+
- display
|
|
11
|
+
- js_api
|
|
12
|
+
description: "[Content JS API] Display API allows you to query the display to find out, which features it supports."
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Display
|
|
16
|
+
|
|
17
|
+
Display API allows you to query the display to find out, which features it supports.
|
|
18
|
+
That way your applet can handle cases, when a certain feature isn't supported by a particular display.
|
|
19
|
+
|
|
20
|
+
## All methods
|
|
21
|
+
|
|
22
|
+
::: table-responsive
|
|
23
|
+
| Method | Description | Supported since |
|
|
24
|
+
| ------------------ | ---------------------- | :-------------: |
|
|
25
|
+
| `supports()` | Query, whether a certain feature is supported by the display | 3.1.0 |
|
|
26
|
+
:::
|
|
27
|
+
|
|
28
|
+
## supports()
|
|
29
|
+
|
|
30
|
+
Query the display to find out, whether a certain feature is supported.
|
|
31
|
+
To let you know, when you should call this method, we will warn you throughout the content JS API documentation
|
|
32
|
+
with a warning message like this one:
|
|
33
|
+
|
|
34
|
+
::: alert alert--warning
|
|
35
|
+
* Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
|
|
36
|
+
* More info [**HERE**](/api/js/content/js-display#supports).
|
|
37
|
+
:::
|
|
38
|
+
|
|
39
|
+
::: table-responsive
|
|
40
|
+
| Param | Type | Required | Description |
|
|
41
|
+
| ------------ | ------ | :------------------------: | --------------- |
|
|
42
|
+
| `capability` | string | <div class="red">Yes</div> | Capability name |
|
|
43
|
+
:::
|
|
44
|
+
|
|
45
|
+
### Javascript example
|
|
46
|
+
```javascript
|
|
47
|
+
const serialPort = await sos.display.supports("SERIAL");
|
|
48
|
+
```
|