@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
package/docs/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # Documentation
2
+
3
+ These files are build and downloaded by the official repository of [signageOS Documentation](https://gitlab.com/signageos/documentation).
4
+ **Please observe the format that is written in [Contribution Guide](https://gitlab.com/signageos/documentation/-/blob/master/CONTRIBUTING.md).**
5
+
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: Api Home
3
+ author: Josef Kral
4
+ date: 4.2.2018
5
+ type: rest-api
6
+ tags:
7
+ - rest_api
8
+ - js_api
9
+ - api
10
+ description: "[Content JS API] General introduction to signageOS JS API"
11
+ ---
12
+ # Applet Javascript API
13
+
14
+ Applet JS API gives you **full control over the devices** with a standardized interface.
15
+ You can use the same functions across all devices with the same result. Applet JS API is available automatically within your Applet out-of-the-box.
16
+
17
+ Applet JS API supports content-playback features and device management features.
18
+
19
+ ### About signageOS APIs
20
+
21
+ In signageOS there are 2 main groups of APIs:
22
+ - `Client-side` - JS API available for both **signageOS Open** and signageOS Platform plans
23
+ - `Server-side` - REST API available in **signageOS Platform plan only**
24
+
25
+ ::: alert alert--tip
26
+ All APIs are standardized and available across all [supported devices](/category/supported-devices-guides).
27
+ :::
28
+
29
+ ## Content-playback APIs
30
+ Content-playback API is an API for managing content on screen.
31
+
32
+ ::: table-responsive
33
+ | Domain | Description |
34
+ | ------ | ----------- |
35
+ | **[Basic information](/api/js/content/js-applet-basics)** | General information required to use the signageOS JS API |
36
+ | [Applet Resources](/api/js/content/js-applet-resources) | Pre-load necessary files required by your HTML5 player/Applet |
37
+ | [Display](/api/js/content/js-display) | Query features supported by the display |
38
+ | [Browser](/api/js/content/js-browser) | Opening managed web-browser on Android devices inc. whitelisting, blacklisting and other features |
39
+ | [Command](/api/js/content/js-command) | Sending business or technical logs through signageOS in secured offline-ready way |
40
+ | [File system](/api/js/content/js-file-system) | Full-featured file system API including ZIP and folder management |
41
+ | [Hardware](/api/js/content/js-hardware) | Hardware-specific APIs like LED lights on Philips 10BDL |
42
+ | [Serial](/api/js/content/js-hardware-serial) | Control external devices via serial |
43
+ | [Inputs](/api/js/content/js-input) | Controller inputs like IR remote unified under one API |
44
+ | [Fonts](/api/js/content/js-loading-fonts) | Make it easy to load additional fonts into SoC devices |
45
+ | [Synchronized playback](/api/js/content/js-sync-playback) | API for creating synced playback and videowalls |
46
+ | [Timings](/api/js/content/js-timing) | Managing Timing/Applet switching from JS |
47
+ | [Video Inputs aka PiP](/api/js/content/js-video-inputs-internal-ports) | Show HDMI/DP/VGA as a part of your content via PiP feature |
48
+ | [Video Playback](/api/js/content/js-video) | Playing accelerated gapless videos via native video player |
49
+ | [Video Streams](/api/js/content/js-video-stream) | Playing video streams (RTSP, HLS, UDP) via native video player |
50
+ | [Sensors](/api/js/content/js-sensors) | Using sensors and IoT devices in your application |
51
+ | [Monitors](/api/js/content/js-monitors) | Information about monitors |
52
+ :::
53
+
54
+ ## Device management APIs
55
+ Device management API is for managing, updating firmware, and other settings on the device.
56
+
57
+ ::: table-responsive
58
+ | Domain | Description |
59
+ | ------ | ----------- |
60
+ | [Management](/api/js/management/1-js-management) | Information about the device and power action like Reboot, Restart,.. |
61
+ | [Firmware](/api/js/management/2-js-management-firmware) | Get FW version and upgrade FW from remote location |
62
+ | [Remote Control](/api/js/management/3-js-management-remote-control) | Manage IR Remote control functionality |
63
+ | [Display](/api/js/management/4-js-management-power) | Manage display power - timers, restart and reboot |
64
+ | [Screen](/api/js/management/5-js-management-screen) | Manage brightness, orientation and resolution, display on/off |
65
+ | [Time](/api/js/management/6-js-management-time) | Set time, timezone and get current settings |
66
+ | [Volume](/api/js/management/7-js-management-volume) | Control system volume level |
67
+ | [Package](/api/js/management/8-js-management-package) | Install and manage packages |
68
+ | [Debug](/api/js/management/9-js-management-debug) | Enable/disable debug mode |
69
+ | [Application](/api/js/management/10-js-management-application) | Get application version and upgrade application from remote location |
70
+ | [Network](/api/js/management/11-js-management-network) | Manage network settings |
71
+ | [Security](/api/js/management/12-js-management-security) | Control system security (PIN code) |
72
+ | [Wi-Fi](/api/js/management/13-js-management-wifi) | Manage Wi-Fi |
73
+ :::
@@ -0,0 +1,294 @@
1
+ ---
2
+ title: Applet Basics
3
+ author: Miroslav Behina
4
+ date: 22.11.2018
5
+ type: js-api
6
+ tags:
7
+ - applet
8
+ - applet_api
9
+ - api
10
+ - js_api
11
+ description: "[Content JS API] This thread contains basic methods of every Applet used to load necessary configuration or device identifications and how to create Applet."
12
+ ---
13
+
14
+ # Applet Basics
15
+
16
+ This thread contains basic methods of every Applet used to load necessary configuration or device identifications and how to create Applet.
17
+
18
+ ## All methods and properties
19
+ ::: table-responsive
20
+ | Methods/Property | Description | Supported since |
21
+ | ----------------- | ----------- | :---------------: |
22
+ | `onReady()` | This method will wait until sOS object library and all dependencies are ready to be used. | 1.0.0 |
23
+ | `restore()` | Clear all previously played videos, streams, clear display view. | 1.0.0 |
24
+ | `appletVersion` | Returns current Applet version | JS API `4.5.0`, Front-display `7.8.0`|
25
+ :::
26
+
27
+ ## Starting Applet
28
+
29
+ Your applet logic should be started **after sOS object is loaded and ready**. To start your applet you can use this example snippet.
30
+
31
+ ### Javascript example:
32
+ ``` javascript
33
+ /*
34
+ CLI generated Applet
35
+ */
36
+ sos.onReady().then(async function () {
37
+ startYourApplet(); // Example method to run
38
+ // Any other code
39
+ }
40
+
41
+ /*
42
+ Deprecated single file Applet options
43
+ */
44
+
45
+ // option A
46
+ window.addEventListener('sos.loaded', () => {
47
+ sos.onReady().then(() => {
48
+ startYourApplet(); // Example method to run
49
+ // Any other code
50
+ });
51
+ });
52
+
53
+ // option B
54
+ async function startApplet() {
55
+ await sos.onReady();
56
+ // Any other code
57
+ }
58
+ window.addEventListener('sos.loaded', startApplet);
59
+ ```
60
+
61
+ After sOS object is ready, there are global properties available, which can be used for Applet customization and device identification.
62
+
63
+ ### Javascript syntax:
64
+ ```javascript
65
+ // Authentication hash string to secure access to device resources in REST API
66
+ console.log(sos.authHash);
67
+
68
+ // Parsed JSON object passed to Timing for current applet & current device together
69
+ console.log(sos.config);
70
+ ```
71
+
72
+ ## onReady()
73
+ This method will wait until sOS object library and all dependencies are ready to be used.
74
+
75
+ ::: alert alert--danger
76
+ Every Applet must contain this method, otherwise it won't work.
77
+ :::
78
+
79
+ ### Javascript example:
80
+ ```javascript
81
+ /*
82
+ CLI generated Applet
83
+ */
84
+ sos.onReady().then(async function () {
85
+ console.log('sos is ready', sos); // Print sOS object into console
86
+ // Any other methods to prepare your content and applet
87
+ }
88
+
89
+ /*
90
+ Deprecated single file Applet options
91
+ */
92
+ window.addEventListener('sos.loaded',() => {
93
+ sos.onReady().then(() => {
94
+ console.log('sos is ready', sos); // Print sOS object into console
95
+ // Any other methods to prepare your content and applet
96
+ });
97
+ });
98
+ ```
99
+
100
+ <div class="row d-flex align-content-stretch force-padding-20">
101
+ <div class="col-12 d-flex">
102
+ <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/restore">
103
+ <div>
104
+ <div class="wide-box__image d-flex align-items-center">
105
+ <i class="fab fa-github svg-black"></i>
106
+ </div>
107
+ <div>
108
+ <h3 class="wide-box__title wide-box__title__small pl-85">Example of Applet for basic start</h3>
109
+ <div class="wide-box__description">Working example on our Github</div>
110
+ </div>
111
+ </div>
112
+ </a>
113
+ </div>
114
+ </div>
115
+
116
+ ## restore()
117
+ The typical case of usage for digital signage is playing a loop with some specified duration. This method should be called always when the loop is changed. It will clear all previously played videos, streams, clear display views, and notify for garbage collection.
118
+ It stops all video playback and clears out the memory. The following function should be triggered **only** in a case the whole playback needs to be restarted as it's completely switching the playback 'loop/playlist'.
119
+
120
+ ### Javascript example:
121
+ ```javascript
122
+ /*
123
+ CLI generated Applet
124
+ */
125
+ sos.onReady().then(async function () {
126
+ console.log('sos is ready', sos);
127
+ // Any other methods to prepare, load and run content on screen
128
+ sos.restore();
129
+ }
130
+
131
+ /*
132
+ Deprecated single file Applet options
133
+ */
134
+ window.addEventListener('sos.loaded', () => {
135
+ sos.onReady().then(() => {
136
+ console.log('sos is ready', sos);
137
+ // Any other methods to prepare, load and run content on screen
138
+ sos.restore();
139
+ });
140
+ });
141
+ ```
142
+
143
+ <div class="row d-flex align-content-stretch force-padding-20">
144
+ <div class="col-12 d-flex">
145
+ <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/restore">
146
+ <div>
147
+ <div class="wide-box__image d-flex align-items-center">
148
+ <i class="fab fa-github svg-black"></i>
149
+ </div>
150
+ <div>
151
+ <h3 class="wide-box__title wide-box__title__small pl-85">Example of Applet with restore() method</h3>
152
+ <div class="wide-box__description">Working example on our Github</div>
153
+ </div>
154
+ </div>
155
+ </a>
156
+ </div>
157
+ </div>
158
+
159
+ ## appletVersion
160
+ This property returns current active Applet version.
161
+
162
+ ### Javascript example:
163
+
164
+ ```javascript
165
+ /*
166
+ CLI generated Applet
167
+ */
168
+ sos.onReady().then(async function () {
169
+ console.log('Your applet version is ' + sos.appletVersion));
170
+ }
171
+
172
+ /*
173
+ Deprecated single file Applet options
174
+ */
175
+ window.addEventListener('sos.loaded',() => {
176
+ sos.onReady().then(() => console.log('Your applet version is ' + sos.appletVersion));
177
+ });
178
+ ```
179
+
180
+ ## Custom variables in Applet
181
+
182
+ You can pass CUSTOM key-value variables to the Applet. To do that, add your values as a Timing configuration (over Box of [Timings API](/api/rest/timing/3-timing-post-one)). Then you can access your values via `sos.config` object.
183
+
184
+ ```javascript
185
+ // Parsed JSON object passed to Timing for current applet & current device together
186
+ console.log(sos.config.mySecretID);
187
+ console.log(sos.config.imgUrl);
188
+ ```
189
+ <div class="row d-flex align-content-stretch force-padding-20">
190
+ <div class="col-12 d-flex">
191
+ <a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="/knowledge-base/applet-custom-config-on-device">
192
+ <div>
193
+ <div class="wide-box__image d-flex align-items-center">
194
+ <i class="fas fa-hand-point-right svg-black"></i>
195
+ </div>
196
+ <div>
197
+ <h3 class="wide-box__title wide-box__title__small pl-85">Custom variables in Applet</h3>
198
+ <div class="wide-box__description">How to pass custom variables and cofiguration to your Applet</div>
199
+ </div>
200
+ </div>
201
+ </a>
202
+ </div>
203
+ </div>
204
+
205
+ ## Applet JS API version
206
+
207
+ Each feature has “Supported since” that states for the Applet JS API version. The Applet JS API component is called Front-Applet and its version can be selected under the Applet editor.
208
+
209
+ ## Capabilities
210
+
211
+ Even tough we do our best to support as many features as possible on every platform, it's not possible to use certain features on certain platforms.
212
+ That's why we also provide a capabilities API that allows you to check, if the particular device supports a feature before you try to use it.
213
+ It's recommended that you always include capability checks in your code to prevent unexpected behavior or errors in your application.
214
+
215
+ There are two kinds of capabilities - display and management.
216
+
217
+ ### Display capabilities
218
+
219
+ Display capabilities refer to the capabilities of the display in terms of content, playback, peripherals, etc.
220
+
221
+ ::: table-responsive
222
+ | Capability | Description |
223
+ | ------------------------------ | ----------------------------------------------------------------------------------------- |
224
+ | `FILE_SYSTEM_EXTERNAL_STORAGE` | Device file system supports [external storage](/api/js/content/js-file-system) (i.e. flash drives) |
225
+ | `FILE_SYSTEM_FILE_CHECKSUM` | Device is can [calculate a file checksum](/api/js/content/js-file-system#getfilechecksum) |
226
+ | `VIDEO_4K` | Device is capable of [playing 4K video](/api/js/content/js-video) |
227
+ | `SERIAL` | Device supports communication with peripherals over [serial](/api/js/content/js-hardware-serial) |
228
+ :::
229
+
230
+ #### Javascript example:
231
+
232
+ ```javascript
233
+ if (await sos.display.supports('VIDEO_4K')) {
234
+ // play 4K video
235
+ }
236
+ ```
237
+
238
+ <div class="row d-flex align-content-stretch force-padding-20">
239
+ <div class="col-12 d-flex">
240
+ <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/capabilities-content">
241
+ <div>
242
+ <div class="wide-box__image d-flex align-items-center">
243
+ <i class="fab fa-github svg-black"></i>
244
+ </div>
245
+ <div>
246
+ <h3 class="wide-box__title wide-box__title__small pl-85">Example of Content Capabilities</h3>
247
+ <div class="wide-box__description">Working example on our Github</div>
248
+ </div>
249
+ </div>
250
+ </a>
251
+ </div>
252
+ </div>
253
+
254
+
255
+ ### Management capabilities
256
+
257
+ Management capabilities refer to the capabilities of the display's internal state management.
258
+
259
+ ::: table-responsive
260
+ | Capability | Description |
261
+ | ------------------------------ | ----------------------------------------------------------------------------------------- |
262
+ | `BATTERY_STATUS` | Device can [report its battery status](/api/js/management/1-js-management#getbatterystatus). |
263
+ | `WIFI` | Device can [connect to a Wi-Fi](/api/js/management/13-js-management-wifi#connect). |
264
+ | `WIFI_SCAN` | Device can [scan surrounding Wi-Fi devices](/api/js/management/13-js-management-wifi#scandevices). |
265
+ | `WIFI_AP` | Device is capable of [becoming a Wi-Fi endpoint](/api/js/management/13-js-management-wifi#enableap) that other devices can connect to. |
266
+ | `SET_BRIGHTNESS` | Device can change its [screen brightness](/api/js/management/5-js-management-screen#setbrightness). |
267
+ | `SET_TIME` | Device can change its [time settings](/api/js/management/6-js-management-time). |
268
+ | `NTP_TIME` | Device can [synchronize its time with an NTP server](/api/js/management/6-js-management-time#setntp). |
269
+ | `PACKAGE_INSTALL` | It's possible to [install additional packages](/api/js/management/8-js-management-package) on the device, managed by signageOS application. |
270
+ | `SET_VOLUME` | Device can change its [audio volume](/api/js/management/7-js-management-volume). |
271
+ | `SET_REMOTE_CONTROL_ENABLED` | Device can [disable control via IR remote](/api/js/management/3-js-management-remote-control) to increase security. |
272
+ :::
273
+
274
+ ```javascript
275
+ if (await sos.management.supports('WIFI')) {
276
+ // connect to wifi
277
+ }
278
+ ```
279
+
280
+ <div class="row d-flex align-content-stretch force-padding-20">
281
+ <div class="col-12 d-flex">
282
+ <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/management-js-api/capabilities-management">
283
+ <div>
284
+ <div class="wide-box__image d-flex align-items-center">
285
+ <i class="fab fa-github svg-black"></i>
286
+ </div>
287
+ <div>
288
+ <h3 class="wide-box__title wide-box__title__small pl-85">Example of Management Capabilities</h3>
289
+ <div class="wide-box__description">Working example on our Github</div>
290
+ </div>
291
+ </div>
292
+ </a>
293
+ </div>
294
+ </div>
@@ -0,0 +1,172 @@
1
+ ---
2
+ title: Applet Resources
3
+ author: Miroslav Behina
4
+ date: 22.11.2018
5
+ type: js-api
6
+ tags:
7
+ - applet
8
+ - applet_api
9
+ - api
10
+ - js_api
11
+ description: "[Content JS API] Often there are some JavaScripts and CSS styles necessary to be loaded for your Applet. It can be libraries like jQuery or even your whole application code. For these necessities offline API for saving, storing & loading files are ready."
12
+ ---
13
+
14
+ # Applet Resources
15
+
16
+ Often there are some JavaScripts and CSS styles necessary to be loaded for your Applet.
17
+ It can be libraries like jQuery or even your whole application code. For these necessities offline API for saving, storing & loading files are ready.
18
+
19
+
20
+ ## All methods
21
+ ::: table-responsive
22
+ | Methods | Description | Supported since |
23
+ | ------- | ----------- | ------ | :---------------: |
24
+ | `addFile()` | Add single file to Applet before starting it. | 1.0.0 |
25
+ | `addFiles()` | Add files to Applet before starting it. | 1.0.0 |
26
+ | `addFilesSync()` | Add files to Applet before starting it in the set order to prevent race condition. | 1.0.0 |
27
+ :::
28
+
29
+ ### File object
30
+ Every method above, accept single object or array of objects depending by type. Every object **must have** these keys.
31
+
32
+ ::: table-responsive
33
+ | Key | Type | Required | Description |
34
+ | :-----: | :-----: | :----: | ------- |
35
+ | `uri` | String | <div class="red">Yes</div> | URL of file |
36
+ | `uid` | String | <div class="red">Yes</div> | Unique ID in Applet for future manage |
37
+ | `type` | String | <div class="red">Yes</div> | Type of file. Example: `sos.offline.types.javascript`, `sos.offline.types.css`, `sos.offline.types.video` |
38
+ |||| ^^ |
39
+ | `flags` | Array | <div class="red">Yes</div> | Special flag for file |
40
+ | `headers` | Array | <div class="yellow">No</div> | Authorization headers |
41
+ :::
42
+
43
+ ::: alert alert--info
44
+ * The file URL must point to a file. If your URI leads to a 303 redirect (e.g. from http to http**s**), the API will not work.
45
+ * There are some limitations for [Emulator](knowledge-base/box-emulator-limitations).
46
+ :::
47
+
48
+ ## addFile()
49
+ Method `addFile()` will allow you to load single resource into applet. If you want to load more resource, use `addFiles()`.
50
+
51
+ ### Javascript Example
52
+ ```javascript
53
+ const file = { // File that will be loaded into an applet
54
+ "uri": "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js",
55
+ "uid": "jquery-2.2.4.min.js",
56
+ "type": sos.offline.types.javascript,
57
+ "flags": [sos.offline.flags.append(document.body)]
58
+ }
59
+
60
+ await sos.offline.addFile(file); // And finally load file
61
+ ```
62
+
63
+ ## addFiles()
64
+ Method `addFiles()` will allow you to load array of your resources into Applet. Files are load in random order.
65
+
66
+ ### Javascript Example
67
+ ```javascript
68
+ const files = [ // Array of files
69
+ {
70
+ "uri": "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js",
71
+ "uid": "jquery-2.2.4.min.js",
72
+ "type": sos.offline.types.javascript,
73
+ "flags": [sos.offline.flags.append(document.body)]
74
+ },
75
+ {
76
+ "uri": "https://signageostest.blob.core.windows.net/test/applet-examples/benchmark-styles.css?v=1.0.0",
77
+ "uid": "benchmark-styles.css-v1.0.0",
78
+ "type": sos.offline.types.css,
79
+ "headers": { "Authorization": "Basic Zm9vOmJhcg==" },
80
+ "flags": [sos.offline.flags.append(document.head)]
81
+ }
82
+ ];
83
+
84
+ await sos.offline.addFiles(files);
85
+ ```
86
+
87
+ <div class="row d-flex align-content-stretch force-padding-20">
88
+ <div class="col-12 d-flex">
89
+ <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/offline-resources">
90
+ <div>
91
+ <div class="wide-box__image d-flex align-items-center">
92
+ <i class="fab fa-github svg-black"></i>
93
+ </div>
94
+ <div>
95
+ <h3 class="wide-box__title wide-box__title__small pl-85">Example of Applet that save files and load them in one file</h3>
96
+ <div class="wide-box__description">Working example on our Github</div>
97
+ </div>
98
+ </div>
99
+ </a>
100
+ </div>
101
+ </div>
102
+
103
+ ## addFilesSync()
104
+ Method `addFilesSync()` works same as method above, but all files are loaded in correct order. Otherwise, files are loaded in random order by file size.
105
+
106
+ ### Javascript example
107
+ ```javascript
108
+ const files = [
109
+ {
110
+ "uri": "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js",
111
+ "uid": "jquery-2.2.4.min.js",
112
+ "type": sos.offline.types.javascript,
113
+ "flags": [sos.offline.flags.append(document.body)]
114
+ },
115
+ {
116
+ "uri": "https://signageostest.blob.core.windows.net/test/applet-examples/benchmark-styles.css?v=1.0.0",
117
+ "uid": "benchmark-styles.css-v1.0.0",
118
+ "type": sos.offline.types.css,
119
+ "headers": { "Authorization": "Basic Zm9vOmJhcg==" },
120
+ "flags": [sos.offline.flags.append(document.head)]
121
+ }
122
+ ];
123
+
124
+ sos.offline.addFilesSync(files).then(() => {
125
+ console.log('Now you can use jQuery and CSS file');
126
+ jQuery('#do').something();
127
+ });
128
+ ```
129
+
130
+ ## Usage with Typescript
131
+ You can also use all these methods with [signageOS TypeScript](/knowledge-base/dev-tools-cli-typescript).
132
+
133
+ ```typescript
134
+ interface ISaveFile {
135
+ uid: string;
136
+ uri: string;
137
+ type: string;
138
+ headers?: { [key: string]: string };
139
+ flags?: IFlag[];
140
+ }
141
+
142
+ addFile(files: ISaveFile[]): Promise<void>;
143
+ addFiles(files: ISaveFile[]): Promise<void>;
144
+ addFilesSync(files: ISaveFile[]): Promise<void>;
145
+ ```
146
+
147
+ Flags that can be optionally passed to the file object are available in flags property.
148
+
149
+ ```typescript
150
+ interface IFlag {
151
+ type: 'append';
152
+ element: IElement;
153
+ }
154
+ ```
155
+
156
+ ## Errors
157
+ Although we are doing our best, following errors may occur when working with the Applet Resources.
158
+
159
+ ::: table-responsive
160
+ | Code | Type | Message |
161
+ | ---- | ---- | ------- |
162
+ | 40101 | AppletResourcesError | File needs to be object |
163
+ | 40102 | AppletResourcesError | File UID needs to be defined |
164
+ | 40103 | AppletResourcesError | File flags needs to be Array |
165
+ | 40104 | AppletResourcesError | File flag needs to be object |
166
+ | 40105 | AppletResourcesError | Already loading file: `FILE_NAME` |
167
+ |^^|^^| Your code has probably multiple occurrences of addFile/s methods. |
168
+ | 40106 | AppletResourcesError | Already existing file: `FILE_NAME` |
169
+ |^^|^^| File is already loaded or exists in Applet |
170
+ | 49901 | FileNotFoundError | File `FILE_ID` was not found |
171
+ |^^|^^| Applet can not get file. URL is invalid. |
172
+ :::