@signageos/front-applet 7.2.0 → 8.0.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/dist/bundle.js +8 -4
- package/dist/bundle.js.map +1 -1
- package/docs/fpath/index.md +316 -0
- package/docs/index.md +18 -85
- package/docs/sos/browser.md +210 -0
- package/docs/sos/command.md +68 -0
- package/docs/sos/debug.md +25 -0
- package/docs/sos/deviceInfo.md +49 -0
- package/docs/sos/display.md +21 -0
- package/docs/sos/fileSystem.md +594 -0
- package/docs/sos/hardware/barcodeScanner.md +40 -0
- package/docs/sos/hardware/index.md +64 -0
- package/docs/sos/hardware/led.md +14 -0
- package/docs/sos/index.md +82 -0
- package/docs/sos/input.md +73 -0
- package/docs/sos/monitors.md +21 -0
- package/docs/sos/native/index.md +5 -0
- package/docs/sos/native/mdc.md +240 -0
- package/docs/sos/offline/cache.md +183 -0
- package/docs/sos/offline/index.md +188 -0
- package/docs/sos/osd.md +13 -0
- package/docs/sos/proofOfPlay.md +37 -0
- package/docs/sos/stream.md +960 -0
- package/docs/sos/sync.md +298 -0
- package/docs/sos/video.md +285 -0
- package/docs/sos_management/app.md +102 -0
- package/docs/sos_management/audio.md +29 -0
- package/docs/sos_management/debug.md +33 -0
- package/docs/sos_management/firmware.md +86 -0
- package/docs/sos_management/index.md +212 -0
- package/docs/sos_management/network.md +197 -0
- package/docs/sos_management/os.md +54 -0
- package/docs/sos_management/package.md +33 -0
- package/docs/sos_management/power.md +136 -0
- package/docs/sos_management/proxy.md +41 -0
- package/docs/sos_management/remoteControl.md +72 -0
- package/docs/sos_management/screen.md +198 -0
- package/docs/sos_management/security.md +47 -0
- package/docs/sos_management/time.md +101 -0
- package/docs/sos_management/wifi.md +366 -0
- package/es6/FrontApplet/Browser/Browser.d.ts +61 -8
- package/es6/FrontApplet/Browser/Browser.js +91 -39
- package/es6/FrontApplet/Browser/Browser.js.map +1 -1
- package/es6/FrontApplet/Browser/events.js +2 -2
- package/es6/FrontApplet/Browser/events.js.map +1 -1
- package/es6/FrontApplet/Command/Command.d.ts +37 -3
- package/es6/FrontApplet/Command/Command.js +49 -20
- package/es6/FrontApplet/Command/Command.js.map +1 -1
- package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -2
- package/es6/FrontApplet/Connect/Connect.d.ts +3 -0
- package/es6/FrontApplet/Connect/Connect.js +55 -7
- package/es6/FrontApplet/Connect/Connect.js.map +1 -1
- package/es6/FrontApplet/Connect/IConnectMessage.d.ts +1 -1
- package/es6/FrontApplet/Debug/Debug.d.ts +15 -1
- package/es6/FrontApplet/Debug/Debug.js +27 -17
- package/es6/FrontApplet/Debug/Debug.js.map +1 -1
- package/es6/FrontApplet/Debug/debugDecorator.d.ts +3 -3
- package/es6/FrontApplet/Debug/debugDecorator.js +13 -7
- package/es6/FrontApplet/Debug/debugDecorator.js.map +1 -1
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +23 -0
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +36 -27
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
- package/es6/FrontApplet/Dimensions/coordinationsHelper.js +1 -2
- package/es6/FrontApplet/Dimensions/coordinationsHelper.js.map +1 -1
- package/es6/FrontApplet/Display/Display.d.ts +25 -3
- package/es6/FrontApplet/Display/Display.js +35 -19
- package/es6/FrontApplet/Display/Display.js.map +1 -1
- package/es6/FrontApplet/Display/IDisplay.d.ts +3 -1
- package/es6/FrontApplet/Error/AppletCommandError.js +12 -3
- package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletError.js +10 -2
- package/es6/FrontApplet/Error/AppletError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletHardwareError.js +12 -3
- package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js +10 -2
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletResourcesError.js +12 -3
- package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletSecurityError.js +12 -3
- package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletStreamError.js +10 -2
- package/es6/FrontApplet/Error/AppletStreamError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletVideoError.js +12 -3
- package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -1
- package/es6/FrontApplet/Error/ErrorCodesMessages.js +4 -1
- package/es6/FrontApplet/Error/ErrorCodesMessages.js.map +1 -1
- package/es6/FrontApplet/Error/ErrorSuggestions.js +1 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js.map +1 -1
- package/es6/FrontApplet/Error/FileNotFoundError.js +10 -2
- package/es6/FrontApplet/Error/FileNotFoundError.js.map +1 -1
- package/es6/FrontApplet/Error/SosError.js +4 -0
- package/es6/FrontApplet/Error/SosError.js.map +1 -1
- package/es6/FrontApplet/Error/errorHelper.js +5 -6
- package/es6/FrontApplet/Error/errorHelper.js.map +1 -1
- package/es6/FrontApplet/Exchange/Exchange.js +7 -14
- package/es6/FrontApplet/Exchange/Exchange.js.map +1 -1
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +156 -1
- package/es6/FrontApplet/FileSystem/FileSystem.js +316 -193
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
- package/es6/FrontApplet/FileSystem/HashAlgorithm.d.ts +2 -0
- package/es6/FrontApplet/{Stream/streamListeners.js → FileSystem/HashAlgorithm.js} +1 -1
- package/es6/FrontApplet/FileSystem/HashAlgorithm.js.map +1 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -1
- package/es6/FrontApplet/FrontApplet.d.ts +55 -4
- package/es6/FrontApplet/FrontApplet.js +124 -47
- package/es6/FrontApplet/FrontApplet.js.map +1 -1
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +2 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +35 -54
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
- package/es6/FrontApplet/Hardware/Hardware.d.ts +16 -2
- package/es6/FrontApplet/Hardware/Hardware.js +31 -19
- package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
- package/es6/FrontApplet/Hardware/IHardware.d.ts +2 -2
- package/es6/FrontApplet/Hardware/ISerialPort.d.ts +16 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js +1 -1
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -1
- package/es6/FrontApplet/Hardware/Led/Led.d.ts +8 -0
- package/es6/FrontApplet/Hardware/Led/Led.js +20 -18
- package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -1
- package/es6/FrontApplet/Hardware/SerialPort.d.ts +1 -1
- package/es6/FrontApplet/Hardware/SerialPort.js +15 -23
- package/es6/FrontApplet/Hardware/SerialPort.js.map +1 -1
- package/es6/FrontApplet/Hash/generator.js +1 -2
- package/es6/FrontApplet/Hash/generator.js.map +1 -1
- package/es6/FrontApplet/Iframe/Iframe.d.ts +9 -8
- package/es6/FrontApplet/Iframe/Iframe.js +10 -0
- package/es6/FrontApplet/Iframe/Iframe.js.map +1 -1
- package/es6/FrontApplet/Input/IInput.d.ts +1 -2
- package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +32 -2
- package/es6/FrontApplet/Input/IKeyUpEvent.js +32 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -1
- package/es6/FrontApplet/Input/Input.d.ts +19 -3
- package/es6/FrontApplet/Input/Input.js +43 -22
- package/es6/FrontApplet/Input/Input.js.map +1 -1
- package/es6/FrontApplet/Management/App/App.d.ts +48 -10
- package/es6/FrontApplet/Management/App/App.js +45 -30
- package/es6/FrontApplet/Management/App/App.js.map +1 -1
- package/es6/FrontApplet/Management/App/IApp.d.ts +3 -1
- package/es6/FrontApplet/Management/Audio/Audio.d.ts +16 -0
- package/es6/FrontApplet/Management/Audio/Audio.js +30 -22
- package/es6/FrontApplet/Management/Audio/Audio.js.map +1 -1
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.d.ts +4 -0
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js +15 -22
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js +4 -1
- package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/Debug/Debug.d.ts +19 -0
- package/es6/FrontApplet/Management/Debug/Debug.js +37 -30
- package/es6/FrontApplet/Management/Debug/Debug.js.map +1 -1
- package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +37 -10
- package/es6/FrontApplet/Management/Firmware/Firmware.js +34 -30
- package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
- package/es6/FrontApplet/Management/Firmware/IFirmware.d.ts +1 -2
- package/es6/FrontApplet/Management/IManagement.d.ts +3 -1
- package/es6/FrontApplet/Management/Management.d.ts +106 -15
- package/es6/FrontApplet/Management/Management.js +191 -113
- package/es6/FrontApplet/Management/Management.js.map +1 -1
- package/es6/FrontApplet/Management/Network/INetworkInfo.d.ts +1 -1
- package/es6/FrontApplet/Management/Network/Network.d.ts +56 -8
- package/es6/FrontApplet/Management/Network/Network.js +85 -67
- package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
- package/es6/FrontApplet/Management/OS/OS.d.ts +20 -0
- package/es6/FrontApplet/Management/OS/OS.js +34 -27
- package/es6/FrontApplet/Management/OS/OS.js.map +1 -1
- package/es6/FrontApplet/Management/Package/Package.d.ts +20 -0
- package/es6/FrontApplet/Management/Package/Package.js +37 -22
- package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
- package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js +4 -1
- package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.d.ts +4 -0
- package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js +15 -22
- package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/Power/Power.d.ts +64 -0
- package/es6/FrontApplet/Management/Power/Power.js +160 -115
- package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
- package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +21 -0
- package/es6/FrontApplet/Management/Proxy/Proxy.js +41 -35
- package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +43 -0
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +63 -39
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
- package/es6/FrontApplet/Management/Screen/Screen.d.ts +127 -0
- package/es6/FrontApplet/Management/Screen/Screen.js +197 -89
- package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
- package/es6/FrontApplet/Management/Security/Security.d.ts +20 -5
- package/es6/FrontApplet/Management/Security/Security.js +33 -31
- package/es6/FrontApplet/Management/Security/Security.js.map +1 -1
- package/es6/FrontApplet/Management/Time/Time.d.ts +31 -5
- package/es6/FrontApplet/Management/Time/Time.js +49 -40
- package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/IWifiEvent.d.ts +18 -0
- package/es6/FrontApplet/Management/Wifi/IWifiEvent.js +19 -1
- package/es6/FrontApplet/Management/Wifi/IWifiEvent.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +108 -7
- package/es6/FrontApplet/Management/Wifi/Wifi.js +162 -86
- package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js +2 -2
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js +8 -6
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/TimerHelper.js +2 -2
- package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js +35 -3
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/VideoHelper.js +1 -1
- package/es6/FrontApplet/Management/helpers/VideoHelper.js.map +1 -1
- package/es6/FrontApplet/Monitors/Monitors.d.ts +9 -0
- package/es6/FrontApplet/Monitors/Monitors.js +16 -16
- package/es6/FrontApplet/Monitors/Monitors.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/CodesMDC.js +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/CodesMDC.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +51 -2
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +79 -38
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/NativeCommands.d.ts +4 -0
- package/es6/FrontApplet/NativeCommands/NativeCommands.js +12 -2
- package/es6/FrontApplet/NativeCommands/NativeCommands.js.map +1 -1
- package/es6/FrontApplet/OSD/OSD.d.ts +9 -0
- package/es6/FrontApplet/OSD/OSD.js +15 -15
- package/es6/FrontApplet/OSD/OSD.js.map +1 -1
- package/es6/FrontApplet/Offline/Cache/Cache.d.ts +91 -2
- package/es6/FrontApplet/Offline/Cache/Cache.js +192 -130
- package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -1
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +1 -1
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +17 -25
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -1
- package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +4 -4
- package/es6/FrontApplet/Offline/IAddFont.d.ts +3 -1
- package/es6/FrontApplet/Offline/IAddFont.js.map +1 -1
- package/es6/FrontApplet/Offline/ISaveFile.js +5 -2
- package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -1
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js +2 -1
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js.map +1 -1
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js +2 -1
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js.map +1 -1
- package/es6/FrontApplet/Offline/Offline.d.ts +75 -4
- package/es6/FrontApplet/Offline/Offline.js +116 -56
- package/es6/FrontApplet/Offline/Offline.js.map +1 -1
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.d.ts +19 -1
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +41 -29
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -1
- package/es6/FrontApplet/Sensors/Proximity.d.ts +4 -3
- package/es6/FrontApplet/Sensors/Proximity.js +12 -4
- package/es6/FrontApplet/Sensors/Proximity.js.map +1 -1
- package/es6/FrontApplet/Sensors/Sensors.d.ts +2 -0
- package/es6/FrontApplet/Sensors/Sensors.js +9 -2
- package/es6/FrontApplet/Sensors/Sensors.js.map +1 -1
- package/es6/FrontApplet/Stream/IStream.d.ts +10 -10
- package/es6/FrontApplet/Stream/Stream.d.ts +130 -15
- package/es6/FrontApplet/Stream/Stream.js +229 -130
- package/es6/FrontApplet/Stream/Stream.js.map +1 -1
- package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -1
- package/es6/FrontApplet/Sync/Sync.d.ts +152 -6
- package/es6/FrontApplet/Sync/Sync.js +196 -112
- package/es6/FrontApplet/Sync/Sync.js.map +1 -1
- package/es6/FrontApplet/Sync/syncEvents.d.ts +3 -1
- package/es6/FrontApplet/Sync/syncMessages.js +1 -1
- package/es6/FrontApplet/Sync/syncMessages.js.map +1 -1
- package/es6/FrontApplet/Timing/Timing.d.ts +1 -0
- package/es6/FrontApplet/Timing/Timing.js +9 -2
- package/es6/FrontApplet/Timing/Timing.js.map +1 -1
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.d.ts +1 -1
- package/es6/FrontApplet/Timing/Triggers/Triggers.d.ts +9 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js +16 -18
- package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -1
- package/es6/FrontApplet/Touch/Touch.d.ts +3 -0
- package/es6/FrontApplet/Touch/Touch.js +13 -3
- package/es6/FrontApplet/Touch/Touch.js.map +1 -1
- package/es6/FrontApplet/Validate/Validate.js +14 -11
- package/es6/FrontApplet/Validate/Validate.js.map +1 -1
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js +7 -2
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -1
- package/es6/FrontApplet/Video/IOptions.d.ts +8 -1
- package/es6/FrontApplet/Video/IVideo.d.ts +8 -8
- package/es6/FrontApplet/Video/IVideoEvent.js +3 -3
- package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -1
- package/es6/FrontApplet/Video/Video.d.ts +84 -12
- package/es6/FrontApplet/Video/Video.js +161 -102
- package/es6/FrontApplet/Video/Video.js.map +1 -1
- package/es6/FrontApplet/createFrontApplet.js +5 -2
- package/es6/FrontApplet/createFrontApplet.js.map +1 -1
- package/es6/Monitoring/Display/handleDisplayRequests.d.ts +2 -2
- package/es6/Monitoring/Display/handleDisplayRequests.js +5 -15
- package/es6/Monitoring/Display/handleDisplayRequests.js.map +1 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.d.ts +10 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.js +3 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.js.map +1 -1
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.d.ts +2 -2
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.js +41 -45
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.js.map +1 -1
- package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.d.ts +2 -2
- package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.js +4 -14
- package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.js.map +1 -1
- package/es6/Monitoring/Management/App/handleApplicationRequests.d.ts +2 -2
- package/es6/Monitoring/Management/App/handleApplicationRequests.js +9 -19
- package/es6/Monitoring/Management/App/handleApplicationRequests.js.map +1 -1
- package/es6/Monitoring/Management/Audio/handleAudioRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Audio/handleAudioRequests.js +7 -17
- package/es6/Monitoring/Management/Audio/handleAudioRequests.js.map +1 -1
- package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.d.ts +2 -2
- package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.js +7 -17
- package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.js.map +1 -1
- package/es6/Monitoring/Management/Debug/handleDebugRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Debug/handleDebugRequests.js +9 -19
- package/es6/Monitoring/Management/Debug/handleDebugRequests.js.map +1 -1
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js +11 -21
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js.map +1 -1
- package/es6/Monitoring/Management/Os/managementOsRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Os/managementOsRequests.js +9 -19
- package/es6/Monitoring/Management/Os/managementOsRequests.js.map +1 -1
- package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.d.ts +2 -2
- package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.js +7 -17
- package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.js.map +1 -1
- package/es6/Monitoring/Management/Power/handlePowerRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Power/handlePowerRequests.js +19 -29
- package/es6/Monitoring/Management/Power/handlePowerRequests.js.map +1 -1
- package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.d.ts +2 -2
- package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.js +15 -25
- package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.js.map +1 -1
- package/es6/Monitoring/Management/Screen/handleScreenRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Screen/handleScreenRequests.js +19 -29
- package/es6/Monitoring/Management/Screen/handleScreenRequests.js.map +1 -1
- package/es6/Monitoring/Management/Security/handleSecurityCommands.d.ts +2 -2
- package/es6/Monitoring/Management/Security/handleSecurityCommands.js +9 -19
- package/es6/Monitoring/Management/Security/handleSecurityCommands.js.map +1 -1
- package/es6/Monitoring/Management/Time/handleTimeCommands.d.ts +2 -2
- package/es6/Monitoring/Management/Time/handleTimeCommands.js +9 -19
- package/es6/Monitoring/Management/Time/handleTimeCommands.js.map +1 -1
- package/es6/Monitoring/Management/handleManagementRequests.d.ts +2 -2
- package/es6/Monitoring/Management/handleManagementRequests.js +23 -33
- package/es6/Monitoring/Management/handleManagementRequests.js.map +1 -1
- package/es6/Monitoring/{Montoring.d.ts → Monitoring.d.ts} +1 -0
- package/es6/Monitoring/{Montoring.js → Monitoring.js} +12 -23
- package/es6/Monitoring/Monitoring.js.map +1 -0
- package/es6/Monitoring/NativeCommands/handleNativeCommands.d.ts +2 -2
- package/es6/Monitoring/NativeCommands/handleNativeCommands.js +5 -15
- package/es6/Monitoring/NativeCommands/handleNativeCommands.js.map +1 -1
- package/es6/Monitoring/OSD/handleOsdRequests.d.ts +2 -2
- package/es6/Monitoring/OSD/handleOsdRequests.js +5 -15
- package/es6/Monitoring/OSD/handleOsdRequests.js.map +1 -1
- package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.d.ts +2 -2
- package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.js +23 -33
- package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.js.map +1 -1
- package/es6/Monitoring/Video/handleVideoRequests.d.ts +2 -2
- package/es6/Monitoring/Video/handleVideoRequests.js +36 -9
- package/es6/Monitoring/Video/handleVideoRequests.js.map +1 -1
- package/es6/Monitoring/handleMonitoringRequests.d.ts +2 -2
- package/es6/Monitoring/handleMonitoringRequests.js +6 -16
- package/es6/Monitoring/handleMonitoringRequests.js.map +1 -1
- package/es6/Sensors/IButton.js +1 -1
- package/es6/Sensors/IButton.js.map +1 -1
- package/es6/Sensors/IRfidAntenna.js +1 -1
- package/es6/Sensors/IRfidAntenna.js.map +1 -1
- package/es6/Util/Console/enhancer.js +1 -2
- package/es6/Util/Console/enhancer.js.map +1 -1
- package/es6/bundle.d.ts +1 -1
- package/es6/bundle.js +6 -3
- package/es6/bundle.js.map +1 -1
- package/es6/fpath.js +34 -1
- package/es6/fpath.js.map +1 -1
- package/es6/utils/types.d.ts +1 -0
- package/es6/{FrontApplet/Input/IKeyUpEventListener.js → utils/types.js} +1 -1
- package/es6/utils/types.js.map +1 -0
- package/package.json +27 -25
- package/CHANGELOG.md +0 -484
- package/docs/applet-basics.md +0 -272
- package/docs/content/js-applet-resources.md +0 -154
- package/docs/content/js-browser.md +0 -163
- package/docs/content/js-command.md +0 -154
- package/docs/content/js-debug.md +0 -36
- package/docs/content/js-device-info.md +0 -56
- package/docs/content/js-display.md +0 -56
- package/docs/content/js-file-system.md +0 -670
- package/docs/content/js-fonts.md +0 -115
- package/docs/content/js-hardware.md +0 -55
- package/docs/content/js-iframes.md +0 -66
- package/docs/content/js-input.md +0 -71
- package/docs/content/js-offline-cache-media-files.md +0 -257
- package/docs/content/js-offline-cache-simple-data.md +0 -129
- package/docs/content/js-osd.md +0 -32
- package/docs/content/js-proof-of-play.md +0 -60
- package/docs/content/js-sensors.md +0 -70
- package/docs/content/js-serial.md +0 -165
- package/docs/content/js-sync-playback.md +0 -384
- package/docs/content/js-video-inputs-internal-ports.md +0 -131
- package/docs/content/js-video-stream.md +0 -618
- package/docs/content/js-video.md +0 -232
- package/docs/management/js-management-application.md +0 -107
- package/docs/management/js-management-audio.md +0 -44
- package/docs/management/js-management-debug.md +0 -40
- package/docs/management/js-management-firmware.md +0 -93
- package/docs/management/js-management-management.md +0 -178
- package/docs/management/js-management-monitoring-commands.md +0 -107
- package/docs/management/js-management-monitors.md +0 -55
- package/docs/management/js-management-native-commands-mdc.md +0 -90
- package/docs/management/js-management-network.md +0 -223
- package/docs/management/js-management-os.md +0 -62
- package/docs/management/js-management-package.md +0 -48
- package/docs/management/js-management-power.md +0 -175
- package/docs/management/js-management-proxy.md +0 -81
- package/docs/management/js-management-remote-control.md +0 -58
- package/docs/management/js-management-screen.md +0 -225
- package/docs/management/js-management-security.md +0 -71
- package/docs/management/js-management-time.md +0 -161
- package/docs/management/js-management-wifi.md +0 -341
- package/es6/FrontApplet/Command/ICommandEventListener.d.ts +0 -6
- package/es6/FrontApplet/Command/ICommandEventListener.js +0 -3
- package/es6/FrontApplet/Command/ICommandEventListener.js.map +0 -1
- package/es6/FrontApplet/Input/IKeyUpEventListener.d.ts +0 -5
- package/es6/FrontApplet/Input/IKeyUpEventListener.js.map +0 -1
- package/es6/FrontApplet/Management/Firmware/FirmwareType.d.ts +0 -4
- package/es6/FrontApplet/Management/Firmware/FirmwareType.js +0 -9
- package/es6/FrontApplet/Management/Firmware/FirmwareType.js.map +0 -1
- package/es6/FrontApplet/Stream/streamListeners.d.ts +0 -10
- package/es6/FrontApplet/Stream/streamListeners.js.map +0 -1
- package/es6/FrontApplet/Video/IVideoEventListener.d.ts +0 -5
- package/es6/FrontApplet/Video/IVideoEventListener.js +0 -3
- package/es6/FrontApplet/Video/IVideoEventListener.js.map +0 -1
- package/es6/Monitoring/Montoring.js.map +0 -1
package/docs/applet-basics.md
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Applet Basics
|
|
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] This thread contains basic methods of every Applet used to load necessary configuration or device identifications and how to create Applet."
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Applet Basics
|
|
15
|
-
|
|
16
|
-
This thread contains basic methods of every Applet used to load necessary configuration or device identifications and how to create Applet.
|
|
17
|
-
|
|
18
|
-
## All methods and properties
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
| Methods/Property | Description | Supported since |
|
|
22
|
-
| ----------------- | ----------- | :---------------: |
|
|
23
|
-
| `onReady()` | This method will wait until sOS object library and all dependencies are ready to be used. | 1.0.0 |
|
|
24
|
-
| `restore()` | Clear all previously played videos, streams, clear display view. | 1.0.0 |
|
|
25
|
-
| `refresh()` | This method will refresh the applet data and launch it again | 5.8.0 |
|
|
26
|
-
| `appletVersion` | Returns current Applet version | JS API `4.5.0`, Front-display `7.8.0`|
|
|
27
|
-
| `config` object | Returns object with key-values set via Timing or as a bundled config| JS API `1.5.0`, Front-display `6.8.0`|
|
|
28
|
-
| `config` object | Returns object with key-values set via Timing or as a bundled config| `1.0.0`|
|
|
29
|
-
| `authHash` token | Returns string with unique device identifier | `1.0.0`|
|
|
30
|
-
| `capabilities` | Enum of device-specific capabilities and features | `1.0.0`
|
|
31
|
-
|
|
32
|
-
## Starting Applet
|
|
33
|
-
|
|
34
|
-
Your applet logic should be started **after sOS object is loaded and ready**. To start your applet you can use this example snippet.
|
|
35
|
-
|
|
36
|
-
### Javascript example:
|
|
37
|
-
``` javascript
|
|
38
|
-
/*
|
|
39
|
-
CLI generated Applet
|
|
40
|
-
*/
|
|
41
|
-
sos.onReady().then(async function () {
|
|
42
|
-
startYourApplet(); // Example method to run
|
|
43
|
-
// Any other code
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/*
|
|
47
|
-
Deprecated single file Applet options
|
|
48
|
-
*/
|
|
49
|
-
|
|
50
|
-
// option A
|
|
51
|
-
window.addEventListener('sos.loaded', () => {
|
|
52
|
-
sos.onReady().then(() => {
|
|
53
|
-
startYourApplet(); // Example method to run
|
|
54
|
-
// Any other code
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
// option B
|
|
59
|
-
async function startApplet() {
|
|
60
|
-
await sos.onReady();
|
|
61
|
-
// Any other code
|
|
62
|
-
}
|
|
63
|
-
window.addEventListener('sos.loaded', startApplet);
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
After sOS object is ready, there are global properties available, which can be used for Applet customization and device identification.
|
|
67
|
-
|
|
68
|
-
### Javascript syntax:
|
|
69
|
-
```javascript
|
|
70
|
-
// Authentication hash string to secure access to device resources in REST API
|
|
71
|
-
console.log(sos.authHash);
|
|
72
|
-
|
|
73
|
-
// Parsed JSON object passed to Timing for current applet & current device together
|
|
74
|
-
console.log(sos.config);
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## onReady()
|
|
78
|
-
This method will wait until sOS object library and all dependencies are ready to be used.
|
|
79
|
-
|
|
80
|
-
:::danger
|
|
81
|
-
Every Applet must contain this method, otherwise it won't work.
|
|
82
|
-
:::
|
|
83
|
-
|
|
84
|
-
### Javascript example:
|
|
85
|
-
```javascript
|
|
86
|
-
/*
|
|
87
|
-
CLI generated Applet
|
|
88
|
-
*/
|
|
89
|
-
sos.onReady().then(async function () {
|
|
90
|
-
console.log('sos is ready', sos); // Print sOS object into console
|
|
91
|
-
// Any other methods to prepare your content and applet
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/*
|
|
95
|
-
Deprecated single file Applet options
|
|
96
|
-
*/
|
|
97
|
-
window.addEventListener('sos.loaded',() => {
|
|
98
|
-
sos.onReady().then(() => {
|
|
99
|
-
console.log('sos is ready', sos); // Print sOS object into console
|
|
100
|
-
// Any other methods to prepare your content and applet
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
:::note[GitHub Example]
|
|
106
|
-
[Example of Applet for basic start](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/restore)
|
|
107
|
-
:::
|
|
108
|
-
|
|
109
|
-
## restore()
|
|
110
|
-
The typical case of usage for digital signage is playing a loop with some specified duration. This method should be called always when the loop is changed. It will clear all previously played videos, streams, clear display views, and notify for garbage collection.
|
|
111
|
-
It stops all video playback and clears out the memory. The following function should be triggered **only** in a case the whole playback needs to be restarted as it's completely switching the playback 'loop/playlist'.
|
|
112
|
-
|
|
113
|
-
### Javascript example:
|
|
114
|
-
```javascript
|
|
115
|
-
/*
|
|
116
|
-
CLI generated Applet
|
|
117
|
-
*/
|
|
118
|
-
sos.onReady().then(async function () {
|
|
119
|
-
console.log('sos is ready', sos);
|
|
120
|
-
// Any other methods to prepare, load and run content on screen
|
|
121
|
-
sos.restore();
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/*
|
|
125
|
-
Deprecated single file Applet options
|
|
126
|
-
*/
|
|
127
|
-
window.addEventListener('sos.loaded', () => {
|
|
128
|
-
sos.onReady().then(() => {
|
|
129
|
-
console.log('sos is ready', sos);
|
|
130
|
-
// Any other methods to prepare, load and run content on screen
|
|
131
|
-
sos.restore();
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
:::note[GitHub Example]
|
|
137
|
-
[Example of Applet with restore() method](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/restore)
|
|
138
|
-
:::
|
|
139
|
-
|
|
140
|
-
## refresh()
|
|
141
|
-
AFter calling this method applet is freshly launched.
|
|
142
|
-
|
|
143
|
-
### Javascript example:
|
|
144
|
-
```javascript
|
|
145
|
-
await sos.refresh()
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
## appletVersion
|
|
149
|
-
This property returns current active Applet version.
|
|
150
|
-
|
|
151
|
-
### Javascript example:
|
|
152
|
-
|
|
153
|
-
```javascript
|
|
154
|
-
/*
|
|
155
|
-
CLI generated Applet
|
|
156
|
-
*/
|
|
157
|
-
sos.onReady().then(async function () {
|
|
158
|
-
console.log('Your applet version is ' + sos.appletVersion));
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/*
|
|
162
|
-
Deprecated single file Applet options
|
|
163
|
-
*/
|
|
164
|
-
window.addEventListener('sos.loaded',() => {
|
|
165
|
-
sos.onReady().then(() => console.log('Your applet version is ' + sos.appletVersion));
|
|
166
|
-
});
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## Custom variables in Applet
|
|
170
|
-
|
|
171
|
-
You can pass CUSTOM key-value variables to the Applet. To do that, add your values as a Timing configuration (over Box of [Timings API](https://docs.signageos.io/hc/en-us/articles/4405238989458)). Then you can access your values via `sos.config` object.
|
|
172
|
-
|
|
173
|
-
```javascript
|
|
174
|
-
// Parsed JSON object passed to Timing for current applet & current device together
|
|
175
|
-
console.log(sos.config.mySecretID);
|
|
176
|
-
console.log(sos.config.imgUrl);
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
:::note[Guide]
|
|
180
|
-
[Custom variables in Applet](https://developers.signageos.io/docs/devspace-extras/env-variables-configuration)
|
|
181
|
-
|
|
182
|
-
How to pass custom variables and configuration to your Applet.
|
|
183
|
-
:::
|
|
184
|
-
|
|
185
|
-
## The authHash for unique device identification
|
|
186
|
-
|
|
187
|
-
The `sos.authHash` is an alternative device identifier designed for secure pairing and locating devices through the REST API.
|
|
188
|
-
|
|
189
|
-
1. The `authHash` is commonly used as a link between the Applet deployed on the device and the device in device management.
|
|
190
|
-
1. The `authHash` is unique and can be revoked upon request.
|
|
191
|
-
1. The `authHash` can be used as a universal identifier for your Applet application.
|
|
192
|
-
|
|
193
|
-
The `authHash` can be retrieved from the JS SDK API - it's available as `sos.authHash`.
|
|
194
|
-
|
|
195
|
-
```javascript
|
|
196
|
-
async function startApplet() {
|
|
197
|
-
await sos.onReady();
|
|
198
|
-
console.log(sos.authHash);
|
|
199
|
-
}
|
|
200
|
-
window.addEventListener('sos.loaded', startApplet);
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
:::note[Guide]
|
|
204
|
-
[Using authHash for device identification](https://developers.signageos.io/docs/devspace-extras/sos-authhash-device-pairing.md)
|
|
205
|
-
|
|
206
|
-
How to get `authHash` and use it in the REST API for device identification.
|
|
207
|
-
:::
|
|
208
|
-
|
|
209
|
-
## Applet JS API version
|
|
210
|
-
|
|
211
|
-
Each feature has “Supported since” that states for the Applet JS API version. The Applet JS API component is called Front-Applet and its version can be selected under the Applet editor.
|
|
212
|
-
|
|
213
|
-
## Capabilities
|
|
214
|
-
|
|
215
|
-
Even tough we do our best to support as many features as possible on every platform, it's not possible to use certain features on certain platforms.
|
|
216
|
-
That's why we also provide a capabilities API that allows you to check, if the particular device supports a feature before you try to use it.
|
|
217
|
-
It's recommended that you always include capability checks in your code to prevent unexpected behavior or errors in your application.
|
|
218
|
-
|
|
219
|
-
There are two kinds of capabilities - display and management.
|
|
220
|
-
|
|
221
|
-
### Display capabilities
|
|
222
|
-
|
|
223
|
-
Display capabilities refer to the capabilities of the display in terms of content, playback, peripherals, etc.
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
| Capability | Description |
|
|
227
|
-
| ------------------------------ | ----------------------------------------------------------------------------------------- |
|
|
228
|
-
| `FILE_SYSTEM_EXTERNAL_STORAGE` | Device file system supports [external storage](content/js-file-system) (i.e. flash drives) |
|
|
229
|
-
| `FILE_SYSTEM_FILE_CHECKSUM` | Device is can [calculate a file checksum](content/js-file-system#getfilechecksum) |
|
|
230
|
-
| `VIDEO_4K` | Device is capable of [playing 4K video](content/js-video) |
|
|
231
|
-
| `SERIAL` | Device supports communication with peripherals over [serial](content/js-serial)
|
|
232
|
-
|
|
233
|
-
#### Javascript example:
|
|
234
|
-
|
|
235
|
-
```javascript
|
|
236
|
-
if (await sos.display.supports('VIDEO_4K')) {
|
|
237
|
-
// play 4K video
|
|
238
|
-
}
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
:::note[GitHub Example]
|
|
242
|
-
[Example of Content Capabilities](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/capabilities-content)
|
|
243
|
-
:::
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
### Management capabilities
|
|
247
|
-
|
|
248
|
-
Management capabilities refer to the capabilities of the display's internal state management.
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
| Capability | Description |
|
|
252
|
-
| ------------------------------ | ----------------------------------------------------------------------------------------- |
|
|
253
|
-
| `BATTERY_STATUS` | Device can [report its battery status](management/js-management-management#getbatterystatus). |
|
|
254
|
-
| `WIFI` | Device can [connect to a Wi-Fi](management/js-management-wifi#connect). |
|
|
255
|
-
| `WIFI_SCAN` | Device can [scan surrounding Wi-Fi devices](management/js-management-wifi#scandevices). |
|
|
256
|
-
| `WIFI_AP` | Device is capable of [becoming a Wi-Fi endpoint](management/js-management-wifi#enableap) that other devices can connect to. |
|
|
257
|
-
| `SET_BRIGHTNESS` | Device can change its [screen brightness](management/js-management-screen#setbrightness). |
|
|
258
|
-
| `SET_TIME` | Device can change its [time settings](management/js-management-time). |
|
|
259
|
-
| `NTP_TIME` | Device can [synchronize its time with an NTP server](management/js-management-time#setntp). |
|
|
260
|
-
| `PACKAGE_INSTALL` | It's possible to [install additional packages](management/js-management-package) on the device, managed by signageOS application. |
|
|
261
|
-
| `SET_VOLUME` | Device can change its [audio volume](management/js-management-audio). |
|
|
262
|
-
| `SET_REMOTE_CONTROL_ENABLED` | Device can [disable control via IR remote](management/js-management-remote-control) to increase security.
|
|
263
|
-
|
|
264
|
-
```javascript
|
|
265
|
-
if (await sos.management.supports('WIFI')) {
|
|
266
|
-
// connect to wifi
|
|
267
|
-
}
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
:::note[GitHub Example]
|
|
271
|
-
[Example of Management Capabilities](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/capabilities-management)
|
|
272
|
-
:::
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Applet Resources
|
|
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] Often there are some JavaScripts and CSS styles necessary to be loaded for your Applet. It can be libraries like jQuery or even your whole application code. For these necessities offline API for saving, storing & loading files are ready."
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Applet Resources
|
|
15
|
-
|
|
16
|
-
Often there are some JavaScripts and CSS styles necessary to be loaded for your Applet.
|
|
17
|
-
It can be libraries like jQuery or even your whole application code. For these necessities offline API for saving, storing & loading files are ready.
|
|
18
|
-
|
|
19
|
-
| Methods | Description | Supported since |
|
|
20
|
-
| ------- | ----------- | ------ |
|
|
21
|
-
| `addFile()` | Add single file to Applet before starting it. | 1.0.0 |
|
|
22
|
-
| `addFiles()` | Add files to Applet before starting it. | 1.0.0 |
|
|
23
|
-
| `addFilesSync()` | Add files to Applet before starting it in the set order to prevent race condition. | 1.0.0
|
|
24
|
-
|
|
25
|
-
### File object
|
|
26
|
-
Every method above, accept single object or array of objects depending by type. Every object **must have** these keys.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| Key | Type | Required | Description |
|
|
30
|
-
| :-----: | :-----: | :----: | ------- |
|
|
31
|
-
| `uri` | String | <div class="red">Yes</div> | URL of file |
|
|
32
|
-
| `uid` | String | <div class="red">Yes</div> | Unique ID in Applet for future manage |
|
|
33
|
-
| `type` | String | <div class="red">Yes</div> | Type of file. Example: `sos.offline.types.javascript`, `sos.offline.types.css`, `sos.offline.types.video` |
|
|
34
|
-
|||| ^^ |
|
|
35
|
-
| `flags` | Array | <div class="red">Yes</div> | Special flag for file |
|
|
36
|
-
| `headers` | Array | <div class="yellow">No</div> | Authorization headers
|
|
37
|
-
|
|
38
|
-
:::info
|
|
39
|
-
* The file URL must point to a file. If your URI leads to a 303 redirect (e.g. from http to http**s**), the API will not work.
|
|
40
|
-
* There are some limitations for [Emulator](https://docs.signageos.io/hc/en-us/articles/4405238997138).
|
|
41
|
-
:::
|
|
42
|
-
|
|
43
|
-
## addFile()
|
|
44
|
-
Method `addFile()` will allow you to load single resource into applet. If you want to load more resource, use `addFiles()`.
|
|
45
|
-
|
|
46
|
-
### Javascript Example
|
|
47
|
-
```javascript
|
|
48
|
-
const file = { // File that will be loaded into an applet
|
|
49
|
-
"uri": "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js",
|
|
50
|
-
"uid": "jquery-2.2.4.min.js",
|
|
51
|
-
"type": sos.offline.types.javascript,
|
|
52
|
-
"flags": [sos.offline.flags.append(document.body)]
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
await sos.offline.addFile(file); // And finally load file
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## addFiles()
|
|
59
|
-
Method `addFiles()` will allow you to load array of your resources into Applet. Files are load in random order.
|
|
60
|
-
|
|
61
|
-
### Javascript Example
|
|
62
|
-
```javascript
|
|
63
|
-
const files = [ // Array of files
|
|
64
|
-
{
|
|
65
|
-
"uri": "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js",
|
|
66
|
-
"uid": "jquery-2.2.4.min.js",
|
|
67
|
-
"type": sos.offline.types.javascript,
|
|
68
|
-
"flags": [sos.offline.flags.append(document.body)]
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"uri": "https://signageostest.blob.core.windows.net/test/applet-examples/benchmark-styles.css?v=1.0.0",
|
|
72
|
-
"uid": "benchmark-styles.css-v1.0.0",
|
|
73
|
-
"type": sos.offline.types.css,
|
|
74
|
-
"headers": { "Authorization": "Basic Zm9vOmJhcg==" },
|
|
75
|
-
"flags": [sos.offline.flags.append(document.head)]
|
|
76
|
-
}
|
|
77
|
-
];
|
|
78
|
-
|
|
79
|
-
await sos.offline.addFiles(files);
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
:::note[GitHub Example]
|
|
83
|
-
[Example of Applet that save files and load them in one file](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/offline-resources)
|
|
84
|
-
:::
|
|
85
|
-
|
|
86
|
-
## addFilesSync()
|
|
87
|
-
Method `addFilesSync()` works same as method above, but all files are loaded in correct order. Otherwise, files are loaded in random order by file size.
|
|
88
|
-
|
|
89
|
-
### Javascript example
|
|
90
|
-
```javascript
|
|
91
|
-
const files = [
|
|
92
|
-
{
|
|
93
|
-
"uri": "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js",
|
|
94
|
-
"uid": "jquery-2.2.4.min.js",
|
|
95
|
-
"type": sos.offline.types.javascript,
|
|
96
|
-
"flags": [sos.offline.flags.append(document.body)]
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"uri": "https://signageostest.blob.core.windows.net/test/applet-examples/benchmark-styles.css?v=1.0.0",
|
|
100
|
-
"uid": "benchmark-styles.css-v1.0.0",
|
|
101
|
-
"type": sos.offline.types.css,
|
|
102
|
-
"headers": { "Authorization": "Basic Zm9vOmJhcg==" },
|
|
103
|
-
"flags": [sos.offline.flags.append(document.head)]
|
|
104
|
-
}
|
|
105
|
-
];
|
|
106
|
-
|
|
107
|
-
sos.offline.addFilesSync(files).then(() => {
|
|
108
|
-
console.log('Now you can use jQuery and CSS file');
|
|
109
|
-
jQuery('#do').something();
|
|
110
|
-
});
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Usage with Typescript
|
|
114
|
-
You can also use all these methods with [signageOS TypeScript](https://docs.signageos.io/hc/en-us/articles/4405069154962#signageos-typescript).
|
|
115
|
-
|
|
116
|
-
```typescript
|
|
117
|
-
interface ISaveFile {
|
|
118
|
-
uid: string;
|
|
119
|
-
uri: string;
|
|
120
|
-
type: string;
|
|
121
|
-
headers?: { [key: string]: string };
|
|
122
|
-
flags?: IFlag[];
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
addFile(files: ISaveFile[]): Promise<void>;
|
|
126
|
-
addFiles(files: ISaveFile[]): Promise<void>;
|
|
127
|
-
addFilesSync(files: ISaveFile[]): Promise<void>;
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Flags that can be optionally passed to the file object are available in flags property.
|
|
131
|
-
|
|
132
|
-
```typescript
|
|
133
|
-
interface IFlag {
|
|
134
|
-
type: 'append';
|
|
135
|
-
element: IElement;
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Errors
|
|
140
|
-
Although we are doing our best, following errors may occur when working with the Applet Resources.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
| Code | Type | Message |
|
|
144
|
-
| ---- | ---- | ------- |
|
|
145
|
-
| 40101 | AppletResourcesError | File needs to be object |
|
|
146
|
-
| 40102 | AppletResourcesError | File UID needs to be defined |
|
|
147
|
-
| 40103 | AppletResourcesError | File flags needs to be Array |
|
|
148
|
-
| 40104 | AppletResourcesError | File flag needs to be object |
|
|
149
|
-
| 40105 | AppletResourcesError | Already loading file: `FILE_NAME` |
|
|
150
|
-
|^^|^^| Your code has probably multiple occurrences of addFile/s methods. |
|
|
151
|
-
| 40106 | AppletResourcesError | Already existing file: `FILE_NAME` |
|
|
152
|
-
|^^|^^| File is already loaded or exists in Applet |
|
|
153
|
-
| 49901 | FileNotFoundError | File `FILE_ID` was not found |
|
|
154
|
-
|^^|^^| Applet can not get file. URL is invalid.
|
|
@@ -1,163 +0,0 @@
|
|
|
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
|
-
|
|
22
|
-
| Methods | Description | Supported since |
|
|
23
|
-
| ----------------- | ----------- | :---------------: |
|
|
24
|
-
| `open()` | Open page in integrated browser | 4.0.0 |
|
|
25
|
-
| `close()` | Open page in integrated browser | 4.4.0
|
|
26
|
-
|
|
27
|
-
## open()
|
|
28
|
-
|
|
29
|
-
:::info
|
|
30
|
-
**This API is currently available on:**
|
|
31
|
-
- Android devices with Android 5+ (Philips, Benq, Sharp, generic Android device)
|
|
32
|
-
|
|
33
|
-
**With some limitation you can use this API also on**
|
|
34
|
-
- Samsung Tizen (SSSP 4 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
35
|
-
- LG webOS (webOS 3.0 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
36
|
-
- Linux (Fedora, Ubuntu), Raspberry Pi, NEC Compute Module; where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
37
|
-
- BrightSign; where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
38
|
-
:::
|
|
39
|
-
|
|
40
|
-
### Javascript
|
|
41
|
-
Simple opening some page ex. our main company page.
|
|
42
|
-
```javascript
|
|
43
|
-
sos.browser.open('https://www.signageos.io'); // Open link in the browser
|
|
44
|
-
```
|
|
45
|
-
<br/>
|
|
46
|
-
|
|
47
|
-
Method `open()` also supports properties for browser, all of which are optional.
|
|
48
|
-
|
|
49
|
-
| Property | Type | Description |
|
|
50
|
-
|----------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
51
|
-
| `aclDomains` | Array | List of domains to be interpreted according to `aclMode`. Example: `signageos.io`, `www.example.com` |
|
|
52
|
-
| `aclMode` | String | <ul><li>`blacklist` – Allow access to all domains _except_ those in `aclDomains` and their subdomains.</li><li>`whitelist` – Allow access _only_ to domains in `aclDomains` and their subdomains.</li></ul>
|
|
53
|
-
| `readOnlyAddressBar` | Boolean | <ul><li>`true` – The address bar is read-only.</li><li>`false` – The user can navigate away by entering a URL in the address bar.</li></ul> |
|
|
54
|
-
| `coordinates` | Object | Size and position of the browser window. Defaults to fullscreen. (Android, Linux)
|
|
55
|
-
| `idleTimeout` | Number | The browser will automatically close after a specified period of inactivity (in milliseconds). |
|
|
56
|
-
| `theme` | Object | Specify custom UI theme. (Android) |
|
|
57
|
-
| `headlessMode` | Boolean | Headless mode hides the entire address bar (default) |
|
|
58
|
-
| `canUserClose` | Boolean | Whether the user can manually close the browser. Default:<br/>**Headless:** `false`<br/>**With UI:** `true` |
|
|
59
|
-
| `clearData` | Boolean | Clear cache after the browser closes. Default:<br/>**Headless:** `false`<br/>**With UI:** `true` |
|
|
60
|
-
| `method` | String | Can only be **native** (which opens a new, fully sandboxed fullscreen window) or **iframe** (which opens a configurable-sized window). (only Linux) |
|
|
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 Linux and Android
|
|
68
|
-
x: 0,
|
|
69
|
-
y: 0,
|
|
70
|
-
height: 500,
|
|
71
|
-
width: 500,
|
|
72
|
-
},
|
|
73
|
-
// theme: { ... } // supported only on Android
|
|
74
|
-
headlessMode: false, // supported only on Android
|
|
75
|
-
});
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
:::note[GitHub Example]
|
|
79
|
-
[Example of Applet for using browser on Android](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/browser)
|
|
80
|
-
:::
|
|
81
|
-
|
|
82
|
-
### Browser themes usage with Typescript
|
|
83
|
-
You can also use all these methods with [signageOS TypeScript](https://docs.signageos.io/hc/en-us/articles/4405069154962#signageos-typescript).
|
|
84
|
-
|
|
85
|
-
:::info
|
|
86
|
-
Browser themes are only available on Android devices.
|
|
87
|
-
:::
|
|
88
|
-
|
|
89
|
-
```typescript
|
|
90
|
-
type Color = string;
|
|
91
|
-
|
|
92
|
-
export type ITheme = {
|
|
93
|
-
base?: 'light' | 'dark'; // Default light
|
|
94
|
-
shape?: {
|
|
95
|
-
cornerSize?: number; // Default 2
|
|
96
|
-
};
|
|
97
|
-
colors?: {
|
|
98
|
-
primary?: Color;
|
|
99
|
-
background?: Color;
|
|
100
|
-
control?: Color;
|
|
101
|
-
};
|
|
102
|
-
widgets?: {
|
|
103
|
-
editAddress?: {
|
|
104
|
-
colors?: {
|
|
105
|
-
background?: Color;
|
|
106
|
-
text?: Color;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
buttonClose?: {
|
|
110
|
-
colors?: {
|
|
111
|
-
background?: Color | '@primary';
|
|
112
|
-
text?: Color;
|
|
113
|
-
icon?: Color;
|
|
114
|
-
};
|
|
115
|
-
icon?: 'none' | 'exit_to_app' | 'close' | 'cancel';
|
|
116
|
-
text?: string;
|
|
117
|
-
};
|
|
118
|
-
progress?: {
|
|
119
|
-
color?: Color | '@primary';
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
interface IOpenLinkOptions {
|
|
125
|
-
aclDomains?: string[];
|
|
126
|
-
aclMode?: 'blacklist' | 'whitelist';
|
|
127
|
-
readOnlyAddressBar?: boolean;
|
|
128
|
-
coordinates?: {
|
|
129
|
-
x: number;
|
|
130
|
-
y: number;
|
|
131
|
-
width: number;
|
|
132
|
-
height: number;
|
|
133
|
-
};
|
|
134
|
-
theme?: ITheme;
|
|
135
|
-
headlessMode?: boolean;
|
|
136
|
-
clearData?: boolean;
|
|
137
|
-
canUserClose?: boolean;
|
|
138
|
-
method?: 'native' | 'iframe'
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
open(uri: string, options?: IOpenLinkOptions): void;
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## close()
|
|
145
|
-
|
|
146
|
-
Closing the Browser instance. The whole page is closed. If you call `open()` again, the page will be loaded from the beginning.
|
|
147
|
-
|
|
148
|
-
### Javascript
|
|
149
|
-
Simple opening some page ex. our main company page.
|
|
150
|
-
```javascript
|
|
151
|
-
sos.browser.close(); // Close the browser
|
|
152
|
-
```
|
|
153
|
-
<br/>
|
|
154
|
-
|
|
155
|
-
## Errors
|
|
156
|
-
Although we are doing our best, following errors may occur when opening a link.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
| Code | Type | Message |
|
|
160
|
-
| ---- | ---- | ------- |
|
|
161
|
-
| 40301 | AppletBrowserUriError | Property argument `uri` must be a string |
|
|
162
|
-
| 50301 | InternalBrowserOpenLinkError | Unexpected error occurred when opening `$$LINK$$`
|
|
163
|
-
|