@signageos/front-applet 7.2.0 → 8.0.1
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 +19 -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/README.md +0 -5
- 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
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
# wifi
|
|
2
|
+
|
|
3
|
+
The `sos.management.wifi` API groups together methods for managing WIFI.
|
|
4
|
+
|
|
5
|
+
:::info
|
|
6
|
+
|
|
7
|
+
Use `sos.management.supports('WIFI')` to check if the device supports managing WIFI setup.
|
|
8
|
+
|
|
9
|
+
:::
|
|
10
|
+
|
|
11
|
+
#### Internal state
|
|
12
|
+
|
|
13
|
+
The `sos.management.wifi` API may be in 3 states:
|
|
14
|
+
|
|
15
|
+
- `disabled` - Wi-Fi is disabled. This state is persistent between reboots.
|
|
16
|
+
- `client` - Wi-Fi is in the client state, i.e. it is capable of connecting to a network, similarly to a phone or laptop. This state is persistent between reboots with all of its configuration.
|
|
17
|
+
- `ap` - Wi-Fi is in access point state, i.e. it itself becomes a Wi-Fi network that others can connect to. This state is persistent between reboots and will be switched to DISABLED state.
|
|
18
|
+
|
|
19
|
+
You can use `enableClient()`/`disableClient()` method to enable
|
|
20
|
+
or disable the `client` state or you can use `enableAP()`/`disableAP()` to enable or disable the `ap` state. It is **not** possible to go
|
|
21
|
+
from `client` state to `ap` state directly, the state has to be `disabled` first.
|
|
22
|
+
|
|
23
|
+
## Methods
|
|
24
|
+
|
|
25
|
+
### connect()
|
|
26
|
+
|
|
27
|
+
The `connect()` method connects the device to a specified network.
|
|
28
|
+
|
|
29
|
+
```ts expandable
|
|
30
|
+
connect(ssid: string, password?: string, options?: IWifiConnectOptions): Promise<void>;
|
|
31
|
+
// show-more
|
|
32
|
+
interface IWifiConnectOptions {
|
|
33
|
+
hidden?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Possible errors
|
|
39
|
+
|
|
40
|
+
The method throws an error if the Wi-Fi state is not in the `client` state.
|
|
41
|
+
|
|
42
|
+
<Separator />
|
|
43
|
+
|
|
44
|
+
### disable()
|
|
45
|
+
|
|
46
|
+
The `disable()` method switches the Wi-Fi state to `disabled`. All previously configured networks will be forgotten.
|
|
47
|
+
|
|
48
|
+
```ts expandable
|
|
49
|
+
disable(): Promise<void>;
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
<Separator />
|
|
53
|
+
|
|
54
|
+
### disconnect()
|
|
55
|
+
|
|
56
|
+
The `disconnect()` method disconnects the device from Wi-Fi network.
|
|
57
|
+
|
|
58
|
+
```ts expandable
|
|
59
|
+
disconnect(): Promise<void>;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### Possible errors
|
|
63
|
+
|
|
64
|
+
The method throws an error if the Wi-Fi state is not in the `client` state.
|
|
65
|
+
|
|
66
|
+
<Separator />
|
|
67
|
+
|
|
68
|
+
### enableAP()
|
|
69
|
+
|
|
70
|
+
The `enabledClient()` method switches the Wi-Fi state from `disabled` to `ap` state.
|
|
71
|
+
|
|
72
|
+
:::info
|
|
73
|
+
|
|
74
|
+
Use `sos.management.supports('WIFI_AP')` to check if the device is able to be in the `ap` mode.
|
|
75
|
+
|
|
76
|
+
:::
|
|
77
|
+
|
|
78
|
+
```ts expandable
|
|
79
|
+
enableAP(ssid: string, password: string): Promise<void>;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### Params
|
|
83
|
+
|
|
84
|
+
| Name | Type | Description |
|
|
85
|
+
|------------|----------|--------------------------------------------------------------|
|
|
86
|
+
| `ssid` | `string` | Name of the network, max. allowed length is 32 characters. |
|
|
87
|
+
| `password` | `string` | Password of the device, must be between 8 and 32 characters. |
|
|
88
|
+
|
|
89
|
+
#### Possible errors
|
|
90
|
+
|
|
91
|
+
The method throws an error if the Wi-Fi state is in the `client` state.
|
|
92
|
+
|
|
93
|
+
<Separator />
|
|
94
|
+
|
|
95
|
+
### enableClient()
|
|
96
|
+
|
|
97
|
+
The `enabledClient()` method switches the Wi-Fi state from `disabled` to `client` state.
|
|
98
|
+
|
|
99
|
+
```ts expandable
|
|
100
|
+
enableClient(): Promise<void>;
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### Possible errors
|
|
104
|
+
|
|
105
|
+
The method throws an error if the Wi-Fi state is in the `ap` state.
|
|
106
|
+
|
|
107
|
+
<Separator />
|
|
108
|
+
|
|
109
|
+
### getConnectedTo()
|
|
110
|
+
|
|
111
|
+
The `getConnectedTo()` method returns a network the device is currently connected to.
|
|
112
|
+
|
|
113
|
+
```ts expandable
|
|
114
|
+
getConnectedTo(): Promise<IWifiDevice | null>;
|
|
115
|
+
// show-more
|
|
116
|
+
interface IWifiDevice {
|
|
117
|
+
ssid: string;
|
|
118
|
+
strength?: number;
|
|
119
|
+
encrypted?: boolean;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
#### Possible errors
|
|
125
|
+
|
|
126
|
+
The method throws an error if the Wi-Fi state is not in the `client` state.
|
|
127
|
+
|
|
128
|
+
<Separator />
|
|
129
|
+
|
|
130
|
+
### getCountry()
|
|
131
|
+
|
|
132
|
+
The `getCountry()` method returns the 2-letter country code to which Wi-Fi regulations the device adheres to. Different countries may
|
|
133
|
+
have different regulations, when it comes to the Wi-Fi networks. Under normal circumstances, everything should work with default
|
|
134
|
+
settings. However, if you experience any problems, you might want to try changing Wi-Fi country configuration to your country.
|
|
135
|
+
|
|
136
|
+
```ts expandable
|
|
137
|
+
getCountry(): Promise<string | null>;
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
#### Possible errors
|
|
141
|
+
|
|
142
|
+
The method throws an error if the Wi-Fi state is not in the `client` state.
|
|
143
|
+
|
|
144
|
+
<Separator />
|
|
145
|
+
|
|
146
|
+
### isAPEnabled()
|
|
147
|
+
|
|
148
|
+
The `isClientEnabled()` method checks whether the Wi-Fi is in `ap` state.
|
|
149
|
+
|
|
150
|
+
```ts expandable
|
|
151
|
+
isAPEnabled(): Promise<boolean>;
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
<Separator />
|
|
155
|
+
|
|
156
|
+
### isClientEnabled()
|
|
157
|
+
|
|
158
|
+
The `isClientEnabled()` method checks whether the Wi-Fi is in `client` state.
|
|
159
|
+
|
|
160
|
+
```ts expandable
|
|
161
|
+
isClientEnabled(): Promise<boolean>;
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
#### Possible errors
|
|
165
|
+
|
|
166
|
+
The method throws an error if the Wi-Fi state is in the `ap` state.
|
|
167
|
+
|
|
168
|
+
<Separator />
|
|
169
|
+
|
|
170
|
+
### on()
|
|
171
|
+
|
|
172
|
+
The `on()` method sets up a listener, which is called whenever the specified event occurs.
|
|
173
|
+
|
|
174
|
+
```ts expandable
|
|
175
|
+
on(event: WifiEvent, listener: () => void): void;
|
|
176
|
+
// show-more
|
|
177
|
+
enum WifiEvent {
|
|
178
|
+
/**
|
|
179
|
+
* Wi-Fi was set to CLIENT state.
|
|
180
|
+
*/
|
|
181
|
+
CLIENT_ENABLED = "client_enabled",
|
|
182
|
+
/**
|
|
183
|
+
* Wi-Fi is in CLIENT state and have connected to a network.
|
|
184
|
+
*/
|
|
185
|
+
CLIENT_CONNECTED = "client_connected",
|
|
186
|
+
/**
|
|
187
|
+
* Wi-Fi is in CLIENT state and failed to connect to a network.
|
|
188
|
+
*/
|
|
189
|
+
CLIENT_CONNECT_REJECTED = "client_connect_rejected",
|
|
190
|
+
/**
|
|
191
|
+
* Wi-Fi is in CLIENT state and disconnected from a network.
|
|
192
|
+
*/
|
|
193
|
+
CLIENT_DISCONNECTED = "client_disconnected",
|
|
194
|
+
/**
|
|
195
|
+
* Wi-Fi was set to AP state.
|
|
196
|
+
*/
|
|
197
|
+
AP_ENABLED = "ap_enabled",
|
|
198
|
+
/**
|
|
199
|
+
* Wi-Fi was set to DISABLED state.
|
|
200
|
+
*/
|
|
201
|
+
DISABLED = "disabled"
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
<Separator />
|
|
207
|
+
|
|
208
|
+
### once()
|
|
209
|
+
|
|
210
|
+
The `on()` method sets up a **one-time** listener, which is called whenever the specified event occurs.
|
|
211
|
+
|
|
212
|
+
```ts expandable
|
|
213
|
+
once(event: WifiEvent, listener: () => void): void;
|
|
214
|
+
// show-more
|
|
215
|
+
enum WifiEvent {
|
|
216
|
+
/**
|
|
217
|
+
* Wi-Fi was set to CLIENT state.
|
|
218
|
+
*/
|
|
219
|
+
CLIENT_ENABLED = "client_enabled",
|
|
220
|
+
/**
|
|
221
|
+
* Wi-Fi is in CLIENT state and have connected to a network.
|
|
222
|
+
*/
|
|
223
|
+
CLIENT_CONNECTED = "client_connected",
|
|
224
|
+
/**
|
|
225
|
+
* Wi-Fi is in CLIENT state and failed to connect to a network.
|
|
226
|
+
*/
|
|
227
|
+
CLIENT_CONNECT_REJECTED = "client_connect_rejected",
|
|
228
|
+
/**
|
|
229
|
+
* Wi-Fi is in CLIENT state and disconnected from a network.
|
|
230
|
+
*/
|
|
231
|
+
CLIENT_DISCONNECTED = "client_disconnected",
|
|
232
|
+
/**
|
|
233
|
+
* Wi-Fi was set to AP state.
|
|
234
|
+
*/
|
|
235
|
+
AP_ENABLED = "ap_enabled",
|
|
236
|
+
/**
|
|
237
|
+
* Wi-Fi was set to DISABLED state.
|
|
238
|
+
*/
|
|
239
|
+
DISABLED = "disabled"
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
<Separator />
|
|
245
|
+
|
|
246
|
+
### removeAllListeners()
|
|
247
|
+
|
|
248
|
+
The `removeAllListeners()` method removes all listeners for a specified event or for all events.
|
|
249
|
+
|
|
250
|
+
```ts expandable
|
|
251
|
+
removeAllListeners(event?: WifiEvent): void;
|
|
252
|
+
// show-more
|
|
253
|
+
enum WifiEvent {
|
|
254
|
+
/**
|
|
255
|
+
* Wi-Fi was set to CLIENT state.
|
|
256
|
+
*/
|
|
257
|
+
CLIENT_ENABLED = "client_enabled",
|
|
258
|
+
/**
|
|
259
|
+
* Wi-Fi is in CLIENT state and have connected to a network.
|
|
260
|
+
*/
|
|
261
|
+
CLIENT_CONNECTED = "client_connected",
|
|
262
|
+
/**
|
|
263
|
+
* Wi-Fi is in CLIENT state and failed to connect to a network.
|
|
264
|
+
*/
|
|
265
|
+
CLIENT_CONNECT_REJECTED = "client_connect_rejected",
|
|
266
|
+
/**
|
|
267
|
+
* Wi-Fi is in CLIENT state and disconnected from a network.
|
|
268
|
+
*/
|
|
269
|
+
CLIENT_DISCONNECTED = "client_disconnected",
|
|
270
|
+
/**
|
|
271
|
+
* Wi-Fi was set to AP state.
|
|
272
|
+
*/
|
|
273
|
+
AP_ENABLED = "ap_enabled",
|
|
274
|
+
/**
|
|
275
|
+
* Wi-Fi was set to DISABLED state.
|
|
276
|
+
*/
|
|
277
|
+
DISABLED = "disabled"
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
<Separator />
|
|
283
|
+
|
|
284
|
+
### removeListener()
|
|
285
|
+
|
|
286
|
+
The `removeListener()` method removes a listener previously set up by `on()` or `once()` methods.
|
|
287
|
+
|
|
288
|
+
```ts expandable
|
|
289
|
+
removeListener(event: WifiEvent, listener: () => void): void;
|
|
290
|
+
// show-more
|
|
291
|
+
enum WifiEvent {
|
|
292
|
+
/**
|
|
293
|
+
* Wi-Fi was set to CLIENT state.
|
|
294
|
+
*/
|
|
295
|
+
CLIENT_ENABLED = "client_enabled",
|
|
296
|
+
/**
|
|
297
|
+
* Wi-Fi is in CLIENT state and have connected to a network.
|
|
298
|
+
*/
|
|
299
|
+
CLIENT_CONNECTED = "client_connected",
|
|
300
|
+
/**
|
|
301
|
+
* Wi-Fi is in CLIENT state and failed to connect to a network.
|
|
302
|
+
*/
|
|
303
|
+
CLIENT_CONNECT_REJECTED = "client_connect_rejected",
|
|
304
|
+
/**
|
|
305
|
+
* Wi-Fi is in CLIENT state and disconnected from a network.
|
|
306
|
+
*/
|
|
307
|
+
CLIENT_DISCONNECTED = "client_disconnected",
|
|
308
|
+
/**
|
|
309
|
+
* Wi-Fi was set to AP state.
|
|
310
|
+
*/
|
|
311
|
+
AP_ENABLED = "ap_enabled",
|
|
312
|
+
/**
|
|
313
|
+
* Wi-Fi was set to DISABLED state.
|
|
314
|
+
*/
|
|
315
|
+
DISABLED = "disabled"
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
<Separator />
|
|
321
|
+
|
|
322
|
+
### scanDevices()
|
|
323
|
+
|
|
324
|
+
The `scanDevices()` method initializes a new network scan and available networks.
|
|
325
|
+
|
|
326
|
+
:::info
|
|
327
|
+
|
|
328
|
+
Use `sos.management.supports('WIFI_SCAN')` to check if the device supports scanning for devices.
|
|
329
|
+
|
|
330
|
+
:::
|
|
331
|
+
|
|
332
|
+
```ts expandable
|
|
333
|
+
scanDevices(): Promise<IScannedDevice[]>;
|
|
334
|
+
// show-more
|
|
335
|
+
interface IScannedDevice {
|
|
336
|
+
ssid: string;
|
|
337
|
+
encrypted: boolean;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
#### Possible errors
|
|
343
|
+
|
|
344
|
+
The method throws an error if the Wi-Fi state is not in the `client` state.
|
|
345
|
+
|
|
346
|
+
<Separator />
|
|
347
|
+
|
|
348
|
+
### setCountry()
|
|
349
|
+
|
|
350
|
+
The `getCountry()` method sets the 2-letter country code for the Wi-Fi settings. Different countries may
|
|
351
|
+
have different regulations, when it comes to the Wi-Fi networks. Under normal circumstances, everything should work with default
|
|
352
|
+
settings. However, if you experience any problems, you might want to try changing Wi-Fi country configuration to your country.
|
|
353
|
+
|
|
354
|
+
```ts expandable
|
|
355
|
+
setCountry(countryCode: string): Promise<void>;
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
#### Params
|
|
359
|
+
|
|
360
|
+
| Name | Type | Description |
|
|
361
|
+
|---------------|----------|---------------------------------------------------|
|
|
362
|
+
| `countryCode` | `string` | 2-letter country code from the ISO 3166 standard. |
|
|
363
|
+
|
|
364
|
+
#### Possible errors
|
|
365
|
+
|
|
366
|
+
The method throws an error if the Wi-Fi state is not in the `client` state.
|
|
@@ -1,25 +1,78 @@
|
|
|
1
|
-
import
|
|
2
|
-
import IOpenLinkOptions from './IOpenLinkOptions';
|
|
1
|
+
import Exchange from '../Exchange/Exchange';
|
|
3
2
|
import { CloseEvent } from './events';
|
|
3
|
+
import IOpenLinkOptions, { IDeprecatedOpenLinkOptions } from './IOpenLinkOptions';
|
|
4
4
|
import { IBrowserMessage } from './messages';
|
|
5
|
-
import Exchange from '../Exchange/Exchange';
|
|
6
5
|
import IBrowser from './IBrowser';
|
|
6
|
+
/**
|
|
7
|
+
* The `sos.browser` API groups together methods for working with the integrated web browser.
|
|
8
|
+
*
|
|
9
|
+
* :::info
|
|
10
|
+
*
|
|
11
|
+
* **This API is currently available on:**
|
|
12
|
+
* - Android devices with Android 5+ (Philips, Benq, Sharp, generic Android device)
|
|
13
|
+
*
|
|
14
|
+
* **With some limitation you can use this API also on**
|
|
15
|
+
* - Samsung Tizen (SSSP 4 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
16
|
+
* - LG webOS (webOS 3.0 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
17
|
+
* - Linux (Fedora, Ubuntu), Raspberry Pi, NEC Compute Module; where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
18
|
+
* - BrightSign; where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
19
|
+
*
|
|
20
|
+
* :::
|
|
21
|
+
*/
|
|
7
22
|
export default class Browser implements IBrowser {
|
|
8
23
|
private readonly exchange;
|
|
9
24
|
private readonly events;
|
|
25
|
+
/** @internal */
|
|
10
26
|
constructor(exchange: Exchange<void>);
|
|
27
|
+
/**
|
|
28
|
+
* The `open()` method opens the specified url in a browser window.
|
|
29
|
+
*
|
|
30
|
+
* @param options.aclDomains List of domains to be interpreted according to `aclMode`.
|
|
31
|
+
* @param options.aclMode Either "blacklist" or "whitelist".
|
|
32
|
+
* @param options.readOnlyAddressBar Should the address bar be readonly.
|
|
33
|
+
* @param options.idleTimeout Close browser after specified period if idle.
|
|
34
|
+
* @param options.coordinates Size and position of the browser window. Defaults to fullscreen.
|
|
35
|
+
* @param options.theme Specify custom UI theme. (Android only)
|
|
36
|
+
* @param options.headlessMode Headless mode hides the entire address bar. (Android only)
|
|
37
|
+
* @param options.canUserClose Whether the user can manually close the browser. (default if headless false, else true)
|
|
38
|
+
* @param options.clearData Clear cache after the browser closes. (default if headless false, else true)
|
|
39
|
+
* @param options.method Either "native" or "iframe"
|
|
40
|
+
*
|
|
41
|
+
* @since 4.0.0
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* sos.browser.open('https://www.signageos.io', {
|
|
45
|
+
* aclDomains: ['google.com', 'yahoo.com'],
|
|
46
|
+
* aclMode: 'blacklist', // or 'whitelist'
|
|
47
|
+
* readOnlyAddressBar: true,
|
|
48
|
+
* coordinates: { // Supported only on Linux and Android
|
|
49
|
+
* x: 0,
|
|
50
|
+
* y: 0,
|
|
51
|
+
* height: 500,
|
|
52
|
+
* width: 500,
|
|
53
|
+
* },
|
|
54
|
+
* // theme: { ... }
|
|
55
|
+
* headlessMode: false,
|
|
56
|
+
* });
|
|
57
|
+
*/
|
|
11
58
|
open(uri: string, options?: IOpenLinkOptions): Promise<void>;
|
|
12
|
-
close(): Promise<void>;
|
|
13
59
|
/**
|
|
14
|
-
*
|
|
15
|
-
* This can happen by an API call, by a user request or after a timeout.
|
|
60
|
+
* The `close()` method closes the browser window opened by the `open()` method.
|
|
16
61
|
*
|
|
17
|
-
*
|
|
62
|
+
* @since 4.0.0
|
|
63
|
+
*/
|
|
64
|
+
close(): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* The `onClose()` method sets up a listener, which is called whenever a browser window is closed. This can happen by an API call, by a
|
|
67
|
+
* user request or after a timeout. This doesn't fire between `open` calls or on subsequent `close` calls.
|
|
18
68
|
*
|
|
19
69
|
* @returns A callback which removes the listener.
|
|
20
70
|
*/
|
|
21
71
|
onClose(listener: (event: CloseEvent) => void): () => void;
|
|
72
|
+
/** @internal */
|
|
22
73
|
handleMessageData(data: IBrowserMessage): void;
|
|
23
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated use `sos.browser.open()` instead
|
|
76
|
+
*/
|
|
24
77
|
openLink(uri: string, options?: IDeprecatedOpenLinkOptions): Promise<void>;
|
|
25
78
|
}
|
|
@@ -1,73 +1,125 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
4
|
};
|
|
11
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const events_1 = require("events");
|
|
7
|
+
const Validate_1 = __importDefault(require("../Validate/Validate"));
|
|
8
|
+
const events_2 = require("./events");
|
|
12
9
|
const IOpenLinkOptions_1 = require("./IOpenLinkOptions");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
/**
|
|
11
|
+
* The `sos.browser` API groups together methods for working with the integrated web browser.
|
|
12
|
+
*
|
|
13
|
+
* :::info
|
|
14
|
+
*
|
|
15
|
+
* **This API is currently available on:**
|
|
16
|
+
* - Android devices with Android 5+ (Philips, Benq, Sharp, generic Android device)
|
|
17
|
+
*
|
|
18
|
+
* **With some limitation you can use this API also on**
|
|
19
|
+
* - Samsung Tizen (SSSP 4 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
20
|
+
* - LG webOS (webOS 3.0 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
21
|
+
* - Linux (Fedora, Ubuntu), Raspberry Pi, NEC Compute Module; where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
22
|
+
* - BrightSign; where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
23
|
+
*
|
|
24
|
+
* :::
|
|
25
|
+
*/
|
|
16
26
|
class Browser {
|
|
27
|
+
exchange;
|
|
28
|
+
events = new events_1.EventEmitter();
|
|
29
|
+
/** @internal */
|
|
17
30
|
constructor(exchange) {
|
|
18
31
|
this.exchange = exchange;
|
|
19
|
-
this.events = new events_2.EventEmitter();
|
|
20
32
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The `open()` method opens the specified url in a browser window.
|
|
35
|
+
*
|
|
36
|
+
* @param options.aclDomains List of domains to be interpreted according to `aclMode`.
|
|
37
|
+
* @param options.aclMode Either "blacklist" or "whitelist".
|
|
38
|
+
* @param options.readOnlyAddressBar Should the address bar be readonly.
|
|
39
|
+
* @param options.idleTimeout Close browser after specified period if idle.
|
|
40
|
+
* @param options.coordinates Size and position of the browser window. Defaults to fullscreen.
|
|
41
|
+
* @param options.theme Specify custom UI theme. (Android only)
|
|
42
|
+
* @param options.headlessMode Headless mode hides the entire address bar. (Android only)
|
|
43
|
+
* @param options.canUserClose Whether the user can manually close the browser. (default if headless false, else true)
|
|
44
|
+
* @param options.clearData Clear cache after the browser closes. (default if headless false, else true)
|
|
45
|
+
* @param options.method Either "native" or "iframe"
|
|
46
|
+
*
|
|
47
|
+
* @since 4.0.0
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* sos.browser.open('https://www.signageos.io', {
|
|
51
|
+
* aclDomains: ['google.com', 'yahoo.com'],
|
|
52
|
+
* aclMode: 'blacklist', // or 'whitelist'
|
|
53
|
+
* readOnlyAddressBar: true,
|
|
54
|
+
* coordinates: { // Supported only on Linux and Android
|
|
55
|
+
* x: 0,
|
|
56
|
+
* y: 0,
|
|
57
|
+
* height: 500,
|
|
58
|
+
* width: 500,
|
|
59
|
+
* },
|
|
60
|
+
* // theme: { ... }
|
|
61
|
+
* headlessMode: false,
|
|
62
|
+
* });
|
|
63
|
+
*/
|
|
64
|
+
async open(uri, options = {}) {
|
|
65
|
+
(0, Validate_1.default)({ uri }).required().uri();
|
|
66
|
+
(0, Validate_1.default)({ options }).required().object(IOpenLinkOptions_1.VIOpenLinkOptions);
|
|
67
|
+
const headlessMode = options.headlessMode ?? true;
|
|
68
|
+
await this.exchange.postMessage({
|
|
69
|
+
uri,
|
|
70
|
+
...options,
|
|
71
|
+
headlessMode,
|
|
72
|
+
type: 'open',
|
|
28
73
|
});
|
|
29
74
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
75
|
+
/**
|
|
76
|
+
* The `close()` method closes the browser window opened by the `open()` method.
|
|
77
|
+
*
|
|
78
|
+
* @since 4.0.0
|
|
79
|
+
*/
|
|
80
|
+
async close() {
|
|
81
|
+
await this.exchange.postMessage({
|
|
82
|
+
type: 'close',
|
|
35
83
|
});
|
|
36
84
|
}
|
|
37
85
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* This doesn't fire between `open` calls or on subsequent `close` calls.
|
|
86
|
+
* The `onClose()` method sets up a listener, which is called whenever a browser window is closed. This can happen by an API call, by a
|
|
87
|
+
* user request or after a timeout. This doesn't fire between `open` calls or on subsequent `close` calls.
|
|
42
88
|
*
|
|
43
89
|
* @returns A callback which removes the listener.
|
|
44
90
|
*/
|
|
45
91
|
onClose(listener) {
|
|
46
92
|
(0, Validate_1.default)({ listener }).required().function();
|
|
47
|
-
this.events.addListener(
|
|
93
|
+
this.events.addListener(events_2.EventType.CLOSE, listener);
|
|
48
94
|
return () => {
|
|
49
|
-
this.events.removeListener(
|
|
95
|
+
this.events.removeListener(events_2.EventType.CLOSE, listener);
|
|
50
96
|
};
|
|
51
97
|
}
|
|
98
|
+
/** @internal */
|
|
52
99
|
handleMessageData(data) {
|
|
53
100
|
switch (data.type) {
|
|
54
101
|
case this.exchange.messageNameToType('closed'):
|
|
55
102
|
const event = {
|
|
56
|
-
type:
|
|
103
|
+
type: events_2.EventType.CLOSE,
|
|
57
104
|
reason: data.reason,
|
|
58
105
|
};
|
|
59
|
-
this.events.emit(
|
|
106
|
+
this.events.emit(events_2.EventType.CLOSE, event);
|
|
60
107
|
break;
|
|
61
108
|
default:
|
|
62
109
|
}
|
|
63
110
|
}
|
|
64
|
-
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated use `sos.browser.open()` instead
|
|
113
|
+
*/
|
|
114
|
+
async openLink(uri, options = {}) {
|
|
115
|
+
console.warn('sos.browser.openLink() is deprecated and will be removed in the future versions. Use sos.browser.open() instead.');
|
|
116
|
+
(0, Validate_1.default)({ uri }).required().uri();
|
|
117
|
+
(0, Validate_1.default)({ options }).required().object();
|
|
118
|
+
await this.exchange.postMessage({
|
|
119
|
+
uri,
|
|
120
|
+
...options,
|
|
121
|
+
headlessMode: false,
|
|
122
|
+
type: 'open_link',
|
|
71
123
|
});
|
|
72
124
|
}
|
|
73
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Browser.js","sourceRoot":"","sources":["../../../src/FrontApplet/Browser/Browser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Browser.js","sourceRoot":"","sources":["../../../src/FrontApplet/Browser/Browser.ts"],"names":[],"mappings":";;;;;AAAA,mCAAsC;AAEtC,oEAA4C;AAC5C,qCAA8D;AAC9D,yDAAqG;AAIrG;;;;;;;;;;;;;;;GAeG;AACH,MAAqB,OAAO;IAIE;IAHZ,MAAM,GAAiB,IAAI,qBAAY,EAAE,CAAC;IAE3D,gBAAgB;IAChB,YAA6B,QAAwB;QAAxB,aAAQ,GAAR,QAAQ,CAAgB;IAAG,CAAC;IAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACI,KAAK,CAAC,IAAI,CAAC,GAAW,EAAE,UAA4B,EAAE;QAC5D,IAAA,kBAAQ,EAAC,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC;QACnC,IAAA,kBAAQ,EAAC,EAAE,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,oCAAiB,CAAC,CAAC;QAE3D,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,IAAI,CAAC;QAClD,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;YAC/B,GAAG;YACH,GAAG,OAAO;YACV,YAAY;YACZ,IAAI,EAAE,MAAM;SACZ,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,KAAK;QACjB,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;YAC/B,IAAI,EAAE,OAAO;SACb,CAAC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,OAAO,CAAC,QAAqC;QACnD,IAAA,kBAAQ,EAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC;QAE7C,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,kBAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACnD,OAAO,GAAG,EAAE;YACX,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,kBAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACvD,CAAC,CAAC;IACH,CAAC;IAED,gBAAgB;IACT,iBAAiB,CAAC,IAAqB;QAC7C,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,CAAC;gBAC7C,MAAM,KAAK,GAAe;oBACzB,IAAI,EAAE,kBAAS,CAAC,KAAK;oBACrB,MAAM,EAAE,IAAI,CAAC,MAAqB;iBAClC,CAAC;gBACF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBACzC,MAAM;YACP,QAAQ;QACT,CAAC;IACF,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,QAAQ,CAAC,GAAW,EAAE,UAAsC,EAAE;QAC1E,OAAO,CAAC,IAAI,CAAC,kHAAkH,CAAC,CAAC;QAEjI,IAAA,kBAAQ,EAAC,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC;QACnC,IAAA,kBAAQ,EAAC,EAAE,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC;QAE1C,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;YAC/B,GAAG;YACH,GAAG,OAAO;YACV,YAAY,EAAE,KAAK;YACnB,IAAI,EAAE,WAAW;SACjB,CAAC,CAAC;IACJ,CAAC;CACD;AA1GD,0BA0GC"}
|
|
@@ -4,12 +4,12 @@ exports.CloseReason = exports.VIEventType = exports.EventType = void 0;
|
|
|
4
4
|
var EventType;
|
|
5
5
|
(function (EventType) {
|
|
6
6
|
EventType["CLOSE"] = "close";
|
|
7
|
-
})(EventType
|
|
7
|
+
})(EventType || (exports.EventType = EventType = {}));
|
|
8
8
|
exports.VIEventType = ['close'];
|
|
9
9
|
var CloseReason;
|
|
10
10
|
(function (CloseReason) {
|
|
11
11
|
CloseReason["API"] = "API";
|
|
12
12
|
CloseReason["USER"] = "USER";
|
|
13
13
|
CloseReason["TIMEOUT"] = "TIMEOUT";
|
|
14
|
-
})(CloseReason
|
|
14
|
+
})(CloseReason || (exports.CloseReason = CloseReason = {}));
|
|
15
15
|
//# sourceMappingURL=events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/FrontApplet/Browser/events.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAEX;AAFD,WAAY,SAAS;IACpB,4BAAe,CAAA;AAChB,CAAC,EAFW,SAAS,
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/FrontApplet/Browser/events.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAEX;AAFD,WAAY,SAAS;IACpB,4BAAe,CAAA;AAChB,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB;AAEY,QAAA,WAAW,GAAG,CAAC,OAAO,CAAC,CAAC;AAUrC,IAAY,WAIX;AAJD,WAAY,WAAW;IACtB,0BAAW,CAAA;IACX,4BAAa,CAAA;IACb,kCAAmB,CAAA;AACpB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB"}
|