@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.
Files changed (443) hide show
  1. package/CHANGELOG.md +207 -0
  2. package/README.md +3 -0
  3. package/dist/bundle.js +9 -0
  4. package/dist/bundle.js.map +1 -0
  5. package/docs/README.md +5 -0
  6. package/docs/js-api/js-api-introduction.md +73 -0
  7. package/docs/js-api/js-applet-basics.md +294 -0
  8. package/docs/js-api/js-applet-resources.md +172 -0
  9. package/docs/js-api/js-browser.md +170 -0
  10. package/docs/js-api/js-command.md +208 -0
  11. package/docs/js-api/js-display.md +48 -0
  12. package/docs/js-api/js-file-system.md +568 -0
  13. package/docs/js-api/js-hardware-serial.md +142 -0
  14. package/docs/js-api/js-hardware.md +70 -0
  15. package/docs/js-api/js-iframes.md +88 -0
  16. package/docs/js-api/js-input.md +84 -0
  17. package/docs/js-api/js-loading-fonts.md +138 -0
  18. package/docs/js-api/js-monitoring-commands.md +108 -0
  19. package/docs/js-api/js-monitors.md +55 -0
  20. package/docs/js-api/js-offline-cache-media-files.md +314 -0
  21. package/docs/js-api/js-offline-cache-simple-data.md +134 -0
  22. package/docs/js-api/js-sensors.md +70 -0
  23. package/docs/js-api/js-sync-playback.md +197 -0
  24. package/docs/js-api/js-timing.md +54 -0
  25. package/docs/js-api/js-video-inputs-internal-ports.md +149 -0
  26. package/docs/js-api/js-video-stream.md +230 -0
  27. package/docs/js-api/js-video.md +282 -0
  28. package/docs/management-api/1-js-management.md +133 -0
  29. package/docs/management-api/10-js-management-application.md +123 -0
  30. package/docs/management-api/11-js-management-network.md +185 -0
  31. package/docs/management-api/12-js-management-security.md +86 -0
  32. package/docs/management-api/13-js-management-wifi.md +357 -0
  33. package/docs/management-api/2-js-management-firmware.md +93 -0
  34. package/docs/management-api/3-js-management-remote-control.md +73 -0
  35. package/docs/management-api/4-js-management-power.md +94 -0
  36. package/docs/management-api/5-js-management-screen.md +263 -0
  37. package/docs/management-api/6-js-management-time.md +166 -0
  38. package/docs/management-api/7-js-management-volume.md +46 -0
  39. package/docs/management-api/8-js-management-package.md +62 -0
  40. package/docs/management-api/9-js-management-debug.md +53 -0
  41. package/es6/FrontApplet/Browser/Browser.d.ts +24 -0
  42. package/es6/FrontApplet/Browser/Browser.js +73 -0
  43. package/es6/FrontApplet/Browser/Browser.js.map +1 -0
  44. package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +174 -0
  45. package/es6/FrontApplet/Browser/IOpenLinkOptions.js +55 -0
  46. package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -0
  47. package/es6/FrontApplet/Browser/events.d.ts +15 -0
  48. package/es6/FrontApplet/Browser/events.js +14 -0
  49. package/es6/FrontApplet/Browser/events.js.map +1 -0
  50. package/es6/FrontApplet/Browser/messages.d.ts +5 -0
  51. package/es6/FrontApplet/Browser/messages.js +3 -0
  52. package/es6/FrontApplet/Browser/messages.js.map +1 -0
  53. package/es6/FrontApplet/Command/Command.d.ts +16 -0
  54. package/es6/FrontApplet/Command/Command.js +68 -0
  55. package/es6/FrontApplet/Command/Command.js.map +1 -0
  56. package/es6/FrontApplet/Command/ICommand.d.ts +4 -0
  57. package/es6/FrontApplet/Command/ICommand.js +3 -0
  58. package/es6/FrontApplet/Command/ICommand.js.map +1 -0
  59. package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.d.ts +6 -0
  60. package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.js +3 -0
  61. package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.js.map +1 -0
  62. package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -0
  63. package/es6/FrontApplet/Command/ICommandEvent.js +3 -0
  64. package/es6/FrontApplet/Command/ICommandEvent.js.map +1 -0
  65. package/es6/FrontApplet/Command/ICommandEventListener.d.ts +6 -0
  66. package/es6/FrontApplet/Command/ICommandEventListener.js +3 -0
  67. package/es6/FrontApplet/Command/ICommandEventListener.js.map +1 -0
  68. package/es6/FrontApplet/Debug/Debug.d.ts +22 -0
  69. package/es6/FrontApplet/Debug/Debug.js +35 -0
  70. package/es6/FrontApplet/Debug/Debug.js.map +1 -0
  71. package/es6/FrontApplet/Display/Display.d.ts +11 -0
  72. package/es6/FrontApplet/Display/Display.js +35 -0
  73. package/es6/FrontApplet/Display/Display.js.map +1 -0
  74. package/es6/FrontApplet/Error/AppletCommandError.d.ts +9 -0
  75. package/es6/FrontApplet/Error/AppletCommandError.js +11 -0
  76. package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -0
  77. package/es6/FrontApplet/Error/AppletError.d.ts +7 -0
  78. package/es6/FrontApplet/Error/AppletError.js +10 -0
  79. package/es6/FrontApplet/Error/AppletError.js.map +1 -0
  80. package/es6/FrontApplet/Error/AppletHardwareError.d.ts +9 -0
  81. package/es6/FrontApplet/Error/AppletHardwareError.js +11 -0
  82. package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -0
  83. package/es6/FrontApplet/Error/AppletOfflineCacheError.d.ts +8 -0
  84. package/es6/FrontApplet/Error/AppletOfflineCacheError.js +10 -0
  85. package/es6/FrontApplet/Error/AppletOfflineCacheError.js.map +1 -0
  86. package/es6/FrontApplet/Error/AppletResourcesError.d.ts +9 -0
  87. package/es6/FrontApplet/Error/AppletResourcesError.js +11 -0
  88. package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -0
  89. package/es6/FrontApplet/Error/AppletSecurityError.d.ts +9 -0
  90. package/es6/FrontApplet/Error/AppletSecurityError.js +11 -0
  91. package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -0
  92. package/es6/FrontApplet/Error/AppletStreamError.d.ts +8 -0
  93. package/es6/FrontApplet/Error/AppletStreamError.js +10 -0
  94. package/es6/FrontApplet/Error/AppletStreamError.js.map +1 -0
  95. package/es6/FrontApplet/Error/AppletVideoError.d.ts +9 -0
  96. package/es6/FrontApplet/Error/AppletVideoError.js +11 -0
  97. package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -0
  98. package/es6/FrontApplet/Error/ErrorCodes.d.ts +18 -0
  99. package/es6/FrontApplet/Error/ErrorCodes.js +23 -0
  100. package/es6/FrontApplet/Error/ErrorCodes.js.map +1 -0
  101. package/es6/FrontApplet/Error/ErrorCodesMessages.d.ts +3 -0
  102. package/es6/FrontApplet/Error/ErrorCodesMessages.js +22 -0
  103. package/es6/FrontApplet/Error/ErrorCodesMessages.js.map +1 -0
  104. package/es6/FrontApplet/Error/ErrorSuggestions.d.ts +6 -0
  105. package/es6/FrontApplet/Error/ErrorSuggestions.js +10 -0
  106. package/es6/FrontApplet/Error/ErrorSuggestions.js.map +1 -0
  107. package/es6/FrontApplet/Error/FileNotFoundError.d.ts +8 -0
  108. package/es6/FrontApplet/Error/FileNotFoundError.js +10 -0
  109. package/es6/FrontApplet/Error/FileNotFoundError.js.map +1 -0
  110. package/es6/FrontApplet/Error/SosError.d.ts +20 -0
  111. package/es6/FrontApplet/Error/SosError.js +22 -0
  112. package/es6/FrontApplet/Error/SosError.js.map +1 -0
  113. package/es6/FrontApplet/Error/errorHelper.d.ts +12 -0
  114. package/es6/FrontApplet/Error/errorHelper.js +50 -0
  115. package/es6/FrontApplet/Error/errorHelper.js.map +1 -0
  116. package/es6/FrontApplet/Exchange/Exchange.d.ts +7 -0
  117. package/es6/FrontApplet/Exchange/Exchange.js +28 -0
  118. package/es6/FrontApplet/Exchange/Exchange.js.map +1 -0
  119. package/es6/FrontApplet/FileSystem/FileSystem.d.ts +30 -0
  120. package/es6/FrontApplet/FileSystem/FileSystem.js +210 -0
  121. package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -0
  122. package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.d.ts +4 -0
  123. package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.js +3 -0
  124. package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.js.map +1 -0
  125. package/es6/FrontApplet/FileSystem/types.d.ts +66 -0
  126. package/es6/FrontApplet/FileSystem/types.js +20 -0
  127. package/es6/FrontApplet/FileSystem/types.js.map +1 -0
  128. package/es6/FrontApplet/Font/fontFaceGenerator.d.ts +6 -0
  129. package/es6/FrontApplet/Font/fontFaceGenerator.js +46 -0
  130. package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -0
  131. package/es6/FrontApplet/FrontApplet.d.ts +56 -0
  132. package/es6/FrontApplet/FrontApplet.js +183 -0
  133. package/es6/FrontApplet/FrontApplet.js.map +1 -0
  134. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +30 -0
  135. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +92 -0
  136. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -0
  137. package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.d.ts +5 -0
  138. package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.js +3 -0
  139. package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.js.map +1 -0
  140. package/es6/FrontApplet/Hardware/Hardware.d.ts +20 -0
  141. package/es6/FrontApplet/Hardware/Hardware.js +51 -0
  142. package/es6/FrontApplet/Hardware/Hardware.js.map +1 -0
  143. package/es6/FrontApplet/Hardware/ISerialPortDataMessage.d.ts +6 -0
  144. package/es6/FrontApplet/Hardware/ISerialPortDataMessage.js +3 -0
  145. package/es6/FrontApplet/Hardware/ISerialPortDataMessage.js.map +1 -0
  146. package/es6/FrontApplet/Hardware/ISerialPortOptions.d.ts +15 -0
  147. package/es6/FrontApplet/Hardware/ISerialPortOptions.js +11 -0
  148. package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -0
  149. package/es6/FrontApplet/Hardware/Led/ISetColorMessage.d.ts +5 -0
  150. package/es6/FrontApplet/Hardware/Led/ISetColorMessage.js +3 -0
  151. package/es6/FrontApplet/Hardware/Led/ISetColorMessage.js.map +1 -0
  152. package/es6/FrontApplet/Hardware/Led/Led.d.ts +11 -0
  153. package/es6/FrontApplet/Hardware/Led/Led.js +38 -0
  154. package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -0
  155. package/es6/FrontApplet/Hardware/SerialPort.d.ts +14 -0
  156. package/es6/FrontApplet/Hardware/SerialPort.js +45 -0
  157. package/es6/FrontApplet/Hardware/SerialPort.js.map +1 -0
  158. package/es6/FrontApplet/Hash/generator.d.ts +1 -0
  159. package/es6/FrontApplet/Hash/generator.js +10 -0
  160. package/es6/FrontApplet/Hash/generator.js.map +1 -0
  161. package/es6/FrontApplet/IMessage.d.ts +6 -0
  162. package/es6/FrontApplet/IMessage.js +3 -0
  163. package/es6/FrontApplet/IMessage.js.map +1 -0
  164. package/es6/FrontApplet/IPostMessage.d.ts +5 -0
  165. package/es6/FrontApplet/IPostMessage.js +3 -0
  166. package/es6/FrontApplet/IPostMessage.js.map +1 -0
  167. package/es6/FrontApplet/Iframe/Iframe.d.ts +24 -0
  168. package/es6/FrontApplet/Iframe/Iframe.js +51 -0
  169. package/es6/FrontApplet/Iframe/Iframe.js.map +1 -0
  170. package/es6/FrontApplet/Input/IInputKeyMessage.d.ts +6 -0
  171. package/es6/FrontApplet/Input/IInputKeyMessage.js +3 -0
  172. package/es6/FrontApplet/Input/IInputKeyMessage.js.map +1 -0
  173. package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +6 -0
  174. package/es6/FrontApplet/Input/IKeyUpEvent.js +3 -0
  175. package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -0
  176. package/es6/FrontApplet/Input/IKeyUpEventListener.d.ts +5 -0
  177. package/es6/FrontApplet/Input/IKeyUpEventListener.js +3 -0
  178. package/es6/FrontApplet/Input/IKeyUpEventListener.js.map +1 -0
  179. package/es6/FrontApplet/Input/Input.d.ts +20 -0
  180. package/es6/FrontApplet/Input/Input.js +35 -0
  181. package/es6/FrontApplet/Input/Input.js.map +1 -0
  182. package/es6/FrontApplet/Management/App.d.ts +37 -0
  183. package/es6/FrontApplet/Management/App.js +50 -0
  184. package/es6/FrontApplet/Management/App.js.map +1 -0
  185. package/es6/FrontApplet/Management/Audio.d.ts +9 -0
  186. package/es6/FrontApplet/Management/Audio.js +40 -0
  187. package/es6/FrontApplet/Management/Audio.js.map +1 -0
  188. package/es6/FrontApplet/Management/Debug.d.ts +11 -0
  189. package/es6/FrontApplet/Management/Debug.js +50 -0
  190. package/es6/FrontApplet/Management/Debug.js.map +1 -0
  191. package/es6/FrontApplet/Management/Firmware.d.ts +37 -0
  192. package/es6/FrontApplet/Management/Firmware.js +50 -0
  193. package/es6/FrontApplet/Management/Firmware.js.map +1 -0
  194. package/es6/FrontApplet/Management/FirmwareType.d.ts +4 -0
  195. package/es6/FrontApplet/Management/FirmwareType.js +8 -0
  196. package/es6/FrontApplet/Management/FirmwareType.js.map +1 -0
  197. package/es6/FrontApplet/Management/IBatteryStatus.d.ts +7 -0
  198. package/es6/FrontApplet/Management/IBatteryStatus.js +3 -0
  199. package/es6/FrontApplet/Management/IBatteryStatus.js.map +1 -0
  200. package/es6/FrontApplet/Management/IBrightness.d.ts +6 -0
  201. package/es6/FrontApplet/Management/IBrightness.js +3 -0
  202. package/es6/FrontApplet/Management/IBrightness.js.map +1 -0
  203. package/es6/FrontApplet/Management/INetworkInfo.d.ts +53 -0
  204. package/es6/FrontApplet/Management/INetworkInfo.js +17 -0
  205. package/es6/FrontApplet/Management/INetworkInfo.js.map +1 -0
  206. package/es6/FrontApplet/Management/IOrientation.d.ts +4 -0
  207. package/es6/FrontApplet/Management/IOrientation.js +3 -0
  208. package/es6/FrontApplet/Management/IOrientation.js.map +1 -0
  209. package/es6/FrontApplet/Management/IWifiEvent.d.ts +11 -0
  210. package/es6/FrontApplet/Management/IWifiEvent.js +12 -0
  211. package/es6/FrontApplet/Management/IWifiEvent.js.map +1 -0
  212. package/es6/FrontApplet/Management/Management.d.ts +44 -0
  213. package/es6/FrontApplet/Management/Management.js +113 -0
  214. package/es6/FrontApplet/Management/Management.js.map +1 -0
  215. package/es6/FrontApplet/Management/Network.d.ts +26 -0
  216. package/es6/FrontApplet/Management/Network.js +83 -0
  217. package/es6/FrontApplet/Management/Network.js.map +1 -0
  218. package/es6/FrontApplet/Management/Package.d.ts +8 -0
  219. package/es6/FrontApplet/Management/Package.js +38 -0
  220. package/es6/FrontApplet/Management/Package.js.map +1 -0
  221. package/es6/FrontApplet/Management/Power.d.ts +13 -0
  222. package/es6/FrontApplet/Management/Power.js +78 -0
  223. package/es6/FrontApplet/Management/Power.js.map +1 -0
  224. package/es6/FrontApplet/Management/RemoteControl.d.ts +14 -0
  225. package/es6/FrontApplet/Management/RemoteControl.js +61 -0
  226. package/es6/FrontApplet/Management/RemoteControl.js.map +1 -0
  227. package/es6/FrontApplet/Management/Screen.d.ts +18 -0
  228. package/es6/FrontApplet/Management/Screen.js +114 -0
  229. package/es6/FrontApplet/Management/Screen.js.map +1 -0
  230. package/es6/FrontApplet/Management/Security.d.ts +21 -0
  231. package/es6/FrontApplet/Management/Security.js +56 -0
  232. package/es6/FrontApplet/Management/Security.js.map +1 -0
  233. package/es6/FrontApplet/Management/Time.d.ts +16 -0
  234. package/es6/FrontApplet/Management/Time.js +59 -0
  235. package/es6/FrontApplet/Management/Time.js.map +1 -0
  236. package/es6/FrontApplet/Management/Wifi.d.ts +29 -0
  237. package/es6/FrontApplet/Management/Wifi.js +151 -0
  238. package/es6/FrontApplet/Management/Wifi.js.map +1 -0
  239. package/es6/FrontApplet/Management/helpers/DeviceHelper.d.ts +21 -0
  240. package/es6/FrontApplet/Management/helpers/DeviceHelper.js +16 -0
  241. package/es6/FrontApplet/Management/helpers/DeviceHelper.js.map +1 -0
  242. package/es6/FrontApplet/Management/helpers/SecurityHelper.d.ts +2 -0
  243. package/es6/FrontApplet/Management/helpers/SecurityHelper.js +21 -0
  244. package/es6/FrontApplet/Management/helpers/SecurityHelper.js.map +1 -0
  245. package/es6/FrontApplet/Management/helpers/TimerHelper.d.ts +25 -0
  246. package/es6/FrontApplet/Management/helpers/TimerHelper.js +23 -0
  247. package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -0
  248. package/es6/FrontApplet/Management/helpers/UpgradeHelper.d.ts +5 -0
  249. package/es6/FrontApplet/Management/helpers/UpgradeHelper.js +35 -0
  250. package/es6/FrontApplet/Management/helpers/UpgradeHelper.js.map +1 -0
  251. package/es6/FrontApplet/Management/helpers/VideoHelper.d.ts +4 -0
  252. package/es6/FrontApplet/Management/helpers/VideoHelper.js +8 -0
  253. package/es6/FrontApplet/Management/helpers/VideoHelper.js.map +1 -0
  254. package/es6/FrontApplet/Monitors/Monitors.d.ts +16 -0
  255. package/es6/FrontApplet/Monitors/Monitors.js +31 -0
  256. package/es6/FrontApplet/Monitors/Monitors.js.map +1 -0
  257. package/es6/FrontApplet/Offline/Cache/Cache.d.ts +38 -0
  258. package/es6/FrontApplet/Offline/Cache/Cache.js +199 -0
  259. package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -0
  260. package/es6/FrontApplet/Offline/Cache/IChecksumMessage.d.ts +5 -0
  261. package/es6/FrontApplet/Offline/Cache/IChecksumMessage.js +3 -0
  262. package/es6/FrontApplet/Offline/Cache/IChecksumMessage.js.map +1 -0
  263. package/es6/FrontApplet/Offline/Cache/IFile.d.ts +4 -0
  264. package/es6/FrontApplet/Offline/Cache/IFile.js +3 -0
  265. package/es6/FrontApplet/Offline/Cache/IFile.js.map +1 -0
  266. package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.d.ts +5 -0
  267. package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.js +3 -0
  268. package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.js.map +1 -0
  269. package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.d.ts +5 -0
  270. package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.js +3 -0
  271. package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.js.map +1 -0
  272. package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.d.ts +5 -0
  273. package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.js +3 -0
  274. package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.js.map +1 -0
  275. package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.d.ts +6 -0
  276. package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.js +3 -0
  277. package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.js.map +1 -0
  278. package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.d.ts +5 -0
  279. package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.js +3 -0
  280. package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.js.map +1 -0
  281. package/es6/FrontApplet/Offline/Cache/ISavedContents.d.ts +4 -0
  282. package/es6/FrontApplet/Offline/Cache/ISavedContents.js +3 -0
  283. package/es6/FrontApplet/Offline/Cache/ISavedContents.js.map +1 -0
  284. package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.d.ts +6 -0
  285. package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.js +3 -0
  286. package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.js.map +1 -0
  287. package/es6/FrontApplet/Offline/Cache/ISavedFiles.d.ts +5 -0
  288. package/es6/FrontApplet/Offline/Cache/ISavedFiles.js +3 -0
  289. package/es6/FrontApplet/Offline/Cache/ISavedFiles.js.map +1 -0
  290. package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.d.ts +5 -0
  291. package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.js +3 -0
  292. package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.js.map +1 -0
  293. package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +12 -0
  294. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +47 -0
  295. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -0
  296. package/es6/FrontApplet/Offline/Flags/IFlag.d.ts +16 -0
  297. package/es6/FrontApplet/Offline/Flags/IFlag.js +8 -0
  298. package/es6/FrontApplet/Offline/Flags/IFlag.js.map +1 -0
  299. package/es6/FrontApplet/Offline/Flags/IFlagController.d.ts +12 -0
  300. package/es6/FrontApplet/Offline/Flags/IFlagController.js +3 -0
  301. package/es6/FrontApplet/Offline/Flags/IFlagController.js.map +1 -0
  302. package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +7 -0
  303. package/es6/FrontApplet/Offline/Flags/IFlags.js +3 -0
  304. package/es6/FrontApplet/Offline/Flags/IFlags.js.map +1 -0
  305. package/es6/FrontApplet/Offline/IAddFont.d.ts +50 -0
  306. package/es6/FrontApplet/Offline/IAddFont.js +22 -0
  307. package/es6/FrontApplet/Offline/IAddFont.js.map +1 -0
  308. package/es6/FrontApplet/Offline/IElement.d.ts +7 -0
  309. package/es6/FrontApplet/Offline/IElement.js +6 -0
  310. package/es6/FrontApplet/Offline/IElement.js.map +1 -0
  311. package/es6/FrontApplet/Offline/IFileType.d.ts +3 -0
  312. package/es6/FrontApplet/Offline/IFileType.js +4 -0
  313. package/es6/FrontApplet/Offline/IFileType.js.map +1 -0
  314. package/es6/FrontApplet/Offline/ISaveFile.d.ts +49 -0
  315. package/es6/FrontApplet/Offline/ISaveFile.js +26 -0
  316. package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -0
  317. package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.d.ts +7 -0
  318. package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js +26 -0
  319. package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js.map +1 -0
  320. package/es6/FrontApplet/Offline/LoadFile/ILoadFile.d.ts +8 -0
  321. package/es6/FrontApplet/Offline/LoadFile/ILoadFile.js +3 -0
  322. package/es6/FrontApplet/Offline/LoadFile/ILoadFile.js.map +1 -0
  323. package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.d.ts +8 -0
  324. package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.js +3 -0
  325. package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.js.map +1 -0
  326. package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.d.ts +7 -0
  327. package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js +25 -0
  328. package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js.map +1 -0
  329. package/es6/FrontApplet/Offline/Offline.d.ts +27 -0
  330. package/es6/FrontApplet/Offline/Offline.js +105 -0
  331. package/es6/FrontApplet/Offline/Offline.js.map +1 -0
  332. package/es6/FrontApplet/Offline/Types.d.ts +7 -0
  333. package/es6/FrontApplet/Offline/Types.js +9 -0
  334. package/es6/FrontApplet/Offline/Types.js.map +1 -0
  335. package/es6/FrontApplet/Sensors/Proximity.d.ts +16 -0
  336. package/es6/FrontApplet/Sensors/Proximity.js +36 -0
  337. package/es6/FrontApplet/Sensors/Proximity.js.map +1 -0
  338. package/es6/FrontApplet/Sensors/Sensors.d.ts +11 -0
  339. package/es6/FrontApplet/Sensors/Sensors.js +18 -0
  340. package/es6/FrontApplet/Sensors/Sensors.js.map +1 -0
  341. package/es6/FrontApplet/Stream/IStreamEvent.d.ts +6 -0
  342. package/es6/FrontApplet/Stream/IStreamEvent.js +3 -0
  343. package/es6/FrontApplet/Stream/IStreamEvent.js.map +1 -0
  344. package/es6/FrontApplet/Stream/IStreamEventListener.d.ts +5 -0
  345. package/es6/FrontApplet/Stream/IStreamEventListener.js +3 -0
  346. package/es6/FrontApplet/Stream/IStreamEventListener.js.map +1 -0
  347. package/es6/FrontApplet/Stream/IStreamMessage.d.ts +6 -0
  348. package/es6/FrontApplet/Stream/IStreamMessage.js +3 -0
  349. package/es6/FrontApplet/Stream/IStreamMessage.js.map +1 -0
  350. package/es6/FrontApplet/Stream/IStreamProperties.d.ts +10 -0
  351. package/es6/FrontApplet/Stream/IStreamProperties.js +3 -0
  352. package/es6/FrontApplet/Stream/IStreamProperties.js.map +1 -0
  353. package/es6/FrontApplet/Stream/Stream.d.ts +22 -0
  354. package/es6/FrontApplet/Stream/Stream.js +131 -0
  355. package/es6/FrontApplet/Stream/Stream.js.map +1 -0
  356. package/es6/FrontApplet/Stream/StreamProtocol.d.ts +9 -0
  357. package/es6/FrontApplet/Stream/StreamProtocol.js +13 -0
  358. package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -0
  359. package/es6/FrontApplet/Stream/streamEvents.d.ts +8 -0
  360. package/es6/FrontApplet/Stream/streamEvents.js +3 -0
  361. package/es6/FrontApplet/Stream/streamEvents.js.map +1 -0
  362. package/es6/FrontApplet/Sync/ISyncEvent.d.ts +4 -0
  363. package/es6/FrontApplet/Sync/ISyncEvent.js +3 -0
  364. package/es6/FrontApplet/Sync/ISyncEvent.js.map +1 -0
  365. package/es6/FrontApplet/Sync/ISyncSetValueMessage.d.ts +7 -0
  366. package/es6/FrontApplet/Sync/ISyncSetValueMessage.js +3 -0
  367. package/es6/FrontApplet/Sync/ISyncSetValueMessage.js.map +1 -0
  368. package/es6/FrontApplet/Sync/Sync.d.ts +20 -0
  369. package/es6/FrontApplet/Sync/Sync.js +102 -0
  370. package/es6/FrontApplet/Sync/Sync.js.map +1 -0
  371. package/es6/FrontApplet/Sync/syncEvents.d.ts +6 -0
  372. package/es6/FrontApplet/Sync/syncEvents.js +3 -0
  373. package/es6/FrontApplet/Sync/syncEvents.js.map +1 -0
  374. package/es6/FrontApplet/Timing/Timing.d.ts +10 -0
  375. package/es6/FrontApplet/Timing/Timing.js +16 -0
  376. package/es6/FrontApplet/Timing/Timing.js.map +1 -0
  377. package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.d.ts +2 -0
  378. package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.js +4 -0
  379. package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.js.map +1 -0
  380. package/es6/FrontApplet/Timing/Triggers/Triggers.d.ts +11 -0
  381. package/es6/FrontApplet/Timing/Triggers/Triggers.js +33 -0
  382. package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -0
  383. package/es6/FrontApplet/Touch/ITouchEventMessage.d.ts +6 -0
  384. package/es6/FrontApplet/Touch/ITouchEventMessage.js +3 -0
  385. package/es6/FrontApplet/Touch/ITouchEventMessage.js.map +1 -0
  386. package/es6/FrontApplet/Touch/Touch.d.ts +13 -0
  387. package/es6/FrontApplet/Touch/Touch.js +54 -0
  388. package/es6/FrontApplet/Touch/Touch.js.map +1 -0
  389. package/es6/FrontApplet/Validate/Validate.d.ts +43 -0
  390. package/es6/FrontApplet/Validate/Validate.js +266 -0
  391. package/es6/FrontApplet/Validate/Validate.js.map +1 -0
  392. package/es6/FrontApplet/Validate/ValidateObjectInterface.d.ts +8 -0
  393. package/es6/FrontApplet/Validate/ValidateObjectInterface.js +140 -0
  394. package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -0
  395. package/es6/FrontApplet/Video/IVideoEvent.d.ts +8 -0
  396. package/es6/FrontApplet/Video/IVideoEvent.js +6 -0
  397. package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -0
  398. package/es6/FrontApplet/Video/IVideoEventListener.d.ts +5 -0
  399. package/es6/FrontApplet/Video/IVideoEventListener.js +3 -0
  400. package/es6/FrontApplet/Video/IVideoEventListener.js.map +1 -0
  401. package/es6/FrontApplet/Video/IVideoMessage.d.ts +4 -0
  402. package/es6/FrontApplet/Video/IVideoMessage.js +3 -0
  403. package/es6/FrontApplet/Video/IVideoMessage.js.map +1 -0
  404. package/es6/FrontApplet/Video/IVideoProperties.d.ts +8 -0
  405. package/es6/FrontApplet/Video/IVideoProperties.js +3 -0
  406. package/es6/FrontApplet/Video/IVideoProperties.js.map +1 -0
  407. package/es6/FrontApplet/Video/Video.d.ts +39 -0
  408. package/es6/FrontApplet/Video/Video.js +242 -0
  409. package/es6/FrontApplet/Video/Video.js.map +1 -0
  410. package/es6/FrontApplet/createFrontApplet.d.ts +2 -0
  411. package/es6/FrontApplet/createFrontApplet.js +9 -0
  412. package/es6/FrontApplet/createFrontApplet.js.map +1 -0
  413. package/es6/Monitoring/Console/consoleCommands.d.ts +6 -0
  414. package/es6/Monitoring/Console/consoleCommands.js +4 -0
  415. package/es6/Monitoring/Console/consoleCommands.js.map +1 -0
  416. package/es6/Monitoring/Html/htmlCommands.d.ts +9 -0
  417. package/es6/Monitoring/Html/htmlCommands.js +5 -0
  418. package/es6/Monitoring/Html/htmlCommands.js.map +1 -0
  419. package/es6/Monitoring/Montoring.d.ts +12 -0
  420. package/es6/Monitoring/Montoring.js +159 -0
  421. package/es6/Monitoring/Montoring.js.map +1 -0
  422. package/es6/Monitoring/Offline/Cache/offlineCacheCommands.d.ts +20 -0
  423. package/es6/Monitoring/Offline/Cache/offlineCacheCommands.js +7 -0
  424. package/es6/Monitoring/Offline/Cache/offlineCacheCommands.js.map +1 -0
  425. package/es6/Monitoring/Timing/timingCommands.d.ts +4 -0
  426. package/es6/Monitoring/Timing/timingCommands.js +4 -0
  427. package/es6/Monitoring/Timing/timingCommands.js.map +1 -0
  428. package/es6/Monitoring/Video/videoCommands.d.ts +10 -0
  429. package/es6/Monitoring/Video/videoCommands.js +4 -0
  430. package/es6/Monitoring/Video/videoCommands.js.map +1 -0
  431. package/es6/Monitoring/monitoringCommands.d.ts +8 -0
  432. package/es6/Monitoring/monitoringCommands.js +5 -0
  433. package/es6/Monitoring/monitoringCommands.js.map +1 -0
  434. package/es6/Sensors/IButton.d.ts +9 -0
  435. package/es6/Sensors/IButton.js +8 -0
  436. package/es6/Sensors/IButton.js.map +1 -0
  437. package/es6/Sensors/IRfidAntenna.d.ts +10 -0
  438. package/es6/Sensors/IRfidAntenna.js +8 -0
  439. package/es6/Sensors/IRfidAntenna.js.map +1 -0
  440. package/es6/bundle.d.ts +12 -0
  441. package/es6/bundle.js +13 -0
  442. package/es6/bundle.js.map +1 -0
  443. package/package.json +70 -0
