@signageos/front-applet 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +207 -0
- package/README.md +3 -0
- package/dist/bundle.js +9 -0
- package/dist/bundle.js.map +1 -0
- package/docs/README.md +5 -0
- package/docs/js-api/js-api-introduction.md +73 -0
- package/docs/js-api/js-applet-basics.md +294 -0
- package/docs/js-api/js-applet-resources.md +172 -0
- package/docs/js-api/js-browser.md +170 -0
- package/docs/js-api/js-command.md +208 -0
- package/docs/js-api/js-display.md +48 -0
- package/docs/js-api/js-file-system.md +568 -0
- package/docs/js-api/js-hardware-serial.md +142 -0
- package/docs/js-api/js-hardware.md +70 -0
- package/docs/js-api/js-iframes.md +88 -0
- package/docs/js-api/js-input.md +84 -0
- package/docs/js-api/js-loading-fonts.md +138 -0
- package/docs/js-api/js-monitoring-commands.md +108 -0
- package/docs/js-api/js-monitors.md +55 -0
- package/docs/js-api/js-offline-cache-media-files.md +314 -0
- package/docs/js-api/js-offline-cache-simple-data.md +134 -0
- package/docs/js-api/js-sensors.md +70 -0
- package/docs/js-api/js-sync-playback.md +197 -0
- package/docs/js-api/js-timing.md +54 -0
- package/docs/js-api/js-video-inputs-internal-ports.md +149 -0
- package/docs/js-api/js-video-stream.md +230 -0
- package/docs/js-api/js-video.md +282 -0
- package/docs/management-api/1-js-management.md +133 -0
- package/docs/management-api/10-js-management-application.md +123 -0
- package/docs/management-api/11-js-management-network.md +185 -0
- package/docs/management-api/12-js-management-security.md +86 -0
- package/docs/management-api/13-js-management-wifi.md +357 -0
- package/docs/management-api/2-js-management-firmware.md +93 -0
- package/docs/management-api/3-js-management-remote-control.md +73 -0
- package/docs/management-api/4-js-management-power.md +94 -0
- package/docs/management-api/5-js-management-screen.md +263 -0
- package/docs/management-api/6-js-management-time.md +166 -0
- package/docs/management-api/7-js-management-volume.md +46 -0
- package/docs/management-api/8-js-management-package.md +62 -0
- package/docs/management-api/9-js-management-debug.md +53 -0
- package/es6/FrontApplet/Browser/Browser.d.ts +24 -0
- package/es6/FrontApplet/Browser/Browser.js +73 -0
- package/es6/FrontApplet/Browser/Browser.js.map +1 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +174 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js +55 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -0
- package/es6/FrontApplet/Browser/events.d.ts +15 -0
- package/es6/FrontApplet/Browser/events.js +14 -0
- package/es6/FrontApplet/Browser/events.js.map +1 -0
- package/es6/FrontApplet/Browser/messages.d.ts +5 -0
- package/es6/FrontApplet/Browser/messages.js +3 -0
- package/es6/FrontApplet/Browser/messages.js.map +1 -0
- package/es6/FrontApplet/Command/Command.d.ts +16 -0
- package/es6/FrontApplet/Command/Command.js +68 -0
- package/es6/FrontApplet/Command/Command.js.map +1 -0
- package/es6/FrontApplet/Command/ICommand.d.ts +4 -0
- package/es6/FrontApplet/Command/ICommand.js +3 -0
- package/es6/FrontApplet/Command/ICommand.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.js +3 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandEvent.js +3 -0
- package/es6/FrontApplet/Command/ICommandEvent.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandEventListener.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandEventListener.js +3 -0
- package/es6/FrontApplet/Command/ICommandEventListener.js.map +1 -0
- package/es6/FrontApplet/Debug/Debug.d.ts +22 -0
- package/es6/FrontApplet/Debug/Debug.js +35 -0
- package/es6/FrontApplet/Debug/Debug.js.map +1 -0
- package/es6/FrontApplet/Display/Display.d.ts +11 -0
- package/es6/FrontApplet/Display/Display.js +35 -0
- package/es6/FrontApplet/Display/Display.js.map +1 -0
- package/es6/FrontApplet/Error/AppletCommandError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletCommandError.js +11 -0
- package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletError.d.ts +7 -0
- package/es6/FrontApplet/Error/AppletError.js +10 -0
- package/es6/FrontApplet/Error/AppletError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletHardwareError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletHardwareError.js +11 -0
- package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.d.ts +8 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js +10 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletResourcesError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletResourcesError.js +11 -0
- package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletSecurityError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletSecurityError.js +11 -0
- package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletStreamError.d.ts +8 -0
- package/es6/FrontApplet/Error/AppletStreamError.js +10 -0
- package/es6/FrontApplet/Error/AppletStreamError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletVideoError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletVideoError.js +11 -0
- package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorCodes.d.ts +18 -0
- package/es6/FrontApplet/Error/ErrorCodes.js +23 -0
- package/es6/FrontApplet/Error/ErrorCodes.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.d.ts +3 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.js +22 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.d.ts +6 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js +10 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js.map +1 -0
- package/es6/FrontApplet/Error/FileNotFoundError.d.ts +8 -0
- package/es6/FrontApplet/Error/FileNotFoundError.js +10 -0
- package/es6/FrontApplet/Error/FileNotFoundError.js.map +1 -0
- package/es6/FrontApplet/Error/SosError.d.ts +20 -0
- package/es6/FrontApplet/Error/SosError.js +22 -0
- package/es6/FrontApplet/Error/SosError.js.map +1 -0
- package/es6/FrontApplet/Error/errorHelper.d.ts +12 -0
- package/es6/FrontApplet/Error/errorHelper.js +50 -0
- package/es6/FrontApplet/Error/errorHelper.js.map +1 -0
- package/es6/FrontApplet/Exchange/Exchange.d.ts +7 -0
- package/es6/FrontApplet/Exchange/Exchange.js +28 -0
- package/es6/FrontApplet/Exchange/Exchange.js.map +1 -0
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +30 -0
- package/es6/FrontApplet/FileSystem/FileSystem.js +210 -0
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.d.ts +4 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.js +3 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.js.map +1 -0
- package/es6/FrontApplet/FileSystem/types.d.ts +66 -0
- package/es6/FrontApplet/FileSystem/types.js +20 -0
- package/es6/FrontApplet/FileSystem/types.js.map +1 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.d.ts +6 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js +46 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -0
- package/es6/FrontApplet/FrontApplet.d.ts +56 -0
- package/es6/FrontApplet/FrontApplet.js +183 -0
- package/es6/FrontApplet/FrontApplet.js.map +1 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +30 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +92 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.d.ts +5 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.js +3 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/Hardware.d.ts +20 -0
- package/es6/FrontApplet/Hardware/Hardware.js +51 -0
- package/es6/FrontApplet/Hardware/Hardware.js.map +1 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.d.ts +6 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.js +3 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.d.ts +15 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js +11 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.d.ts +5 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.js +3 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/Led/Led.d.ts +11 -0
- package/es6/FrontApplet/Hardware/Led/Led.js +38 -0
- package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -0
- package/es6/FrontApplet/Hardware/SerialPort.d.ts +14 -0
- package/es6/FrontApplet/Hardware/SerialPort.js +45 -0
- package/es6/FrontApplet/Hardware/SerialPort.js.map +1 -0
- package/es6/FrontApplet/Hash/generator.d.ts +1 -0
- package/es6/FrontApplet/Hash/generator.js +10 -0
- package/es6/FrontApplet/Hash/generator.js.map +1 -0
- package/es6/FrontApplet/IMessage.d.ts +6 -0
- package/es6/FrontApplet/IMessage.js +3 -0
- package/es6/FrontApplet/IMessage.js.map +1 -0
- package/es6/FrontApplet/IPostMessage.d.ts +5 -0
- package/es6/FrontApplet/IPostMessage.js +3 -0
- package/es6/FrontApplet/IPostMessage.js.map +1 -0
- package/es6/FrontApplet/Iframe/Iframe.d.ts +24 -0
- package/es6/FrontApplet/Iframe/Iframe.js +51 -0
- package/es6/FrontApplet/Iframe/Iframe.js.map +1 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.d.ts +6 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.js +3 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.js.map +1 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +6 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js +3 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.d.ts +5 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.js +3 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.js.map +1 -0
- package/es6/FrontApplet/Input/Input.d.ts +20 -0
- package/es6/FrontApplet/Input/Input.js +35 -0
- package/es6/FrontApplet/Input/Input.js.map +1 -0
- package/es6/FrontApplet/Management/App.d.ts +37 -0
- package/es6/FrontApplet/Management/App.js +50 -0
- package/es6/FrontApplet/Management/App.js.map +1 -0
- package/es6/FrontApplet/Management/Audio.d.ts +9 -0
- package/es6/FrontApplet/Management/Audio.js +40 -0
- package/es6/FrontApplet/Management/Audio.js.map +1 -0
- package/es6/FrontApplet/Management/Debug.d.ts +11 -0
- package/es6/FrontApplet/Management/Debug.js +50 -0
- package/es6/FrontApplet/Management/Debug.js.map +1 -0
- package/es6/FrontApplet/Management/Firmware.d.ts +37 -0
- package/es6/FrontApplet/Management/Firmware.js +50 -0
- package/es6/FrontApplet/Management/Firmware.js.map +1 -0
- package/es6/FrontApplet/Management/FirmwareType.d.ts +4 -0
- package/es6/FrontApplet/Management/FirmwareType.js +8 -0
- package/es6/FrontApplet/Management/FirmwareType.js.map +1 -0
- package/es6/FrontApplet/Management/IBatteryStatus.d.ts +7 -0
- package/es6/FrontApplet/Management/IBatteryStatus.js +3 -0
- package/es6/FrontApplet/Management/IBatteryStatus.js.map +1 -0
- package/es6/FrontApplet/Management/IBrightness.d.ts +6 -0
- package/es6/FrontApplet/Management/IBrightness.js +3 -0
- package/es6/FrontApplet/Management/IBrightness.js.map +1 -0
- package/es6/FrontApplet/Management/INetworkInfo.d.ts +53 -0
- package/es6/FrontApplet/Management/INetworkInfo.js +17 -0
- package/es6/FrontApplet/Management/INetworkInfo.js.map +1 -0
- package/es6/FrontApplet/Management/IOrientation.d.ts +4 -0
- package/es6/FrontApplet/Management/IOrientation.js +3 -0
- package/es6/FrontApplet/Management/IOrientation.js.map +1 -0
- package/es6/FrontApplet/Management/IWifiEvent.d.ts +11 -0
- package/es6/FrontApplet/Management/IWifiEvent.js +12 -0
- package/es6/FrontApplet/Management/IWifiEvent.js.map +1 -0
- package/es6/FrontApplet/Management/Management.d.ts +44 -0
- package/es6/FrontApplet/Management/Management.js +113 -0
- package/es6/FrontApplet/Management/Management.js.map +1 -0
- package/es6/FrontApplet/Management/Network.d.ts +26 -0
- package/es6/FrontApplet/Management/Network.js +83 -0
- package/es6/FrontApplet/Management/Network.js.map +1 -0
- package/es6/FrontApplet/Management/Package.d.ts +8 -0
- package/es6/FrontApplet/Management/Package.js +38 -0
- package/es6/FrontApplet/Management/Package.js.map +1 -0
- package/es6/FrontApplet/Management/Power.d.ts +13 -0
- package/es6/FrontApplet/Management/Power.js +78 -0
- package/es6/FrontApplet/Management/Power.js.map +1 -0
- package/es6/FrontApplet/Management/RemoteControl.d.ts +14 -0
- package/es6/FrontApplet/Management/RemoteControl.js +61 -0
- package/es6/FrontApplet/Management/RemoteControl.js.map +1 -0
- package/es6/FrontApplet/Management/Screen.d.ts +18 -0
- package/es6/FrontApplet/Management/Screen.js +114 -0
- package/es6/FrontApplet/Management/Screen.js.map +1 -0
- package/es6/FrontApplet/Management/Security.d.ts +21 -0
- package/es6/FrontApplet/Management/Security.js +56 -0
- package/es6/FrontApplet/Management/Security.js.map +1 -0
- package/es6/FrontApplet/Management/Time.d.ts +16 -0
- package/es6/FrontApplet/Management/Time.js +59 -0
- package/es6/FrontApplet/Management/Time.js.map +1 -0
- package/es6/FrontApplet/Management/Wifi.d.ts +29 -0
- package/es6/FrontApplet/Management/Wifi.js +151 -0
- package/es6/FrontApplet/Management/Wifi.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.d.ts +21 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js +16 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.d.ts +2 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js +21 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.d.ts +25 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.js +23 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.d.ts +5 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js +35 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.d.ts +4 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.js +8 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.js.map +1 -0
- package/es6/FrontApplet/Monitors/Monitors.d.ts +16 -0
- package/es6/FrontApplet/Monitors/Monitors.js +31 -0
- package/es6/FrontApplet/Monitors/Monitors.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/Cache.d.ts +38 -0
- package/es6/FrontApplet/Offline/Cache/Cache.js +199 -0
- package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IFile.d.ts +4 -0
- package/es6/FrontApplet/Offline/Cache/IFile.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IFile.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.d.ts +6 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.d.ts +4 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.d.ts +6 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +12 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +47 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.d.ts +16 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.js +8 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.d.ts +12 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.js +3 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +7 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.js +3 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.js.map +1 -0
- package/es6/FrontApplet/Offline/IAddFont.d.ts +50 -0
- package/es6/FrontApplet/Offline/IAddFont.js +22 -0
- package/es6/FrontApplet/Offline/IAddFont.js.map +1 -0
- package/es6/FrontApplet/Offline/IElement.d.ts +7 -0
- package/es6/FrontApplet/Offline/IElement.js +6 -0
- package/es6/FrontApplet/Offline/IElement.js.map +1 -0
- package/es6/FrontApplet/Offline/IFileType.d.ts +3 -0
- package/es6/FrontApplet/Offline/IFileType.js +4 -0
- package/es6/FrontApplet/Offline/IFileType.js.map +1 -0
- package/es6/FrontApplet/Offline/ISaveFile.d.ts +49 -0
- package/es6/FrontApplet/Offline/ISaveFile.js +26 -0
- package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.d.ts +7 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js +26 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.d.ts +8 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.js +3 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.d.ts +8 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.js +3 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.d.ts +7 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js +25 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/Offline.d.ts +27 -0
- package/es6/FrontApplet/Offline/Offline.js +105 -0
- package/es6/FrontApplet/Offline/Offline.js.map +1 -0
- package/es6/FrontApplet/Offline/Types.d.ts +7 -0
- package/es6/FrontApplet/Offline/Types.js +9 -0
- package/es6/FrontApplet/Offline/Types.js.map +1 -0
- package/es6/FrontApplet/Sensors/Proximity.d.ts +16 -0
- package/es6/FrontApplet/Sensors/Proximity.js +36 -0
- package/es6/FrontApplet/Sensors/Proximity.js.map +1 -0
- package/es6/FrontApplet/Sensors/Sensors.d.ts +11 -0
- package/es6/FrontApplet/Sensors/Sensors.js +18 -0
- package/es6/FrontApplet/Sensors/Sensors.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamEvent.d.ts +6 -0
- package/es6/FrontApplet/Stream/IStreamEvent.js +3 -0
- package/es6/FrontApplet/Stream/IStreamEvent.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.d.ts +5 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.js +3 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamMessage.d.ts +6 -0
- package/es6/FrontApplet/Stream/IStreamMessage.js +3 -0
- package/es6/FrontApplet/Stream/IStreamMessage.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamProperties.d.ts +10 -0
- package/es6/FrontApplet/Stream/IStreamProperties.js +3 -0
- package/es6/FrontApplet/Stream/IStreamProperties.js.map +1 -0
- package/es6/FrontApplet/Stream/Stream.d.ts +22 -0
- package/es6/FrontApplet/Stream/Stream.js +131 -0
- package/es6/FrontApplet/Stream/Stream.js.map +1 -0
- package/es6/FrontApplet/Stream/StreamProtocol.d.ts +9 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js +13 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -0
- package/es6/FrontApplet/Stream/streamEvents.d.ts +8 -0
- package/es6/FrontApplet/Stream/streamEvents.js +3 -0
- package/es6/FrontApplet/Stream/streamEvents.js.map +1 -0
- package/es6/FrontApplet/Sync/ISyncEvent.d.ts +4 -0
- package/es6/FrontApplet/Sync/ISyncEvent.js +3 -0
- package/es6/FrontApplet/Sync/ISyncEvent.js.map +1 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.d.ts +7 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.js +3 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.js.map +1 -0
- package/es6/FrontApplet/Sync/Sync.d.ts +20 -0
- package/es6/FrontApplet/Sync/Sync.js +102 -0
- package/es6/FrontApplet/Sync/Sync.js.map +1 -0
- package/es6/FrontApplet/Sync/syncEvents.d.ts +6 -0
- package/es6/FrontApplet/Sync/syncEvents.js +3 -0
- package/es6/FrontApplet/Sync/syncEvents.js.map +1 -0
- package/es6/FrontApplet/Timing/Timing.d.ts +10 -0
- package/es6/FrontApplet/Timing/Timing.js +16 -0
- package/es6/FrontApplet/Timing/Timing.js.map +1 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.d.ts +2 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.js +4 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.js.map +1 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.d.ts +11 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js +33 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.d.ts +6 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.js +3 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.js.map +1 -0
- package/es6/FrontApplet/Touch/Touch.d.ts +13 -0
- package/es6/FrontApplet/Touch/Touch.js +54 -0
- package/es6/FrontApplet/Touch/Touch.js.map +1 -0
- package/es6/FrontApplet/Validate/Validate.d.ts +43 -0
- package/es6/FrontApplet/Validate/Validate.js +266 -0
- package/es6/FrontApplet/Validate/Validate.js.map +1 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.d.ts +8 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js +140 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoEvent.d.ts +8 -0
- package/es6/FrontApplet/Video/IVideoEvent.js +6 -0
- package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoEventListener.d.ts +5 -0
- package/es6/FrontApplet/Video/IVideoEventListener.js +3 -0
- package/es6/FrontApplet/Video/IVideoEventListener.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoMessage.d.ts +4 -0
- package/es6/FrontApplet/Video/IVideoMessage.js +3 -0
- package/es6/FrontApplet/Video/IVideoMessage.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoProperties.d.ts +8 -0
- package/es6/FrontApplet/Video/IVideoProperties.js +3 -0
- package/es6/FrontApplet/Video/IVideoProperties.js.map +1 -0
- package/es6/FrontApplet/Video/Video.d.ts +39 -0
- package/es6/FrontApplet/Video/Video.js +242 -0
- package/es6/FrontApplet/Video/Video.js.map +1 -0
- package/es6/FrontApplet/createFrontApplet.d.ts +2 -0
- package/es6/FrontApplet/createFrontApplet.js +9 -0
- package/es6/FrontApplet/createFrontApplet.js.map +1 -0
- package/es6/Monitoring/Console/consoleCommands.d.ts +6 -0
- package/es6/Monitoring/Console/consoleCommands.js +4 -0
- package/es6/Monitoring/Console/consoleCommands.js.map +1 -0
- package/es6/Monitoring/Html/htmlCommands.d.ts +9 -0
- package/es6/Monitoring/Html/htmlCommands.js +5 -0
- package/es6/Monitoring/Html/htmlCommands.js.map +1 -0
- package/es6/Monitoring/Montoring.d.ts +12 -0
- package/es6/Monitoring/Montoring.js +159 -0
- package/es6/Monitoring/Montoring.js.map +1 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.d.ts +20 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.js +7 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.js.map +1 -0
- package/es6/Monitoring/Timing/timingCommands.d.ts +4 -0
- package/es6/Monitoring/Timing/timingCommands.js +4 -0
- package/es6/Monitoring/Timing/timingCommands.js.map +1 -0
- package/es6/Monitoring/Video/videoCommands.d.ts +10 -0
- package/es6/Monitoring/Video/videoCommands.js +4 -0
- package/es6/Monitoring/Video/videoCommands.js.map +1 -0
- package/es6/Monitoring/monitoringCommands.d.ts +8 -0
- package/es6/Monitoring/monitoringCommands.js +5 -0
- package/es6/Monitoring/monitoringCommands.js.map +1 -0
- package/es6/Sensors/IButton.d.ts +9 -0
- package/es6/Sensors/IButton.js +8 -0
- package/es6/Sensors/IButton.js.map +1 -0
- package/es6/Sensors/IRfidAntenna.d.ts +10 -0
- package/es6/Sensors/IRfidAntenna.js +8 -0
- package/es6/Sensors/IRfidAntenna.js.map +1 -0
- package/es6/bundle.d.ts +12 -0
- package/es6/bundle.js +13 -0
- package/es6/bundle.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Synchronized playback
|
|
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] Sync API enables multiple devices to communicate and coordinate their behavior with each other. The communication is facilitated by the server. At any given moment, one of the devices is chosen by the server to be the master and all other devices become slaves."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Sync playback across multiple devices
|
|
15
|
+
|
|
16
|
+
Sync API enables multiple devices to communicate and coordinate their behavior with each other. The communication is facilitated by the server. At any given moment, one of the devices is chosen by the server to be the master and all other devices become slaves.
|
|
17
|
+
|
|
18
|
+
**Uses:**
|
|
19
|
+
* **Play content** in sync on multiple devices
|
|
20
|
+
* **Videowall** - gapless video playback still available
|
|
21
|
+
|
|
22
|
+
## All methods
|
|
23
|
+
|
|
24
|
+
::: table-responsive
|
|
25
|
+
| Methods/Events | Description | Supported since |
|
|
26
|
+
| ----------------- | ----------- | :---------------: |
|
|
27
|
+
| `connect()` | Connect to the sync server. | 1.0.32 |
|
|
28
|
+
| `close()` | Closes the connection to the sync server. | 1.0.32 |
|
|
29
|
+
| `init()` | Initialize of sync group | 1.0.32 |
|
|
30
|
+
| `wait()` | Method used when device must wait on other devices for proper sync | 1.0.32 |
|
|
31
|
+
| `setValue()` | Used for broadcast values for all master devices | 2.0.0 |
|
|
32
|
+
| `onValue()` | Event called when device receives any value | 2.0.0 |
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
## Examples
|
|
36
|
+
<div class="row d-flex align-content-stretch force-padding-10">
|
|
37
|
+
<div class="col-12 d-flex">
|
|
38
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/sync-video">
|
|
39
|
+
<div>
|
|
40
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
41
|
+
<i class="fab fa-github svg-black"></i>
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Synchronized video through applets</h3>
|
|
45
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</a>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div class="row d-flex align-content-stretch force-padding-10">
|
|
53
|
+
<div class="col-12 d-flex">
|
|
54
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/sync-mixed-content">
|
|
55
|
+
<div>
|
|
56
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
57
|
+
<i class="fab fa-github svg-black"></i>
|
|
58
|
+
</div>
|
|
59
|
+
<div>
|
|
60
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Synchronization mixed content</h3>
|
|
61
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</a>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
## connect()
|
|
69
|
+
Connect to the sync server. This initializes the connection and is mandatory to call, since synchronization is an optional feature and doesn’t get initialized by default to save resources and bandwidth. You can optionally specify a custom sync server URI in case you are running the sync server in a custom location.
|
|
70
|
+
|
|
71
|
+
### Parameters
|
|
72
|
+
::: table-responsive
|
|
73
|
+
| Param | Type | Required | Description |
|
|
74
|
+
| -------------- | ---------- | :----: | ---------------------------- |
|
|
75
|
+
| `syncServerUri`| String | <div class="yellow">No</div> | Address of sync server |
|
|
76
|
+
:::
|
|
77
|
+
|
|
78
|
+
### Javascript example
|
|
79
|
+
```javascript
|
|
80
|
+
await sos.sync.connect(syncServerUri).then(() => {
|
|
81
|
+
// do other things once connected
|
|
82
|
+
})
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## close()
|
|
86
|
+
Closes the connection to the sync server. Recommended to call this method after the synchronization is not required any longer.
|
|
87
|
+
|
|
88
|
+
### Javascript example
|
|
89
|
+
```javascript
|
|
90
|
+
await sos.sync.close().then(() => {
|
|
91
|
+
// do other things once closed
|
|
92
|
+
})
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## init()
|
|
96
|
+
Once the user is connected to the server, the initialization of the sync group is required. Before any communication takes place, all participating devices have to be connected and recognize one another. Recommended to call this method early.
|
|
97
|
+
|
|
98
|
+
### Parameters
|
|
99
|
+
::: table-responsive
|
|
100
|
+
| Param | Type | Required | Description |
|
|
101
|
+
| -------------- | ------- | :-----: | ---------------------------- |
|
|
102
|
+
| `groupName` | String | <div class="yellow">No</div> | By default, all devices will be synced together. To create Groups of devices, independent from each other, specify group name |
|
|
103
|
+
:::
|
|
104
|
+
|
|
105
|
+
### Javascript example
|
|
106
|
+
```javascript
|
|
107
|
+
await sos.sync.init('someRandomNameGroup');
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## wait()
|
|
111
|
+
One way to synchronize devices is to make them wait for each other at a certain moment. This would be most commonly used before the device hits “play” on a video, to make it wait for other devices so they all start playing the video at the same time.
|
|
112
|
+
|
|
113
|
+
This method returns a promise that resolves once all the devices meet and are ready to continue together. Any action that results in visible synchronized behavior should be triggered immediately after and any related background preparations should be called before to prevent delays.
|
|
114
|
+
|
|
115
|
+
Sometimes devices might go out of sync due to unpredictable conditions like loss of internet connection. To ensure re-sync of an out of sync device, you can pass some data as the first argument. This can be any data that informs the whole group about what content is about to play next. Once all devices are ready, data from the master device is passed to everyone and the rest of the data is ignored. Therefore, when implementing your applet you should rely on the result data and not the data that is passed to the wait method as an argument.
|
|
116
|
+
|
|
117
|
+
### Parameters
|
|
118
|
+
::: table-responsive
|
|
119
|
+
| Param | Type | Required | Description |
|
|
120
|
+
| -------------- | ------- | :-----: | ------- |
|
|
121
|
+
| `data` | Any | <div class="yellow">No</div> | Information about what content is about to play so all the devices display the same content. |
|
|
122
|
+
| `groupName` | String | <div class="yellow">No</div> | If a custom group name in init call is specified, the same group name as the second argument has to be passed. |
|
|
123
|
+
| `timeout` | Number | <div class="yellow">No</div> | Wait timeout on other devices |
|
|
124
|
+
:::
|
|
125
|
+
|
|
126
|
+
### Returns
|
|
127
|
+
Promise that resolves to data picked from the first argument of the master device
|
|
128
|
+
|
|
129
|
+
## Option Broadcast values:
|
|
130
|
+
Another way to synchronize devices is to broadcast some values within the group so, in turn, all devices can react to it. Unlike option wait, this is more useful in use cases when the synchronization is based around the content itself, rather than timing.
|
|
131
|
+
|
|
132
|
+
### All Methods
|
|
133
|
+
::: table-responsive
|
|
134
|
+
| Method | Type | Description | Supported since |
|
|
135
|
+
| ------ | ------ | -------- | ------------- |
|
|
136
|
+
| `setValue()` | method | Used for broadcast values for all master devices | 2.0.0 |
|
|
137
|
+
| `onValue()` | event | Event called when device receive any value | 2.0.0 |
|
|
138
|
+
:::
|
|
139
|
+
|
|
140
|
+
## setValue()
|
|
141
|
+
This method can be called by any device to broadcast a value to the whole group, but only master devices’ values are broadcasted, while slave devices are ignored. Again, this is to ensure consistency and allow re-syncing of out of sync devices.
|
|
142
|
+
|
|
143
|
+
### Parameters
|
|
144
|
+
::: table-responsive
|
|
145
|
+
| Param |Type | Required | Description |
|
|
146
|
+
| -------------- | --------- | :------: | ------------------- |
|
|
147
|
+
| `key` | String | <div class="red">Yes</div> | Values are recognized based their key so different types of values can be broadcasted independently within the group |
|
|
148
|
+
| `value` | Any | <div class="red">Yes</div> | The value to be broadcasted |
|
|
149
|
+
| `groupName` | String | <div class="yellow">No</div> | If a custom group name in init call is specified, the same group name has to be passed as the third argument |
|
|
150
|
+
:::
|
|
151
|
+
|
|
152
|
+
## Event onValue()
|
|
153
|
+
Every device should register a listener to receive and process broadcasted values.
|
|
154
|
+
|
|
155
|
+
### Javascript example
|
|
156
|
+
```javascript
|
|
157
|
+
await sos.sync.onValue((key, value, groupName) => {
|
|
158
|
+
// do something with the new value
|
|
159
|
+
});
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
<br>
|
|
163
|
+
|
|
164
|
+
::: alert alert--info
|
|
165
|
+
Since you never know which device is the master at the moment, you should always rely only on the values received by the listener, not the values that the particular device itself is broadcasting.
|
|
166
|
+
:::
|
|
167
|
+
|
|
168
|
+
## Usage with Typescript
|
|
169
|
+
You can also use all these methods with [signageOS TypeScript](/knowledge-base/dev-tools-cli-typescript).
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
connect(syncServerUri?: string): Promise<void>;
|
|
173
|
+
close(): Promise<void>;
|
|
174
|
+
init(groupName?: string): Promise<void>;
|
|
175
|
+
wait(data?: any, groupName?: string): Promise<any>;
|
|
176
|
+
setValue(key: string, value: any, groupName?: string): Promise<void>;
|
|
177
|
+
```
|
|
178
|
+
```typescript
|
|
179
|
+
onValue(listener: (
|
|
180
|
+
key: string,
|
|
181
|
+
value: any,
|
|
182
|
+
groupName?: string
|
|
183
|
+
) => void): void;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Errors
|
|
187
|
+
Although we are doing our best, following errors may occur when working with the synchronizer.
|
|
188
|
+
|
|
189
|
+
::: table-responsive
|
|
190
|
+
| Code | Type | Message |
|
|
191
|
+
| ---- | ---- | ------- |
|
|
192
|
+
| 51101 | InternalSynchronizerError | Synchronizer couldn't connect to the server. |
|
|
193
|
+
| 51102 | InternalSynchronizerError | The connection wasn't closed correctly. |
|
|
194
|
+
| 51103 | InternalSynchronizerError | The group initialization failed. |
|
|
195
|
+
| 51104 | InternalSynchronizerError | Wait failed for unexpected reason. |
|
|
196
|
+
| 51105 | InternalSynchronizerError | Synchronizer couldn't set the value. |
|
|
197
|
+
:::
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Timing
|
|
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] Timing applets are auto-switched based on FINISH events & data. In some cases it is possible to pause/resume this by switching triggers temporarily."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Timing
|
|
15
|
+
|
|
16
|
+
::: alert alert--danger
|
|
17
|
+
THIS API IS DEPRECATED.
|
|
18
|
+
:::
|
|
19
|
+
|
|
20
|
+
Timing applets are auto-switched based on FINISH events & data. In some cases it is possible to pause/resume this by switching triggers temporarily.
|
|
21
|
+
|
|
22
|
+
## All methods
|
|
23
|
+
|
|
24
|
+
::: table-responsive
|
|
25
|
+
| Method/Events | Description | Supported since |
|
|
26
|
+
| ----------------- | --------------------------------- | :---------------: |
|
|
27
|
+
| `pause()` | Method pauses timing triggers. | 1.0.29 |
|
|
28
|
+
| `resume()` | Method resumes timing triggers. | 1.0.29 |
|
|
29
|
+
:::
|
|
30
|
+
|
|
31
|
+
### Javascript syntax
|
|
32
|
+
```javascript
|
|
33
|
+
// pause timing triggers
|
|
34
|
+
await sos.timing.triggers.pause();
|
|
35
|
+
|
|
36
|
+
// resume timing triggers
|
|
37
|
+
await sos.timing.triggers.pause();
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
41
|
+
<div class="col-12 d-flex">
|
|
42
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/timing-triggers">
|
|
43
|
+
<div>
|
|
44
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
45
|
+
<i class="fab fa-github svg-black"></i>
|
|
46
|
+
</div>
|
|
47
|
+
<div>
|
|
48
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Applet with timinig</h3>
|
|
49
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</a>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Video Inputs (PiP)
|
|
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] Display content from another device over HDMI, Display Port, or other port. PIP (Picture in Picture) functionality allows you to display content from the internal port while keeping signageOS on."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Video Inputs and Internal Ports
|
|
15
|
+
Display content from another device over HDMI, Display Port, or other port. PIP (Picture in Picture) functionality allows you to display content from the internal port while keeping signageOS on.
|
|
16
|
+
|
|
17
|
+
## All methods
|
|
18
|
+
::: table-responsive
|
|
19
|
+
| Methods | Description | Supported since |
|
|
20
|
+
| ----------------- | ----------- | :---------------: |
|
|
21
|
+
| `play()` | Method for starting stream | 1.0.18 |
|
|
22
|
+
| `stop()` | Method stops using the internal port. | 1.0.18 |
|
|
23
|
+
:::
|
|
24
|
+
|
|
25
|
+
## play()
|
|
26
|
+
Method uses the same API as [video streams](/api/js/content/js-video-stream). Instead of URL (for stream), **specify an URI of the port** to display.
|
|
27
|
+
|
|
28
|
+
### Parameters
|
|
29
|
+
::: table-responsive
|
|
30
|
+
| Param | Type | Required |Description |
|
|
31
|
+
| -------------- | -------------------| :----------: | ---------------------------- |
|
|
32
|
+
| `uri` | String | <div class="red">Yes</div> | Internal port URI |
|
|
33
|
+
| `x` | Number | <div class="red">Yes</div> | x-position for video on screen |
|
|
34
|
+
| `y` | Number | <div class="red">Yes</div> | y-position for video on screen |
|
|
35
|
+
| `width` | Number | <div class="red">Yes</div> | Video width on screen |
|
|
36
|
+
| `height` | Number | <div class="red">Yes</div> | Video height on screen |
|
|
37
|
+
:::
|
|
38
|
+
|
|
39
|
+
### Javascript example
|
|
40
|
+
```javascript
|
|
41
|
+
await sos.stream.play(uri, x, y, width, height);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
45
|
+
<div class="col-12 d-flex">
|
|
46
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/stream-hdmi-port">
|
|
47
|
+
<div>
|
|
48
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
49
|
+
<i class="fab fa-github svg-black"></i>
|
|
50
|
+
</div>
|
|
51
|
+
<div>
|
|
52
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Stream HDMI port Applet example</h3>
|
|
53
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</a>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
## Valid URI values
|
|
61
|
+
|
|
62
|
+
::: table-responsive
|
|
63
|
+
| Value | Description |
|
|
64
|
+
| ----------------------- | ------------------------------- |
|
|
65
|
+
| `internal://hdmi<number>` | HDMI |
|
|
66
|
+
| `internal://dp` | DisplayPort |
|
|
67
|
+
| `internal://dvi` | DVI |
|
|
68
|
+
| `internal://pc` | PC or VGA |
|
|
69
|
+
:::
|
|
70
|
+
|
|
71
|
+
::: alert alert--warning
|
|
72
|
+
`<number>` has to be a value between 1 - 4, depending on which of the available HDMI ports you want to use.
|
|
73
|
+
:::
|
|
74
|
+
|
|
75
|
+
## stop()
|
|
76
|
+
Method stops using the internal port.
|
|
77
|
+
|
|
78
|
+
### Parameters:
|
|
79
|
+
::: table-responsive
|
|
80
|
+
| Param | Type | Required |Description |
|
|
81
|
+
| -------------- | -----------------| :------------: | ---------------------------- |
|
|
82
|
+
| `uri` | String | <div class="red">Yes</div> | Internal port URI |
|
|
83
|
+
| `x` | Number | <div class="red">Yes</div> | x-position for video on screen |
|
|
84
|
+
| `y` | Number | <div class="red">Yes</div> | y-position for video on screen |
|
|
85
|
+
| `width` | Number | <div class="red">Yes</div> | Video width on screen |
|
|
86
|
+
| `height` | Number | <div class="red">Yes</div> | Video height on screen |
|
|
87
|
+
:::
|
|
88
|
+
|
|
89
|
+
### Javascript example
|
|
90
|
+
```javascript
|
|
91
|
+
await sos.stream.stop(uri, x, y, width, height);
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Internal port events
|
|
95
|
+
API reacts to events related to changes in internal port status. Events are only emitted for a currently playing internal port.
|
|
96
|
+
|
|
97
|
+
::: table-responsive
|
|
98
|
+
| Event | Description |
|
|
99
|
+
| ----------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
100
|
+
| `disconnected()` | Emmited when the port is disconnected or does not receive any signal |
|
|
101
|
+
| `connected()` | Emmited when the port is re-connected or starts receiving signal again after being disconnected |
|
|
102
|
+
| `error()` | Emmited when an error occurs, is emmited only once |
|
|
103
|
+
:::
|
|
104
|
+
|
|
105
|
+
## Usage with Typescript
|
|
106
|
+
You can also use all these methods with [signageOS TypeScript](/knowledge-base/dev-tools-cli-typescript).
|
|
107
|
+
```typescript
|
|
108
|
+
onDisconnected(listener: (event: {
|
|
109
|
+
type: 'disconnected';
|
|
110
|
+
srcArguments: {
|
|
111
|
+
uri: string;
|
|
112
|
+
x: number;
|
|
113
|
+
y: number;
|
|
114
|
+
width: number;
|
|
115
|
+
height: number;
|
|
116
|
+
};
|
|
117
|
+
}) => void): void;
|
|
118
|
+
onConnected(listener: (event: {
|
|
119
|
+
type: 'connected';
|
|
120
|
+
srcArguments: {
|
|
121
|
+
uri: string;
|
|
122
|
+
x: number;
|
|
123
|
+
y: number;
|
|
124
|
+
width: number;
|
|
125
|
+
height: number;
|
|
126
|
+
};
|
|
127
|
+
}) => void): void;
|
|
128
|
+
onError(listener: (event: {
|
|
129
|
+
type: 'error';
|
|
130
|
+
srcArguments: {
|
|
131
|
+
uri: string;
|
|
132
|
+
x: number;
|
|
133
|
+
y: number;
|
|
134
|
+
width: number;
|
|
135
|
+
height: number;
|
|
136
|
+
};
|
|
137
|
+
errorMessage: string;
|
|
138
|
+
}) => void): void;
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Errors
|
|
142
|
+
Although we are doing our best, following errors may occur when playing content from the internal ports.
|
|
143
|
+
|
|
144
|
+
::: table-responsive
|
|
145
|
+
| Code | Type | Message |
|
|
146
|
+
| ---- | ---- | ------- |
|
|
147
|
+
| 51501 | InternalVideoError | Couldn't play the video. |
|
|
148
|
+
| 51503 | InternalVideoError | Couldn't stop the video. |
|
|
149
|
+
:::
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Video streams
|
|
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] Methods to play or stop video streams."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Video streams
|
|
15
|
+
Methods to play or stop video streams.
|
|
16
|
+
|
|
17
|
+
## All methods
|
|
18
|
+
::: table-responsive
|
|
19
|
+
| Methods | Description | Supported since |
|
|
20
|
+
| ------------------ | ---------------------------------------------------------------- | --------------- |
|
|
21
|
+
| `prepare()` | Prepare video stream in the background | 4.7.0 |
|
|
22
|
+
| `play()` | Start playing video stream | 1.0.18 |
|
|
23
|
+
| `stop()` | Stop video stream | 1.0.18 |
|
|
24
|
+
| `onConnected()` | Calls a listener callback when stream connects | 1.0.20 |
|
|
25
|
+
| `onDisconnected()` | Calls a listener callback when stream disconnects | 1.0.20 |
|
|
26
|
+
| `onError()` | Calls a listener callback when an unexpected stream error occurs | 1.0.20 |
|
|
27
|
+
:::
|
|
28
|
+
|
|
29
|
+
::: alert alert--warning
|
|
30
|
+
Are you using **Samsung Tizen** to play streams? [Read more about limitation and Tizen-specific details](knowledge-base/stream-playback-on-tizen).
|
|
31
|
+
:::
|
|
32
|
+
|
|
33
|
+
## prepare()
|
|
34
|
+
Calls the internal player and prepares a video stream in memory, so it can later start playing instantaneously.
|
|
35
|
+
|
|
36
|
+
::: alert alert--info
|
|
37
|
+
If you want to play a video stream in full screen mode, use x = y = 0 and width = document.documentElement.clientWidth and height = document.documentElement.clientHeight as setup parameters.
|
|
38
|
+
:::
|
|
39
|
+
|
|
40
|
+
### Parameters
|
|
41
|
+
::: table-responsive
|
|
42
|
+
| Param | Type | Required | Description |
|
|
43
|
+
| -------------- | --------------------------- | :--------------------------: | --------------------------------------------- |
|
|
44
|
+
| `uri` | String | <div class="red">Yes</div> | Network address where the stream is available |
|
|
45
|
+
| `x` | Number | <div class="red">Yes</div> | Stream x-position on the screen |
|
|
46
|
+
| `y` | Number | <div class="red">Yes</div> | Stream y-position on the screen |
|
|
47
|
+
| `width` | Number | <div class="red">Yes</div> | Stream width on the screen |
|
|
48
|
+
| `height` | Number | <div class="red">Yes</div> | Stream height on the screen |
|
|
49
|
+
| `protocol` | String | <div class="red">Yes</div> | Protocol that the stream is using |
|
|
50
|
+
|^^|^^|^^| Types: `HLS`, `RTP`, `HTTP`, `UDP`, `RTMP`, `RTSP`. |
|
|
51
|
+
:::
|
|
52
|
+
|
|
53
|
+
### Javascript syntax
|
|
54
|
+
```javascript
|
|
55
|
+
await sos.stream.prepare(uri, x, y, width, height, protocol);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
59
|
+
<div class="col-12 d-flex">
|
|
60
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/stream">
|
|
61
|
+
<div>
|
|
62
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
63
|
+
<i class="fab fa-github svg-black"></i>
|
|
64
|
+
</div>
|
|
65
|
+
<div>
|
|
66
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Working example on our Github</h3>
|
|
67
|
+
<div class="wide-box__description">Stream video Applet example</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</a>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
## play()
|
|
75
|
+
Calls the internal player and starts a video stream in correct position.
|
|
76
|
+
|
|
77
|
+
::: alert alert--info
|
|
78
|
+
If you want to play a video stream in full screen mode, use x = y = 0 and width = document.documentElement.clientWidth and height = document.documentElement.clientHeight as setup parameters.
|
|
79
|
+
:::
|
|
80
|
+
|
|
81
|
+
### Parameters
|
|
82
|
+
::: table-responsive
|
|
83
|
+
| Param | Type | Required | Description |
|
|
84
|
+
| -------------- | --------------------------- | :--------------------------: | --------------------------------------------- |
|
|
85
|
+
| `uri` | String | <div class="red">Yes</div> | Network address where the stream is available |
|
|
86
|
+
| `x` | Number | <div class="red">Yes</div> | Stream x-position on the screen |
|
|
87
|
+
| `y` | Number | <div class="red">Yes</div> | Stream y-position on the screen |
|
|
88
|
+
| `width` | Number | <div class="red">Yes</div> | Stream width on the screen |
|
|
89
|
+
| `height` | Number | <div class="red">Yes</div> | Stream height on the screen |
|
|
90
|
+
| `protocol` | String | <div class="red">Yes</div> | Protocol that the stream is using |
|
|
91
|
+
|^^|^^|^^| Types: `HLS`, `RTP`, `HTTP`, `UDP`, `RTMP`, `RTSP`. |
|
|
92
|
+
:::
|
|
93
|
+
|
|
94
|
+
### Javascript syntax
|
|
95
|
+
```javascript
|
|
96
|
+
await sos.stream.play(uri, x, y, width, height, protocol);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
100
|
+
<div class="col-12 d-flex">
|
|
101
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/stream">
|
|
102
|
+
<div>
|
|
103
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
104
|
+
<i class="fab fa-github svg-black"></i>
|
|
105
|
+
</div>
|
|
106
|
+
<div>
|
|
107
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Working example on our Github</h3>
|
|
108
|
+
<div class="wide-box__description">Stream video Applet example</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</a>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
## stop()
|
|
116
|
+
Stops the video stream playback.
|
|
117
|
+
|
|
118
|
+
### Javascript syntax
|
|
119
|
+
```javascript
|
|
120
|
+
await sos.stream.stop(uri, x, y, width, height);
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Parameters:
|
|
124
|
+
::: table-responsive
|
|
125
|
+
| Param | Type | Required | Description |
|
|
126
|
+
| -------------- | --------------------------- | :------------------------: | --------------------------------------------- |
|
|
127
|
+
| `uri` | String | <div class="red">Yes</div> | Network address where the stream is available |
|
|
128
|
+
| `x` | Number | <div class="red">Yes</div> | Stream x-position on the screen |
|
|
129
|
+
| `y` | Number | <div class="red">Yes</div> | Stream y-position on the screen |
|
|
130
|
+
| `width` | Number | <div class="red">Yes</div> | Stream width on the screen |
|
|
131
|
+
| `height` | Number | <div class="red">Yes</div> | Stream height on the screen |
|
|
132
|
+
:::
|
|
133
|
+
|
|
134
|
+
## Event onConnected()
|
|
135
|
+
Calls a listener callback everytime `connected` event is emitted.
|
|
136
|
+
|
|
137
|
+
### Javascript syntax
|
|
138
|
+
```javascript
|
|
139
|
+
sos.stream.onConnected((event) => {
|
|
140
|
+
// do something
|
|
141
|
+
});
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Event onDisconnected()
|
|
145
|
+
Calls a listener callback everytime `disconnected` event is emitted.
|
|
146
|
+
|
|
147
|
+
### Javascript syntax
|
|
148
|
+
```javascript
|
|
149
|
+
sos.stream.onDisconnected((event) => {
|
|
150
|
+
// do something
|
|
151
|
+
});
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Event onError()
|
|
155
|
+
Calls a listener callback everytime `error` event is emitted.
|
|
156
|
+
|
|
157
|
+
### Javascript syntax
|
|
158
|
+
```javascript
|
|
159
|
+
sos.stream.onError((event) => {
|
|
160
|
+
// do something
|
|
161
|
+
});
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Stream events
|
|
165
|
+
All stream events have the same format.
|
|
166
|
+
|
|
167
|
+
`type` property contains string with the event type. Type can be `connected`, `disconnected` or `error`.
|
|
168
|
+
|
|
169
|
+
`srcArguments` property contains parameters of the source stream, that emitted the event.
|
|
170
|
+
That way, if multiple streams are playing at once, you can associate the events with each stream instance.
|
|
171
|
+
|
|
172
|
+
Example event:
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"type": "connected",
|
|
176
|
+
"srcArguments": {
|
|
177
|
+
"uri": "<uri>",
|
|
178
|
+
"x": 0,
|
|
179
|
+
"y": 0,
|
|
180
|
+
"width": 1920,
|
|
181
|
+
"height": 1080,
|
|
182
|
+
"protocol": "RTP"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Usage with Typescript
|
|
188
|
+
You can also use all these methods with [signageOS TypeScript](/knowledge-base/dev-tools-cli-typescript).
|
|
189
|
+
```typescript
|
|
190
|
+
interface StreamEvent {
|
|
191
|
+
type: 'connected' | 'disconnected' | 'error',
|
|
192
|
+
srcArguments: {
|
|
193
|
+
uri: string;
|
|
194
|
+
x: number;
|
|
195
|
+
y: number;
|
|
196
|
+
width: number;
|
|
197
|
+
height: number;
|
|
198
|
+
protocol: string;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
play(
|
|
202
|
+
uri: string,
|
|
203
|
+
x: number,
|
|
204
|
+
y: number,
|
|
205
|
+
width: number,
|
|
206
|
+
height: number,
|
|
207
|
+
protocolType: 'HLS' | 'RTP' | 'HTTP' | 'UDP' | 'RTMP' | 'RTSP'
|
|
208
|
+
): Promise<void>;
|
|
209
|
+
stop(
|
|
210
|
+
uri: string,
|
|
211
|
+
x: number,
|
|
212
|
+
y: number,
|
|
213
|
+
width: number,
|
|
214
|
+
height: number
|
|
215
|
+
): Promise<void>;
|
|
216
|
+
onConnected(listener: (event: StreamEvent) => void): void;
|
|
217
|
+
onDisconnected(listener: (event: StreamEvent) => void): void;
|
|
218
|
+
onError(listener: (event: StreamEvent) => void): void;
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Errors
|
|
222
|
+
Although we are doing our best, following errors may occur when working with the video stream.
|
|
223
|
+
|
|
224
|
+
::: table-responsive
|
|
225
|
+
| Code | Type | Message |
|
|
226
|
+
| ---- | ---- | ------- |
|
|
227
|
+
| 41401 | AppletStreamError | Invalid stream protocol type: `protocol` |
|
|
228
|
+
| 51301 | InternalStreamError | Couldn't stop the stream before playing the new one. |
|
|
229
|
+
| 51301 | InternalStreamError | Couldn't stop the stream. |
|
|
230
|
+
:::
|