@@ -0,0 +1,142 @@
1
+ ---
2
+ title: Serial
3
+ author: Michal Artazov
4
+ date: 25.9.2020
5
+ type: js-api
6
+ tags:
7
+ - applet
8
+ - applet_api
9
+ - api
10
+ - serial
11
+ - js_api
12
+ description: "[Content JS API] Some platforms support connecting hardware via serial port, either directly via UART or via USB. This can be leveraged to integrate a wide variety of hardware into your digital signage application."
13
+ ---
14
+
15
+ # Serial
16
+
17
+ Some platforms support connecting hardware via serial port, either directly via UART or via USB.
18
+ This can be leveraged to integrate a wide variety of hardware into your digital signage application.
19
+
20
+ Such hardware could be, for example, printers, payment terminals or sensors.
21
+
22
+ ::: alert alert--warning
23
+ * Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
24
+ * More info [**HERE**](/api/js/content/js-display#supports).
25
+ :::
26
+
27
+ ## All methods
28
+
29
+ ::: table-responsive
30
+ | Method | Description | Supported since |
31
+ | ------------------ | ---------------------- | :-------------: |
32
+ | `openSerialPort()` | Open a new serial port | 4.4.0 |
33
+ :::
34
+
35
+ ## openSerialPort()
36
+
37
+ Creates a new instance of serial port. You can then use that instance to handle the communication.
38
+
39
+ ::: table-responsive
40
+ | Param | Type | Required | Description |
41
+ | --------- | ------ | :------------------------: | -------------------------------------------------- |
42
+ | `options` | Object | <div class="red">Yes</div> | Object containing configuration of the serial port |
43
+ :::
44
+
45
+ ### Options
46
+
47
+ Here is the options object defined as Typescript interface:
48
+
49
+ ```typescript
50
+ interface ISerialPortOptions {
51
+ device: string;
52
+ baudRate: number;
53
+ parity?: 'none' | 'even' | 'mark' | 'odd' | 'space';
54
+ databits?: number;
55
+ stopbits?: number;
56
+ }
57
+ ```
58
+
59
+ ### Javascript example
60
+ ```javascript
61
+ const serialPort = await sos.hardware.openSerialPort({
62
+ device: '/dev/ttyUSB0',
63
+ baudRate: 115200,
64
+ });
65
+ ```
66
+
67
+ ::: alert alert--info
68
+ Right now, it's necessary to always use `/dev/ttyUSB0` for the device. We are currently working on a more robust solution.
69
+ :::
70
+
71
+ ## Serial port methods
72
+
73
+ Once you create a serial port instance using `openSerialPort()` method listed above,
74
+ you can call following methods on it.
75
+
76
+ ::: table-responsive
77
+ | Method | Description | Supported since |
78
+ | ---------- | ----------------------------------------------------------- | :-------------: |
79
+ | `onData()` | Call a listener callback anytime serial port emits new data | 4.4.0 |
80
+ | `write()` | Write data to the serial port | 4.4.0 |
81
+ | `close()` | Close serial port | 4.4.0 |
82
+ :::
83
+
84
+ ## onData()
85
+
86
+ Call a listener callback anytime serial port emits data.
87
+
88
+ Since data may be either text or binary, it's emitted as [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)
89
+ and should be processed further according to the requirements of your application.
90
+
91
+ ### Javascript example
92
+ In case of binary data:
93
+ ```javascript
94
+ // serial port instance previously created via sos.hardware.openSerialPort()
95
+ serialPort.onData((data) => {
96
+ // data is array of numbers so can be processed as binary
97
+ });
98
+ ```
99
+
100
+ In case of text data:
101
+ ```javascript
102
+ // serial port instance previously created via sos.hardware.openSerialPort()
103
+ serialPort.onData((data) => {
104
+ const dataString = [...data].map((char) => String.fromCharCode(char)).join('');
105
+ });
106
+ ```
107
+
108
+ ## write()
109
+
110
+ Write data to the serial port. The data can be a string, array of numbers or [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
111
+
112
+ ### Javascript example
113
+ ```javascript
114
+ // serial port instance previously created via sos.hardware.openSerialPort()
115
+ await serialPort.write('string data'); // string
116
+ await serialPort.write([ 10, 20, 30, 40 ]); // array of numbers
117
+ await serialPort.write(Uint8Array.from([ 10, 20, 30, 40 ])); // Uint8Array
118
+ ```
119
+
120
+ ## close()
121
+
122
+ Close serial port and prevent any more communication
123
+
124
+ ### Javascript example
125
+ ```javascript
126
+ // serial port instance previously created via sos.hardware.openSerialPort()
127
+ await serialPort.close();
128
+ ```
129
+
130
+ ## Errors
131
+
132
+ Following errors may occur when working with the serial ports.
133
+
134
+ ::: table-responsive
135
+ | Code | Type | Message |
136
+ | ----- | --------------------- | ----------------------------------------- |
137
+ | 50602 | InternalHardwareError | Failed to open serial port |
138
+ | 50603 | InternalHardwareError | Closing serial port that isn't open |
139
+ | 50603 | InternalHardwareError | Failed to close serial port |
140
+ | 50604 | InternalHardwareError | Writing to a serial port that isn't open |
141
+ | 50604 | InternalHardwareError | Failed to write to serial port |
142
+ :::
@@ -0,0 +1,70 @@
1
+ ---
2
+ title: Hardware
3
+ author: Miroslav Behina
4
+ date: 22.11.2018
5
+ type: js-api
6
+ tags:
7
+ - applet
8
+ - applet_api
9
+ - api
10
+ - philips
11
+ - led
12
+ - js_api
13
+ description: "[Content JS API] Some platforms support special hardware, that can be easily managed by JS using sOS hardware API."
14
+ ---
15
+
16
+ # Hardware
17
+ Some platforms support special hardware, that can be easily managed by JS using sOS hardware API.
18
+
19
+
20
+ ## LED
21
+
22
+ Some Philips brand devices have LED lights built into them. The color of lights can be changed or disabled:
23
+
24
+ ### All methods
25
+
26
+ ::: table-responsive
27
+ | Method | Description | Supported since |
28
+ | ------ | -------- | :---------: |
29
+ | `setColor()` | Method supports a string in hexa format to display color of LED light or null value to not be disabled | 1.0.1 |
30
+ :::
31
+
32
+ ### setColor()
33
+
34
+ ::: table-responsive
35
+ | Param | Type | Required | Description |
36
+ | ------ | ------ | :--------: | -------- |
37
+ | `color` | string | <div class="red">Yes</div> | Color of LED to be set in CSS hexa format `#000000`. To disable LED pass null value instead. |
38
+ :::
39
+
40
+ #### Javascript example
41
+ ```javascript
42
+ sos.hardware.led.setColor("#00FF00"); // For GREEN light
43
+ ```
44
+
45
+ <div class="row d-flex align-content-stretch force-padding-20">
46
+ <div class="col-12 d-flex">
47
+ <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/hardware-led">
48
+ <div>
49
+ <div class="wide-box__image d-flex align-items-center">
50
+ <i class="fab fa-github svg-black"></i>
51
+ </div>
52
+ <div>
53
+ <h3 class="wide-box__title wide-box__title__small pl-85">Example of Applet with LED usage</h3>
54
+ <div class="wide-box__description">Working example on our Github</div>
55
+ </div>
56
+ </div>
57
+ </a>
58
+ </div>
59
+ </div>
60
+
61
+ ## Errors
62
+ Although we are doing our best, following errors may occur when working with the hardware.
63
+
64
+ ::: table-responsive
65
+ | Code | Type | Message |
66
+ | ---- | ---- | ------- |
67
+ | 50601 | InternalHardwareError | Unexpected error occurred when working with hardware. |
68
+ | 40601 | AppletHardwareError | Color must be string |
69
+ | 40602 | AppletHardwareError | Color must be in format #000000 or null, allowed are `/^[a-zA-Z0-9\.\-_]+$/g` |
70
+ :::
@@ -0,0 +1,88 @@
1
+ ---
2
+ title: Iframes
3
+ author: Josef Král
4
+ date: 7.9.2020
5
+ type: js-api
6
+ tags:
7
+ - applet
8
+ - applet_api
9
+ - api
10
+ - js_api
11
+ - iframe
12
+ description: "[Content JS API] We **do not recommend** to use iframes inside your Applet. However, if you have to use it, you can add full support of the sOS JS API to every one of your iframe. Just add the JS snippet script below to every page load in iframe before ending </body>. Everything will be prepared, and you can call the very same methods as described for Applet."
13
+ ---
14
+
15
+ # Iframes
16
+ We **do not recommend** to use iframes inside your Applet. However, if you have to use it, you can add full support of the sOS JS API to every one of your iframe. Just add the JS snippet script below to every page load in iframe before ending </body>. Everything will be prepared, and you can call the very same methods as described for Applet.
17
+
18
+ ::: alert alert--warning
19
+ The signageOS Snippet and API works **ONLY** if the iframe is served from the display's internal storage - `<iframe src="file://...`. If your iframe is served from a live URL - `<iframe src="https://your-iframe-url"...` the snippet and signageOS API will **NOT** work. This is a security limitation to prevent random site took advantage of the API and alter the display behavior. There is a simple way to [save and load your iframe from the internal storage](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/iframes). Just make sure you are using full paths in your iframe for linking javascripts and css instead of the relative ones.
20
+ :::
21
+
22
+ ## Create applet
23
+ First applet, what will be as iframe in main applet. There is also **required event listener** to work iframes in an applet. Insert this snippet on bottom of iframe applet code.
24
+ ```javascript
25
+ <script type="text/javascript">
26
+ // sOS JS API loader
27
+ !function(){window.addEventListener("message",function(t){
28
+ if(t.source===window.parent&&"hug.api_js_uri"===t.data.type) {
29
+ var e=t.data.uri;
30
+ if(!e)throw new Error("Front applet JS is not set.");
31
+ var a=document.createElement("script");
32
+ a.setAttribute("type","text/javascript"),a.setAttribute("src",e),a.onload=a.onreadystatechange=function(){
33
+ this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(window.sos.apiJsUri=t.data.uri,window.dispatchEvent(new Event("hug.loaded")),window.dispatchEvent(new Event("sos.loaded")))},document.head.appendChild(a)}}),window.parent.postMessage({type:"hug_loader.ready"},"*")}();
34
+ </script>
35
+ ```
36
+
37
+ <div class="row d-flex align-content-stretch force-padding-20">
38
+ <div class="col-12 d-flex">
39
+ <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/iframes">
40
+ <div>
41
+ <div class="wide-box__image d-flex align-items-center">
42
+ <i class="fab fa-github svg-black"></i>
43
+ </div>
44
+ <div>
45
+ <h3 class="wide-box__title wide-box__title__small pl-85">Applet that will be in Iframe</h3>
46
+ <div class="wide-box__description">Working example on our Github</div>
47
+ </div>
48
+ </div>
49
+ </a>
50
+ </div>
51
+ </div>
52
+
53
+ ## Finally, use created applet in another applet as iframe.
54
+
55
+ ```javascript
56
+ window.addEventListener('sos.loaded', () => {
57
+ sos.onReady().then(() => {
58
+ const contentElement = document.getElementById('index');
59
+ const iframeElement = document.getElementById('iframe');
60
+ sos.onReady();
61
+
62
+ // Download created iframe into main applet
63
+ const iframeUri = sos.config.iframeUri || 'https://raw.githubusercontent.com/signageos/applet-examples/master/examples/iframes/iframe.html';
64
+ const { filePath } = sos.offline.cache.loadOrSaveFile('iframe.html', iframeUri);
65
+
66
+ // Setup iframe
67
+ contentElement.innerHTML = '';
68
+ iframeElement.src = filePath;
69
+ iframeElement.style.display = 'block';
70
+ });
71
+ });
72
+ ```
73
+
74
+ <div class="row d-flex align-content-stretch force-padding-20">
75
+ <div class="col-12 d-flex">
76
+ <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/iframes">
77
+ <div>
78
+ <div class="wide-box__image d-flex align-items-center">
79
+ <i class="fab fa-github svg-black"></i>
80
+ </div>
81
+ <div>
82
+ <h3 class="wide-box__title wide-box__title__small pl-85">How to use Iframes in Applet</h3>
83
+ <div class="wide-box__description">Working example on our Github</div>
84
+ </div>
85
+ </div>
86
+ </a>
87
+ </div>
88
+ </div>
@@ -0,0 +1,84 @@
1
+ ---
2
+ title: IR Remote Control Input
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] For the specific logic of an application (games for example), binding the remote control inputs can be helpful."
12
+ ---
13
+
14
+ # IR Remote Control Input
15
+ For the specific logic of an application (games for example), binding the remote control inputs can be helpful.
16
+ Only a subset of all remote control keys is supported on the specific device. Only numerical digits are guaranteed to be supported.
17
+ This feature must be tested by users on real devices.
18
+
19
+ ## Event onKeyUp()
20
+
21
+ ### Parameters
22
+
23
+ ::: table-responsive
24
+ | Parameters | Type | Required | Description | Supported Since |
25
+ | ------ | ------ | :--------: | -------- | :-----: |
26
+ | event (in listener) | Object | <div class="red">Yes</div> | Plain JS object containing keyCode as number and keyName as string and type of event (always keyup string) | 1.3.0 |
27
+ :::
28
+
29
+ ### Javascript syntax
30
+ ```javascript
31
+ await sos.input.onKeyUp((keyUpEvent) => {
32
+ console.log(`Pressed: ${keyUpEvent.keyCode} (${keyUpEvent.keyName})`);
33
+ });
34
+ ```
35
+
36
+ ## Map of keyCodes:
37
+ | Name | Key code | Name | Key Code |
38
+ | ---- | :----: | ----- | :----: |
39
+ | UNKNOWN | 0 | OK | 15 |
40
+ | NUM_0 | 1 | YELLOW | 16 |
41
+ | NUM_1 | 2 | BLUE | 17 |
42
+ | NUM_2 | 3 | RED | 18 |
43
+ | NUM_3 | 4 | GREEN | 19 |
44
+ | NUM_4 | 5 | VOLUME_DOWN | 20 |
45
+ | NUM_5 | 6 | VOLUME_UP | 30 |
46
+ | NUM_6 | 7 | POWER | 31 |
47
+ | NUM_7 | 8 | POWER_OFF | 32 |
48
+ | NUM_8 | 9 | HOME | 33 |
49
+ | NUM_9 | 10 | EXIT | 34 |
50
+ | ARROW_LEFT | 11 | RETURN | 35 |
51
+ | ARROW_UP | 12 | BACKSPACE | 36 |
52
+ | ARROW_RIGHT | 13 | LOCK | 37 |
53
+ | ARROW_DOWN | 14 | | |
54
+
55
+ ## Usage with Typescript
56
+ You can also use all these methods with [signageOS TypeScript](/knowledge-base/dev-tools-cli-typescript).
57
+
58
+ ```typescript
59
+ interface IKeyUpEvent {
60
+ type: 'keyup';
61
+ keyCode: number;
62
+ keyName: string;
63
+ }
64
+ interface IKeyUpEventListener {
65
+ (event: IKeyUpEvent): void;
66
+ }
67
+ onKeyUp(listener: IKeyUpEventListener): void;
68
+ ```
69
+
70
+ <div class="row d-flex align-content-stretch force-padding-20">
71
+ <div class="col-12 d-flex">
72
+ <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/tree/master/examples/content-js-api/remote-control">
73
+ <div>
74
+ <div class="wide-box__image d-flex align-items-center">
75
+ <i class="fab fa-github svg-black"></i>
76
+ </div>
77
+ <div>
78
+ <h3 class="wide-box__title wide-box__title__small pl-85">IR Input handling</h3>
79
+ <div class="wide-box__description">Working example on our Github</div>
80
+ </div>
81
+ </div>
82
+ </a>
83
+ </div>
84
+ </div>
@@ -0,0 +1,138 @@
1
+ ---
2
+ title: Loading fonts
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] When working with custom font families, you should use this method that downloads fonts into offline storage and generates the appropriate font-face definition."
12
+ ---
13
+
14
+ # Loading fonts
15
+ When working with custom font families, you should use this method that downloads fonts into offline storage and generates the appropriate font-face definition.
16
+
17
+ ### All methods
18
+ ::: table-responsive
19
+ | Method | Description | Supported since |
20
+ | ------ | -------- | ----- | :----------: |
21
+ | `addFont()` | Load additionally font into applet cache | 2.0.0 |
22
+ :::
23
+
24
+ ### Parameters
25
+
26
+ ::: table-responsive
27
+ | Param | Type | Required | Description |
28
+ | ------- | --------- | :----------: | ------ |
29
+ | `uid` | string | <div class="red">Yes</div> | Unique file identifier is used for later file retrieval, must contain a-z,A-Z,0-9 and . characters |
30
+ | `append` | HTMLElement | <div class="red">Yes</div> |Reference to HTMLElement where the generated font-face will resist |
31
+ | `fontFamily` | string | <div class="yellow">No</div> | Font family that can be referenced from your CSS |
32
+ | `formats` | object | <div class="yellow">No</div> | URI where these formats will be downloaded from |
33
+ | `fontStretch` | string | <div class="yellow">No</div> | Allows you to make text wider or narrower |
34
+ | `fontStyle` | string | <div class="yellow">No</div> | Apecifies the font stlye for a text |
35
+ |^^|^^|^^| Types: `normal`, `italic`, `oblique`, `initial`, `inherit` |
36
+ | `fontWeight` | string | <div class="yellow">No</div> | Sets how thick or thin characters in text should be displayed |
37
+ | `unicodeRage` | string | <div class="yellow">No</div> | Defines the range of unicode characters the font supports, default value is "U+0-10FFFF" |
38
+ :::
39
+
40
+ ### Formats parameters
41
+ | Param | Type | Required | Description |
42
+ | ------- | --------- | :----------: | ------ |
43
+ | `woff2` | String | <div class="yellow">No</div> | URI points to woff2 file |
44
+ | `woff` | String | <div class="yellow">No</div> | URI points to woff file |
45
+ | `svg` | String | <div class="yellow">No</div> | URI points to svg file |
46
+ | `ttf` | String | <div class="yellow">No</div> | URI points to ttf file |
47
+ | `eot` | String | <div class="yellow">No</div> | URI points to eot file |
48
+
49
+ ### Javascript Example
50
+ ```javascript
51
+ await sos.offline.addFont({
52
+ uid: 'my-tondo-font',
53
+ fontFamily: 'tondo',
54
+ fontStretch: 'normal',
55
+ fontStyle: 'normal',
56
+ fontWeight: 'bold',
57
+ unicodeRange: 'U+0-10FFFF',
58
+ formats: {
59
+ woff2: 'https://mycms.signageos.io/fonts/tondo-woff2',
60
+ eot: 'https://mycms.signageos.io/fonts/tondo-eot',
61
+ ttf: 'https://mycms.signageos.io/fonts/tondo-ttf',
62
+ svg: 'https://mycms.signageos.io/fonts/tondo-svg',
63
+ woff: 'https://mycms.signageos.io/fonts/tondo-woff',
64
+ },
65
+ append: document.body,
66
+ })
67
+ .then(() => {
68
+ console.log('Generated');
69
+ });
70
+ ```
71
+
72
+ <div class="row d-flex align-content-stretch force-padding-20">
73
+ <div class="col-12 d-flex">
74
+ <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face">
75
+ <div>
76
+ <div class="wide-box__image d-flex align-items-center">
77
+ <i class="fas fa-atlas svg-black"></i>
78
+ </div>
79
+ <div>
80
+ <h3 class="wide-box__title wide-box__title__small pl-85">Most properties follow the official CSS properties found</h3>
81
+ <div class="wide-box__description">Mozilla Developer Page</div>
82
+ </div>
83
+ </div>
84
+ </a>
85
+ </div>
86
+ </div>
87
+
88
+ <div class="row d-flex align-content-stretch force-padding-10">
89
+ <div class="col-12 d-flex">
90
+ <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/fonts">
91
+ <div>
92
+ <div class="wide-box__image d-flex align-items-center">
93
+ <i class="fab fa-github svg-black"></i>
94
+ </div>
95
+ <div>
96
+ <h3 class="wide-box__title wide-box__title__small pl-85">Example of Applet that load custom fonts</h3>
97
+ <div class="wide-box__description">Working example on our Github</div>
98
+ </div>
99
+ </div>
100
+ </a>
101
+ </div>
102
+ </div>
103
+
104
+ ## Usage with Typescript
105
+ You can also use all these methods with [signageOS TypeScript](/knowledge-base/dev-tools-cli-typescript).
106
+
107
+ ```typescript
108
+ addFont(
109
+ uid: string;
110
+ append: HTMLElement;
111
+ fontFamily: string;
112
+ formats: {
113
+ woff2: string;
114
+ woff?: string;
115
+ svg?: string;
116
+ ttf?: string;
117
+ svg?: string;
118
+ },
119
+ fontStretch?: string;
120
+ fontStyle?: 'normal' | 'italic' | 'oblique' | 'initial' | 'inherit';
121
+ fontWeight?: string;
122
+ unicodeRange?: string;
123
+ );
124
+ ```
125
+
126
+ ## Errors
127
+ Although we are doing our best, following errors may occur when working with the Applet Resources.
128
+
129
+ ::: table-responsive
130
+ | Code | Type | Message |
131
+ | ---- | ---- | ------- |
132
+ | 40105 | AppletResourcesError | Already loading file: `$$FILE_NAME$$` |
133
+ |^^|^^| Please, check your code for multiple occurrences of addFile/s methods. |
134
+ | 40106 | AppletResourcesError | Already existing file: `$$FILE_NAME$$` |
135
+ |^^|^^| Please, check your code for occurrences of addFile/s methods on lines before this error. |
136
+ | 49901 | AppletResourceError | Please, check if the used URL is correct. |
137
+ | 49902 | FileNotFoundError | File was not found `$$FILE_ID$$` |
138
+ :::
@@ -0,0 +1,108 @@
1
+ ---
2
+ title: Monitoring Commands
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] All commands have type prefixed with sos. string. It is not recommended using this prefix as a type in your custom commands. Predefined monitoring commands are not dispatched until monitoring is enabled. There are two ways how to enable it."
12
+ ---
13
+
14
+ # Monitoring Commands
15
+
16
+ ::: alert alert--warning
17
+ This is only a preview, not supported by all platforms. Supported since: 2.0.0
18
+ :::
19
+
20
+ All commands have type prefixed with sos. string. It is not recommended using this prefix as a type in your custom commands. Predefined monitoring commands are not dispatched until monitoring is enabled. There are two ways how to enable it.
21
+
22
+ * Adding a special reserved key in Timing configuration sosMonitoring' to 1
23
+ * Sending a command to a device with type ```sos.Monitoring.EnableMonitoring```
24
+ OR
25
+ ```sos.Monitoring.DisableMonitoring```
26
+
27
+ ## List of monitoring commands:
28
+
29
+ ### Typescript
30
+ ```typescript
31
+ export const VideoStateChanged = 'sos.Monitoring.Video.VideoStateChanged';
32
+ export interface VideoStateChanged {
33
+ type: typeof VideoStateChanged;
34
+ state: 'play' | 'prepare' | 'stop' | 'pause' | 'resume' | 'ended' | 'error';
35
+ uri: string;
36
+ x: number;
37
+ y: number;
38
+ width: number;
39
+ height: number;
40
+ }
41
+
42
+
43
+ export const TimingLoaded = 'sos.Monitoring.Timing.TimingLoaded';
44
+ export interface TimingLoaded { type: typeof TimingLoaded; }
45
+
46
+ export const OfflineCacheFilesListed = 'sos.Monitoring.Offline.Cache.OfflineCacheFilesListed';
47
+ export interface OfflineCacheFilesListed {
48
+ type: typeof OfflineCacheFilesListed;
49
+ fileUids: string[];
50
+ }
51
+
52
+ export const OfflineCacheFileLoaded = 'sos.Monitoring.Offline.Cache.OfflineCacheFileLoaded';
53
+ export interface OfflineCacheFileLoaded {
54
+ type: typeof OfflineCacheFileLoaded;
55
+ file: IFile;
56
+ }
57
+
58
+ export const HtmlSnapshotTaken = 'sos.Monitoring.Html.HtmlSnapshotTaken';
59
+ export interface HtmlSnapshotTaken {
60
+ type: typeof HtmlSnapshotTaken;
61
+ html: string;
62
+ }
63
+
64
+ export const ConsoleLogged = 'sos.Monitoring.Console.ConsoleLogged';
65
+ export interface ConsoleLogged {
66
+ type: typeof ConsoleLogged;
67
+ level: 'log' | 'debug' | 'info' | 'warn' | 'error';
68
+ messages: string[];
69
+ }
70
+ ```
71
+
72
+ To trigger some monitoring commands to be dispatched from a device. This REST API can be used to send monitoring [commands to the device](https://docs.signageos.io/api/device-monitoring-api/#Send_Device_Applet_Command_to_device). Following commands can be used:
73
+
74
+ ### Typescript
75
+ ```typescript
76
+ export const EnableMonitoring = 'sos.Monitoring.EnableMonitoring';
77
+ export interface EnableMonitoring { type: typeof EnableMonitoring; }
78
+
79
+ export const DisableMonitoring = 'sos.Monitoring.DisableMonitoring';
80
+ export interface DisableMonitoring { type: typeof DisableMonitoring; }
81
+
82
+ export const TakeHtmlSnapshot = 'sos.Html.TakeHtmlSnapshot';
83
+ export interface TakeHtmlSnapshot {
84
+ type: typeof TakeHtmlSnapshot;
85
+ }
86
+
87
+ export const OfflineCacheListFiles = 'sos.Monitoring.Offline.Cache.OfflineCacheListFiles';
88
+ export interface OfflineCacheListFiles {
89
+ type: typeof OfflineCacheListFiles;
90
+ }
91
+
92
+ export const OfflineCacheLoadFile = 'sos.Monitoring.Offline.Cache.OfflineCacheLoadFile';
93
+ export interface OfflineCacheLoadFile {
94
+ type: typeof OfflineCacheLoadFile;
95
+ uid: string;
96
+ }
97
+ ```
98
+
99
+ ## Errors
100
+ Although we are doing our best, following errors may occur when working with the commands.
101
+
102
+ ::: table-responsive
103
+ | Code | Type | Message |
104
+ | ---- | ---- | ------- |
105
+ | 40401 | AppletCommandTypeError | Type contains invalid characters, allowed are `/^[a-zA-Z0-9\.\-_]+$/g` |
106
+ | 40402 | AppletCommandTypeError | Type is longer then 100 characters. |
107
+ | 40403 | AppletCommandTypeError | Command type must be a string. |
108
+ :::
@@ -0,0 +1,55 @@
1
+ ---
2
+ title: Monitors
3
+ author: Alisher Nurmatov
4
+ date: 29.12.2020
5
+ type: js-api
6
+ tags:
7
+ - applet
8
+ - applet_api
9
+ - api
10
+ - js_api
11
+ description: "[Content JS API] Monitors provides info about connected **monitors**"
12
+ ---
13
+
14
+ # Monitors
15
+
16
+ Provides information about currently connected monitors. Such as manufacturer, model, serial, firmware (optional).
17
+
18
+ ### Monitor object
19
+
20
+ Here is the monitor object defined as Typescript interface:
21
+
22
+ ```typescript
23
+ interface IMonitor {
24
+ manufacturer: string;
25
+ model: string;
26
+ serial: string;
27
+ firmware?: string;
28
+ }
29
+ ```
30
+
31
+ ## All methods
32
+
33
+ ::: table-responsive
34
+ | Method/Events | Description | Supported since |
35
+ | ----------------- | --------------------------------- | :---------------: |
36
+ | `getList()` | Method gets list of monitors. | 4.0.0 |
37
+ :::
38
+
39
+ ### Javascript example
40
+ ```javascript
41
+ // gets list of monitors
42
+ await sos.monitors.getList();
43
+ ```
44
+ ### Returns
45
+
46
+ ```json
47
+ [
48
+ {
49
+ "model":"LG Ultra HD",
50
+ "manufacturer":"GSM",
51
+ "serial":"232111"
52
+ }
53
+ ]
54
+ ```
55
+