@epicgames-ps/lib-pixelstreamingfrontend-ue5.5 0.1.4 → 0.3.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 (357) hide show
  1. package/.eslintrc.js +1 -1
  2. package/.prettierrc.json +1 -0
  3. package/dist/commonjs/AFK/AFKController.js +110 -0
  4. package/dist/commonjs/AFK/AFKController.js.map +1 -0
  5. package/dist/commonjs/Config/Config.js +560 -0
  6. package/dist/commonjs/Config/Config.js.map +1 -0
  7. package/dist/commonjs/Config/SettingBase.js +99 -0
  8. package/dist/commonjs/Config/SettingBase.js.map +1 -0
  9. package/dist/commonjs/Config/SettingFlag.js +50 -0
  10. package/dist/commonjs/Config/SettingFlag.js.map +1 -0
  11. package/dist/commonjs/Config/SettingNumber.js +84 -0
  12. package/dist/commonjs/Config/SettingNumber.js.map +1 -0
  13. package/dist/commonjs/Config/SettingOption.js +85 -0
  14. package/dist/commonjs/Config/SettingOption.js.map +1 -0
  15. package/dist/commonjs/Config/SettingText.js +43 -0
  16. package/dist/commonjs/Config/SettingText.js.map +1 -0
  17. package/dist/commonjs/DataChannel/DataChannelController.js +107 -0
  18. package/dist/commonjs/DataChannel/DataChannelController.js.map +1 -0
  19. package/dist/commonjs/DataChannel/DataChannelLatencyTestController.js +95 -0
  20. package/dist/commonjs/DataChannel/DataChannelLatencyTestController.js.map +1 -0
  21. package/dist/commonjs/DataChannel/DataChannelLatencyTestResults.js +19 -0
  22. package/dist/commonjs/DataChannel/DataChannelLatencyTestResults.js.map +1 -0
  23. package/dist/commonjs/DataChannel/DataChannelSender.js +44 -0
  24. package/dist/commonjs/DataChannel/DataChannelSender.js.map +1 -0
  25. package/dist/commonjs/DataChannel/InitialSettings.js +42 -0
  26. package/dist/commonjs/DataChannel/InitialSettings.js.map +1 -0
  27. package/dist/commonjs/DataChannel/LatencyTestResults.js +61 -0
  28. package/dist/commonjs/DataChannel/LatencyTestResults.js.map +1 -0
  29. package/dist/commonjs/FreezeFrame/FreezeFrame.js +94 -0
  30. package/dist/commonjs/FreezeFrame/FreezeFrame.js.map +1 -0
  31. package/dist/commonjs/FreezeFrame/FreezeFrameController.js +96 -0
  32. package/dist/commonjs/FreezeFrame/FreezeFrameController.js.map +1 -0
  33. package/dist/commonjs/Inputs/GamepadController.js +189 -0
  34. package/dist/commonjs/Inputs/GamepadController.js.map +1 -0
  35. package/dist/commonjs/Inputs/GamepadTypes.js +22 -0
  36. package/dist/commonjs/Inputs/GamepadTypes.js.map +1 -0
  37. package/dist/commonjs/Inputs/IInputController.js +3 -0
  38. package/dist/commonjs/Inputs/IInputController.js.map +1 -0
  39. package/dist/commonjs/Inputs/InputClassesFactory.js +97 -0
  40. package/dist/commonjs/Inputs/InputClassesFactory.js.map +1 -0
  41. package/dist/commonjs/Inputs/KeyCodes.js +113 -0
  42. package/dist/commonjs/Inputs/KeyCodes.js.map +1 -0
  43. package/dist/commonjs/Inputs/KeyboardController.js +138 -0
  44. package/dist/commonjs/Inputs/KeyboardController.js.map +1 -0
  45. package/dist/commonjs/Inputs/MouseButtons.js +29 -0
  46. package/dist/commonjs/Inputs/MouseButtons.js.map +1 -0
  47. package/dist/commonjs/Inputs/MouseController.js +98 -0
  48. package/dist/commonjs/Inputs/MouseController.js.map +1 -0
  49. package/dist/commonjs/Inputs/MouseControllerHovering.js +94 -0
  50. package/dist/commonjs/Inputs/MouseControllerHovering.js.map +1 -0
  51. package/dist/commonjs/Inputs/MouseControllerLocked.js +154 -0
  52. package/dist/commonjs/Inputs/MouseControllerLocked.js.map +1 -0
  53. package/dist/commonjs/Inputs/SpecialKeyCodes.js +20 -0
  54. package/dist/commonjs/Inputs/SpecialKeyCodes.js.map +1 -0
  55. package/dist/commonjs/Inputs/TouchController.js +124 -0
  56. package/dist/commonjs/Inputs/TouchController.js.map +1 -0
  57. package/dist/commonjs/Inputs/TouchControllerFake.js +92 -0
  58. package/dist/commonjs/Inputs/TouchControllerFake.js.map +1 -0
  59. package/dist/commonjs/Inputs/XRGamepadController.js +125 -0
  60. package/dist/commonjs/Inputs/XRGamepadController.js.map +1 -0
  61. package/dist/commonjs/PeerConnectionController/AggregatedStats.js +253 -0
  62. package/dist/commonjs/PeerConnectionController/AggregatedStats.js.map +1 -0
  63. package/dist/commonjs/PeerConnectionController/CandidatePairStats.js +11 -0
  64. package/dist/commonjs/PeerConnectionController/CandidatePairStats.js.map +1 -0
  65. package/dist/commonjs/PeerConnectionController/CandidateStat.js +11 -0
  66. package/dist/commonjs/PeerConnectionController/CandidateStat.js.map +1 -0
  67. package/dist/commonjs/PeerConnectionController/CodecStats.js +11 -0
  68. package/dist/commonjs/PeerConnectionController/CodecStats.js.map +1 -0
  69. package/dist/commonjs/PeerConnectionController/DataChannelStats.js +11 -0
  70. package/dist/commonjs/PeerConnectionController/DataChannelStats.js.map +1 -0
  71. package/dist/commonjs/PeerConnectionController/InboundRTPStats.js +23 -0
  72. package/dist/commonjs/PeerConnectionController/InboundRTPStats.js.map +1 -0
  73. package/dist/commonjs/PeerConnectionController/InboundTrackStats.js +11 -0
  74. package/dist/commonjs/PeerConnectionController/InboundTrackStats.js.map +1 -0
  75. package/dist/commonjs/PeerConnectionController/OutBoundRTPStats.js +17 -0
  76. package/dist/commonjs/PeerConnectionController/OutBoundRTPStats.js.map +1 -0
  77. package/dist/commonjs/PeerConnectionController/PeerConnectionController.js +585 -0
  78. package/dist/commonjs/PeerConnectionController/PeerConnectionController.js.map +1 -0
  79. package/dist/commonjs/PeerConnectionController/SessionStats.js +11 -0
  80. package/dist/commonjs/PeerConnectionController/SessionStats.js.map +1 -0
  81. package/dist/commonjs/PeerConnectionController/StreamStats.js +11 -0
  82. package/dist/commonjs/PeerConnectionController/StreamStats.js.map +1 -0
  83. package/dist/commonjs/PixelStreaming/PixelStreaming.js +608 -0
  84. package/dist/commonjs/PixelStreaming/PixelStreaming.js.map +1 -0
  85. package/dist/commonjs/UI/OnScreenKeyboard.js +83 -0
  86. package/dist/commonjs/UI/OnScreenKeyboard.js.map +1 -0
  87. package/dist/commonjs/UeInstanceMessage/ResponseController.js +39 -0
  88. package/dist/commonjs/UeInstanceMessage/ResponseController.js.map +1 -0
  89. package/dist/commonjs/UeInstanceMessage/SendMessageController.js +121 -0
  90. package/dist/commonjs/UeInstanceMessage/SendMessageController.js.map +1 -0
  91. package/dist/commonjs/UeInstanceMessage/StreamMessageController.js +211 -0
  92. package/dist/commonjs/UeInstanceMessage/StreamMessageController.js.map +1 -0
  93. package/dist/commonjs/UeInstanceMessage/ToStreamerMessagesController.js +50 -0
  94. package/dist/commonjs/UeInstanceMessage/ToStreamerMessagesController.js.map +1 -0
  95. package/dist/commonjs/Util/EventEmitter.js +387 -0
  96. package/dist/commonjs/Util/EventEmitter.js.map +1 -0
  97. package/dist/commonjs/Util/FileUtil.js +109 -0
  98. package/dist/commonjs/Util/FileUtil.js.map +1 -0
  99. package/dist/commonjs/Util/IURLSearchParams.js +26 -0
  100. package/dist/commonjs/Util/IURLSearchParams.js.map +1 -0
  101. package/dist/commonjs/Util/InputCoordTranslator.js +50 -0
  102. package/dist/commonjs/Util/InputCoordTranslator.js.map +1 -0
  103. package/dist/commonjs/Util/RTCUtils.js +41 -0
  104. package/dist/commonjs/Util/RTCUtils.js.map +1 -0
  105. package/dist/commonjs/VideoPlayer/StreamController.js +68 -0
  106. package/dist/commonjs/VideoPlayer/StreamController.js.map +1 -0
  107. package/dist/commonjs/VideoPlayer/VideoPlayer.js +178 -0
  108. package/dist/commonjs/VideoPlayer/VideoPlayer.js.map +1 -0
  109. package/dist/commonjs/WebRtcPlayer/WebRtcPlayerController.js +1224 -0
  110. package/dist/commonjs/WebRtcPlayer/WebRtcPlayerController.js.map +1 -0
  111. package/dist/commonjs/WebXR/WebXRController.js +361 -0
  112. package/dist/commonjs/WebXR/WebXRController.js.map +1 -0
  113. package/dist/commonjs/pixelstreamingfrontend.js +71 -0
  114. package/dist/commonjs/pixelstreamingfrontend.js.map +1 -0
  115. package/dist/esm/AFK/AFKController.js +106 -0
  116. package/dist/esm/AFK/AFKController.js.map +1 -0
  117. package/dist/esm/Config/Config.js +552 -0
  118. package/dist/esm/Config/Config.js.map +1 -0
  119. package/dist/esm/Config/SettingBase.js +95 -0
  120. package/dist/esm/Config/SettingBase.js.map +1 -0
  121. package/dist/esm/Config/SettingFlag.js +46 -0
  122. package/dist/esm/Config/SettingFlag.js.map +1 -0
  123. package/dist/esm/Config/SettingNumber.js +80 -0
  124. package/dist/esm/Config/SettingNumber.js.map +1 -0
  125. package/dist/esm/Config/SettingOption.js +81 -0
  126. package/dist/esm/Config/SettingOption.js.map +1 -0
  127. package/dist/esm/Config/SettingText.js +39 -0
  128. package/dist/esm/Config/SettingText.js.map +1 -0
  129. package/dist/esm/DataChannel/DataChannelController.js +103 -0
  130. package/dist/esm/DataChannel/DataChannelController.js.map +1 -0
  131. package/dist/esm/DataChannel/DataChannelLatencyTestController.js +91 -0
  132. package/dist/esm/DataChannel/DataChannelLatencyTestController.js.map +1 -0
  133. package/dist/esm/DataChannel/DataChannelLatencyTestResults.js +15 -0
  134. package/dist/esm/DataChannel/DataChannelLatencyTestResults.js.map +1 -0
  135. package/dist/esm/DataChannel/DataChannelSender.js +40 -0
  136. package/dist/esm/DataChannel/DataChannelSender.js.map +1 -0
  137. package/dist/esm/DataChannel/InitialSettings.js +35 -0
  138. package/dist/esm/DataChannel/InitialSettings.js.map +1 -0
  139. package/dist/esm/DataChannel/LatencyTestResults.js +57 -0
  140. package/dist/esm/DataChannel/LatencyTestResults.js.map +1 -0
  141. package/dist/esm/FreezeFrame/FreezeFrame.js +90 -0
  142. package/dist/esm/FreezeFrame/FreezeFrame.js.map +1 -0
  143. package/dist/esm/FreezeFrame/FreezeFrameController.js +92 -0
  144. package/dist/esm/FreezeFrame/FreezeFrameController.js.map +1 -0
  145. package/dist/esm/Inputs/GamepadController.js +185 -0
  146. package/dist/esm/Inputs/GamepadController.js.map +1 -0
  147. package/dist/esm/Inputs/GamepadTypes.js +18 -0
  148. package/dist/esm/Inputs/GamepadTypes.js.map +1 -0
  149. package/dist/esm/Inputs/IInputController.js +2 -0
  150. package/dist/esm/Inputs/IInputController.js.map +1 -0
  151. package/dist/esm/Inputs/InputClassesFactory.js +92 -0
  152. package/dist/esm/Inputs/InputClassesFactory.js.map +1 -0
  153. package/dist/esm/Inputs/KeyCodes.js +110 -0
  154. package/dist/esm/Inputs/KeyCodes.js.map +1 -0
  155. package/dist/esm/Inputs/KeyboardController.js +134 -0
  156. package/dist/esm/Inputs/KeyboardController.js.map +1 -0
  157. package/dist/esm/Inputs/MouseButtons.js +24 -0
  158. package/dist/esm/Inputs/MouseButtons.js.map +1 -0
  159. package/dist/esm/Inputs/MouseController.js +94 -0
  160. package/dist/esm/Inputs/MouseController.js.map +1 -0
  161. package/dist/esm/Inputs/MouseControllerHovering.js +90 -0
  162. package/dist/esm/Inputs/MouseControllerHovering.js.map +1 -0
  163. package/dist/esm/Inputs/MouseControllerLocked.js +150 -0
  164. package/dist/esm/Inputs/MouseControllerLocked.js.map +1 -0
  165. package/dist/esm/Inputs/SpecialKeyCodes.js +16 -0
  166. package/dist/esm/Inputs/SpecialKeyCodes.js.map +1 -0
  167. package/dist/esm/Inputs/TouchController.js +120 -0
  168. package/dist/esm/Inputs/TouchController.js.map +1 -0
  169. package/dist/esm/Inputs/TouchControllerFake.js +88 -0
  170. package/dist/esm/Inputs/TouchControllerFake.js.map +1 -0
  171. package/dist/esm/Inputs/XRGamepadController.js +121 -0
  172. package/dist/esm/Inputs/XRGamepadController.js.map +1 -0
  173. package/dist/esm/PeerConnectionController/AggregatedStats.js +249 -0
  174. package/dist/esm/PeerConnectionController/AggregatedStats.js.map +1 -0
  175. package/dist/esm/PeerConnectionController/CandidatePairStats.js +7 -0
  176. package/dist/esm/PeerConnectionController/CandidatePairStats.js.map +1 -0
  177. package/dist/esm/PeerConnectionController/CandidateStat.js +7 -0
  178. package/dist/esm/PeerConnectionController/CandidateStat.js.map +1 -0
  179. package/dist/esm/PeerConnectionController/CodecStats.js +7 -0
  180. package/dist/esm/PeerConnectionController/CodecStats.js.map +1 -0
  181. package/dist/esm/PeerConnectionController/DataChannelStats.js +7 -0
  182. package/dist/esm/PeerConnectionController/DataChannelStats.js.map +1 -0
  183. package/dist/esm/PeerConnectionController/InboundRTPStats.js +17 -0
  184. package/dist/esm/PeerConnectionController/InboundRTPStats.js.map +1 -0
  185. package/dist/esm/PeerConnectionController/InboundTrackStats.js +7 -0
  186. package/dist/esm/PeerConnectionController/InboundTrackStats.js.map +1 -0
  187. package/dist/esm/PeerConnectionController/OutBoundRTPStats.js +12 -0
  188. package/dist/esm/PeerConnectionController/OutBoundRTPStats.js.map +1 -0
  189. package/dist/esm/PeerConnectionController/PeerConnectionController.js +581 -0
  190. package/dist/esm/PeerConnectionController/PeerConnectionController.js.map +1 -0
  191. package/dist/esm/PeerConnectionController/SessionStats.js +7 -0
  192. package/dist/esm/PeerConnectionController/SessionStats.js.map +1 -0
  193. package/dist/esm/PeerConnectionController/StreamStats.js +7 -0
  194. package/dist/esm/PeerConnectionController/StreamStats.js.map +1 -0
  195. package/dist/esm/PixelStreaming/PixelStreaming.js +604 -0
  196. package/dist/esm/PixelStreaming/PixelStreaming.js.map +1 -0
  197. package/dist/esm/UI/OnScreenKeyboard.js +79 -0
  198. package/dist/esm/UI/OnScreenKeyboard.js.map +1 -0
  199. package/dist/esm/UeInstanceMessage/ResponseController.js +35 -0
  200. package/dist/esm/UeInstanceMessage/ResponseController.js.map +1 -0
  201. package/dist/esm/UeInstanceMessage/SendMessageController.js +117 -0
  202. package/dist/esm/UeInstanceMessage/SendMessageController.js.map +1 -0
  203. package/dist/esm/UeInstanceMessage/StreamMessageController.js +206 -0
  204. package/dist/esm/UeInstanceMessage/StreamMessageController.js.map +1 -0
  205. package/dist/esm/UeInstanceMessage/ToStreamerMessagesController.js +46 -0
  206. package/dist/esm/UeInstanceMessage/ToStreamerMessagesController.js.map +1 -0
  207. package/dist/esm/Util/EventEmitter.js +346 -0
  208. package/dist/esm/Util/EventEmitter.js.map +1 -0
  209. package/dist/esm/Util/FileUtil.js +104 -0
  210. package/dist/esm/Util/FileUtil.js.map +1 -0
  211. package/dist/esm/Util/IURLSearchParams.js +22 -0
  212. package/dist/esm/Util/IURLSearchParams.js.map +1 -0
  213. package/dist/esm/Util/InputCoordTranslator.js +46 -0
  214. package/dist/esm/Util/InputCoordTranslator.js.map +1 -0
  215. package/dist/esm/Util/RTCUtils.js +37 -0
  216. package/dist/esm/Util/RTCUtils.js.map +1 -0
  217. package/dist/esm/VideoPlayer/StreamController.js +64 -0
  218. package/dist/esm/VideoPlayer/StreamController.js.map +1 -0
  219. package/dist/esm/VideoPlayer/VideoPlayer.js +174 -0
  220. package/dist/esm/VideoPlayer/VideoPlayer.js.map +1 -0
  221. package/dist/esm/WebRtcPlayer/WebRtcPlayerController.js +1220 -0
  222. package/dist/esm/WebRtcPlayer/WebRtcPlayerController.js.map +1 -0
  223. package/dist/esm/WebXR/WebXRController.js +357 -0
  224. package/dist/esm/WebXR/WebXRController.js.map +1 -0
  225. package/dist/esm/pixelstreamingfrontend.js +25 -0
  226. package/dist/esm/pixelstreamingfrontend.js.map +1 -0
  227. package/{types → dist/types}/AFK/AFKController.d.ts +38 -39
  228. package/{types → dist/types}/Config/Config.d.ts +220 -219
  229. package/{types → dist/types}/Config/SettingBase.d.ts +43 -30
  230. package/{types → dist/types}/Config/SettingFlag.d.ts +24 -33
  231. package/{types → dist/types}/Config/SettingNumber.d.ts +41 -45
  232. package/{types → dist/types}/Config/SettingOption.d.ts +41 -43
  233. package/{types → dist/types}/Config/SettingText.d.ts +21 -29
  234. package/{types → dist/types}/DataChannel/DataChannelController.d.ts +59 -59
  235. package/{types → dist/types}/DataChannel/DataChannelLatencyTestController.d.ts +25 -26
  236. package/{types → dist/types}/DataChannel/DataChannelLatencyTestResults.d.ts +46 -46
  237. package/{types → dist/types}/DataChannel/DataChannelSender.d.ts +21 -21
  238. package/{types → dist/types}/DataChannel/InitialSettings.d.ts +44 -44
  239. package/{types → dist/types}/DataChannel/LatencyTestResults.d.ts +31 -31
  240. package/{types → dist/types}/FreezeFrame/FreezeFrame.d.ts +36 -36
  241. package/{types → dist/types}/FreezeFrame/FreezeFrameController.d.ts +37 -37
  242. package/dist/types/Inputs/GamepadController.d.ts +61 -0
  243. package/dist/types/Inputs/GamepadTypes.d.ts +15 -0
  244. package/dist/types/Inputs/IInputController.d.ts +16 -0
  245. package/{types → dist/types}/Inputs/InputClassesFactory.d.ts +53 -54
  246. package/dist/types/Inputs/KeyCodes.d.ts +5 -0
  247. package/dist/types/Inputs/KeyboardController.d.ts +34 -0
  248. package/{types → dist/types}/Inputs/MouseButtons.d.ts +22 -22
  249. package/dist/types/Inputs/MouseController.d.ts +40 -0
  250. package/dist/types/Inputs/MouseControllerHovering.d.ts +26 -0
  251. package/dist/types/Inputs/MouseControllerLocked.d.ts +31 -0
  252. package/{types → dist/types}/Inputs/SpecialKeyCodes.d.ts +14 -14
  253. package/dist/types/Inputs/TouchController.d.ts +28 -0
  254. package/dist/types/Inputs/TouchControllerFake.d.ts +29 -0
  255. package/{types → dist/types}/Inputs/XRGamepadController.d.ts +15 -22
  256. package/{types → dist/types}/PeerConnectionController/AggregatedStats.d.ts +82 -84
  257. package/{types → dist/types}/PeerConnectionController/CandidatePairStats.d.ts +22 -22
  258. package/{types → dist/types}/PeerConnectionController/CandidateStat.d.ts +13 -13
  259. package/{types → dist/types}/PeerConnectionController/CodecStats.d.ts +14 -14
  260. package/{types → dist/types}/PeerConnectionController/DataChannelStats.d.ts +15 -15
  261. package/{types → dist/types}/PeerConnectionController/InboundRTPStats.d.ts +141 -141
  262. package/{types → dist/types}/PeerConnectionController/InboundTrackStats.d.ts +32 -32
  263. package/{types → dist/types}/PeerConnectionController/OutBoundRTPStats.d.ts +23 -23
  264. package/{types → dist/types}/PeerConnectionController/PeerConnectionController.d.ts +143 -140
  265. package/{types → dist/types}/PeerConnectionController/SessionStats.d.ts +8 -8
  266. package/{types → dist/types}/PeerConnectionController/StreamStats.d.ts +9 -9
  267. package/{types → dist/types}/PixelStreaming/PixelStreaming.d.ts +271 -259
  268. package/{types → dist/types}/UI/OnScreenKeyboard.d.ts +30 -30
  269. package/{types → dist/types}/UeInstanceMessage/ResponseController.d.ts +19 -19
  270. package/{types → dist/types}/UeInstanceMessage/SendMessageController.d.ts +18 -18
  271. package/{types → dist/types}/UeInstanceMessage/StreamMessageController.d.ts +29 -29
  272. package/{types → dist/types}/UeInstanceMessage/ToStreamerMessagesController.d.ts +32 -32
  273. package/{types → dist/types}/Util/EventEmitter.d.ts +429 -429
  274. package/{types → dist/types}/Util/FileUtil.d.ts +32 -32
  275. package/dist/types/Util/IURLSearchParams.d.ts +9 -0
  276. package/dist/types/Util/InputCoordTranslator.d.ts +29 -0
  277. package/{types → dist/types}/Util/RTCUtils.d.ts +8 -8
  278. package/{types → dist/types}/VideoPlayer/StreamController.d.ts +22 -24
  279. package/{types → dist/types}/VideoPlayer/VideoPlayer.d.ts +78 -78
  280. package/{types → dist/types}/WebRtcPlayer/WebRtcPlayerController.d.ts +379 -377
  281. package/{types → dist/types}/WebXR/WebXRController.d.ts +42 -42
  282. package/{types → dist/types}/pixelstreamingfrontend.d.ts +23 -22
  283. package/package.json +14 -17
  284. package/readme.md +9 -1
  285. package/src/AFK/AFKController.ts +10 -32
  286. package/src/Config/Config.ts +232 -205
  287. package/src/Config/SettingBase.ts +61 -2
  288. package/src/Config/SettingFlag.ts +10 -48
  289. package/src/Config/SettingNumber.ts +23 -33
  290. package/src/Config/SettingOption.ts +41 -56
  291. package/src/Config/SettingText.ts +9 -37
  292. package/src/DataChannel/DataChannelController.ts +6 -26
  293. package/src/DataChannel/DataChannelLatencyTestController.ts +43 -38
  294. package/src/DataChannel/DataChannelLatencyTestResults.ts +8 -10
  295. package/src/DataChannel/DataChannelSender.ts +5 -15
  296. package/src/DataChannel/LatencyTestResults.ts +5 -15
  297. package/src/FreezeFrame/FreezeFrame.ts +7 -19
  298. package/src/FreezeFrame/FreezeFrameController.ts +3 -14
  299. package/src/Inputs/GamepadController.ts +123 -221
  300. package/src/Inputs/GamepadTypes.ts +23 -0
  301. package/src/Inputs/IInputController.ts +17 -0
  302. package/src/Inputs/InputClassesFactory.ts +38 -45
  303. package/src/Inputs/KeyCodes.ts +114 -0
  304. package/src/Inputs/KeyboardController.ts +49 -232
  305. package/src/Inputs/MouseController.ts +71 -297
  306. package/src/Inputs/MouseControllerHovering.ts +118 -0
  307. package/src/Inputs/MouseControllerLocked.ts +194 -0
  308. package/src/Inputs/TouchController.ts +49 -105
  309. package/src/Inputs/TouchControllerFake.ts +132 -0
  310. package/src/Inputs/XRGamepadController.ts +35 -44
  311. package/src/PeerConnectionController/AggregatedStats.ts +46 -75
  312. package/src/PeerConnectionController/CandidatePairStats.ts +1 -1
  313. package/src/PeerConnectionController/CandidateStat.ts +1 -1
  314. package/src/PeerConnectionController/PeerConnectionController.ts +214 -170
  315. package/src/PixelStreaming/PixelStreaming.ts +174 -226
  316. package/src/UI/OnScreenKeyboard.ts +14 -9
  317. package/src/UeInstanceMessage/ResponseController.ts +6 -15
  318. package/src/UeInstanceMessage/SendMessageController.ts +16 -18
  319. package/src/UeInstanceMessage/StreamMessageController.ts +3 -12
  320. package/src/UeInstanceMessage/ToStreamerMessagesController.ts +3 -9
  321. package/src/Util/EventEmitter.ts +17 -22
  322. package/src/Util/FileUtil.ts +11 -34
  323. package/src/Util/IURLSearchParams.ts +25 -0
  324. package/src/Util/InputCoordTranslator.ts +73 -0
  325. package/src/Util/RTCUtils.ts +23 -15
  326. package/src/VideoPlayer/StreamController.ts +6 -23
  327. package/src/VideoPlayer/VideoPlayer.ts +9 -30
  328. package/src/WebRtcPlayer/WebRtcPlayerController.ts +328 -690
  329. package/src/WebXR/WebXRController.ts +82 -94
  330. package/src/pixelstreamingfrontend.ts +8 -6
  331. package/tsconfig.cjs.json +9 -0
  332. package/tsconfig.esm.json +7 -0
  333. package/tsconfig.json +4 -6
  334. package/dist/lib-pixelstreamingfrontend.esm.js +0 -1
  335. package/dist/lib-pixelstreamingfrontend.js +0 -1
  336. package/src/Inputs/FakeTouchController.ts +0 -199
  337. package/src/Inputs/HoveringMouseEvents.ts +0 -192
  338. package/src/Inputs/IMouseEvents.ts +0 -64
  339. package/src/Inputs/ITouchController.ts +0 -29
  340. package/src/Inputs/LockedMouseEvents.ts +0 -287
  341. package/src/Util/CoordinateConverter.ts +0 -290
  342. package/src/Util/EventListenerTracker.ts +0 -29
  343. package/types/Inputs/FakeTouchController.d.ts +0 -61
  344. package/types/Inputs/GamepadController.d.ts +0 -85
  345. package/types/Inputs/GamepadTypes.d.ts +0 -8
  346. package/types/Inputs/HoveringMouseEvents.d.ts +0 -56
  347. package/types/Inputs/IMouseEvents.d.ts +0 -53
  348. package/types/Inputs/ITouchController.d.ts +0 -24
  349. package/types/Inputs/KeyboardController.d.ts +0 -62
  350. package/types/Inputs/LockedMouseEvents.d.ts +0 -80
  351. package/types/Inputs/MouseController.d.ts +0 -75
  352. package/types/Inputs/TouchController.d.ts +0 -53
  353. package/types/Util/CoordinateConverter.d.ts +0 -100
  354. package/types/Util/EventListenerTracker.d.ts +0 -14
  355. package/webpack.common.js +0 -35
  356. package/webpack.dev.js +0 -35
  357. package/webpack.prod.js +0 -36
@@ -1,219 +1,220 @@
1
- import { SettingFlag } from './SettingFlag';
2
- import { SettingNumber } from './SettingNumber';
3
- import { SettingText } from './SettingText';
4
- import { SettingOption } from './SettingOption';
5
- import { EventEmitter } from '../Util/EventEmitter';
6
- /**
7
- * A collection of flags that can be toggled and are core to all Pixel Streaming experiences.
8
- * These are used in the `Config.Flags` map.
9
- */
10
- export declare class Flags {
11
- static AutoConnect: "AutoConnect";
12
- static AutoPlayVideo: "AutoPlayVideo";
13
- static AFKDetection: "TimeoutIfIdle";
14
- static BrowserSendOffer: "OfferToReceive";
15
- static HoveringMouseMode: "HoveringMouse";
16
- static ForceMonoAudio: "ForceMonoAudio";
17
- static ForceTURN: "ForceTURN";
18
- static FakeMouseWithTouches: "FakeMouseWithTouches";
19
- static IsQualityController: "ControlsQuality";
20
- static MatchViewportResolution: "MatchViewportRes";
21
- static StartVideoMuted: "StartVideoMuted";
22
- static SuppressBrowserKeys: "SuppressBrowserKeys";
23
- static UseMic: "UseMic";
24
- static KeyboardInput: "KeyboardInput";
25
- static MouseInput: "MouseInput";
26
- static TouchInput: "TouchInput";
27
- static GamepadInput: "GamepadInput";
28
- static XRControllerInput: "XRControllerInput";
29
- static WaitForStreamer: "WaitForStreamer";
30
- static HideUI: "HideUI";
31
- }
32
- export type FlagsKeys = Exclude<keyof typeof Flags, 'prototype'>;
33
- export type FlagsIds = typeof Flags[FlagsKeys];
34
- /**
35
- * A collection of numeric parameters that are core to all Pixel Streaming experiences.
36
- *
37
- */
38
- export declare class NumericParameters {
39
- static AFKTimeoutSecs: "AFKTimeout";
40
- static MinQP: "MinQP";
41
- static MaxQP: "MaxQP";
42
- static WebRTCFPS: "WebRTCFPS";
43
- static WebRTCMinBitrate: "WebRTCMinBitrate";
44
- static WebRTCMaxBitrate: "WebRTCMaxBitrate";
45
- static MaxReconnectAttempts: "MaxReconnectAttempts";
46
- static StreamerAutoJoinInterval: "StreamerAutoJoinInterval";
47
- }
48
- export type NumericParametersKeys = Exclude<keyof typeof NumericParameters, 'prototype'>;
49
- export type NumericParametersIds = typeof NumericParameters[NumericParametersKeys];
50
- /**
51
- * A collection of textual parameters that are core to all Pixel Streaming experiences.
52
- *
53
- */
54
- export declare class TextParameters {
55
- static SignallingServerUrl: "ss";
56
- }
57
- export type TextParametersKeys = Exclude<keyof typeof TextParameters, 'prototype'>;
58
- export type TextParametersIds = typeof TextParameters[TextParametersKeys];
59
- /**
60
- * A collection of enum based parameters that are core to all Pixel Streaming experiences.
61
- *
62
- */
63
- export declare class OptionParameters {
64
- static PreferredCodec: "PreferredCodec";
65
- static StreamerId: "StreamerId";
66
- }
67
- export type OptionParametersKeys = Exclude<keyof typeof OptionParameters, 'prototype'>;
68
- export type OptionParametersIds = typeof OptionParameters[OptionParametersKeys];
69
- /**
70
- * Utility types for inferring data type based on setting ID
71
- */
72
- export type OptionIds = FlagsIds | NumericParametersIds | TextParametersIds | OptionParametersIds;
73
- export type OptionKeys<T> = T extends FlagsIds ? boolean : T extends NumericParametersIds ? number : T extends TextParametersIds ? string : T extends OptionParametersIds ? string : never;
74
- export type AllSettings = {
75
- [K in OptionIds]: OptionKeys<K>;
76
- };
77
- export interface ConfigParams {
78
- /** Initial Pixel Streaming settings */
79
- initialSettings?: Partial<AllSettings>;
80
- /** If useUrlParams is set true, will read initial values from URL parameters and persist changed settings into URL */
81
- useUrlParams?: boolean;
82
- }
83
- export declare class Config {
84
- private flags;
85
- private numericParameters;
86
- private textParameters;
87
- private optionParameters;
88
- private _useUrlParams;
89
- constructor(config?: ConfigParams);
90
- /**
91
- * True if reading configuration initial values from URL parameters, and
92
- * persisting changes in URL when changed.
93
- */
94
- get useUrlParams(): boolean;
95
- /**
96
- * Populate the default settings for a Pixel Streaming application
97
- */
98
- private populateDefaultSettings;
99
- /**
100
- * Add a callback to fire when the numeric setting is toggled.
101
- * @param id The id of the flag.
102
- * @param onChangedListener The callback to fire when the numeric value changes.
103
- */
104
- _addOnNumericSettingChangedListener(id: NumericParametersIds, onChangedListener: (newValue: number) => void): void;
105
- _addOnOptionSettingChangedListener(id: OptionParametersIds, onChangedListener: (newValue: string) => void): void;
106
- /**
107
- * @param id The id of the numeric setting we are interested in getting a value for.
108
- * @returns The numeric value stored in the parameter with the passed id.
109
- */
110
- getNumericSettingValue(id: NumericParametersIds): number;
111
- /**
112
- * @param id The id of the text setting we are interested in getting a value for.
113
- * @returns The text value stored in the parameter with the passed id.
114
- */
115
- getTextSettingValue(id: TextParametersIds): string;
116
- /**
117
- * Set number in the setting.
118
- * @param id The id of the numeric setting we are interested in.
119
- * @param value The numeric value to set.
120
- */
121
- setNumericSetting(id: NumericParametersIds, value: number): void;
122
- /**
123
- * Add a callback to fire when the flag is toggled.
124
- * @param id The id of the flag.
125
- * @param onChangeListener The callback to fire when the value changes.
126
- */
127
- _addOnSettingChangedListener(id: FlagsIds, onChangeListener: (newFlagValue: boolean) => void): void;
128
- /**
129
- * Add a callback to fire when the text is changed.
130
- * @param id The id of the flag.
131
- * @param onChangeListener The callback to fire when the value changes.
132
- */
133
- _addOnTextSettingChangedListener(id: TextParametersIds, onChangeListener: (newTextValue: string) => void): void;
134
- /**
135
- * Get the option which has the given id.
136
- * @param id The id of the option.
137
- * @returns The SettingOption object matching id
138
- */
139
- getSettingOption(id: OptionParametersIds): SettingOption;
140
- /**
141
- * Get the value of the configuration flag which has the given id.
142
- * @param id The unique id for the flag.
143
- * @returns True if the flag is enabled.
144
- */
145
- isFlagEnabled(id: FlagsIds): boolean;
146
- /**
147
- * Set flag to be enabled/disabled.
148
- * @param id The id of the flag to toggle.
149
- * @param flagEnabled True if the flag should be enabled.
150
- */
151
- setFlagEnabled(id: FlagsIds, flagEnabled: boolean): void;
152
- /**
153
- * Set the text setting.
154
- * @param id The id of the setting
155
- * @param settingValue The value to set in the setting.
156
- */
157
- setTextSetting(id: TextParametersIds, settingValue: string): void;
158
- /**
159
- * Set the option setting list of options.
160
- * @param id The id of the setting
161
- * @param settingOptions The values the setting could take
162
- */
163
- setOptionSettingOptions(id: OptionParametersIds, settingOptions: Array<string>): void;
164
- /**
165
- * Set option enum settings selected option.
166
- * @param id The id of the setting
167
- * @param settingOptions The value to select out of all the options
168
- */
169
- setOptionSettingValue(id: OptionParametersIds, settingValue: string): void;
170
- /**
171
- * Set the label for the flag.
172
- * @param id The id of the flag.
173
- * @param label The new label to use for the flag.
174
- */
175
- setFlagLabel(id: FlagsIds, label: string): void;
176
- /**
177
- * Set a subset of all settings in one function call.
178
- *
179
- * @param settings A (partial) list of settings to set
180
- */
181
- setSettings(settings: Partial<AllSettings>): void;
182
- /**
183
- * Get all settings
184
- * @returns All setting values as an object with setting ids as keys
185
- */
186
- getSettings(): Partial<AllSettings>;
187
- /**
188
- * Get all Flag settings as an array.
189
- * @returns All SettingFlag objects
190
- */
191
- getFlags(): Array<SettingFlag>;
192
- /**
193
- * Get all Text settings as an array.
194
- * @returns All SettingText objects
195
- */
196
- getTextSettings(): Array<SettingText>;
197
- /**
198
- * Get all Number settings as an array.
199
- * @returns All SettingNumber objects
200
- */
201
- getNumericSettings(): Array<SettingNumber>;
202
- /**
203
- * Get all Option settings as an array.
204
- * @returns All SettingOption objects
205
- */
206
- getOptionSettings(): Array<SettingOption>;
207
- /**
208
- * Emit events when settings change.
209
- * @param eventEmitter
210
- */
211
- _registerOnChangeEvents(eventEmitter: EventEmitter): void;
212
- }
213
- /**
214
- * The enum associated with the mouse being locked or hovering
215
- */
216
- export declare enum ControlSchemeType {
217
- LockedMouse = 0,
218
- HoveringMouse = 1
219
- }
1
+ import { SettingFlag } from './SettingFlag';
2
+ import { SettingNumber } from './SettingNumber';
3
+ import { SettingText } from './SettingText';
4
+ import { SettingOption } from './SettingOption';
5
+ import { EventEmitter } from '../Util/EventEmitter';
6
+ /**
7
+ * A collection of flags that can be toggled and are core to all Pixel Streaming experiences.
8
+ * These are used in the `Config.Flags` map.
9
+ */
10
+ export declare class Flags {
11
+ static AutoConnect: "AutoConnect";
12
+ static AutoPlayVideo: "AutoPlayVideo";
13
+ static AFKDetection: "TimeoutIfIdle";
14
+ static HoveringMouseMode: "HoveringMouse";
15
+ static ForceMonoAudio: "ForceMonoAudio";
16
+ static ForceTURN: "ForceTURN";
17
+ static FakeMouseWithTouches: "FakeMouseWithTouches";
18
+ static IsQualityController: "ControlsQuality";
19
+ static MatchViewportResolution: "MatchViewportRes";
20
+ static StartVideoMuted: "StartVideoMuted";
21
+ static SuppressBrowserKeys: "SuppressBrowserKeys";
22
+ static UseMic: "UseMic";
23
+ static UseCamera: "UseCamera";
24
+ static KeyboardInput: "KeyboardInput";
25
+ static MouseInput: "MouseInput";
26
+ static TouchInput: "TouchInput";
27
+ static GamepadInput: "GamepadInput";
28
+ static XRControllerInput: "XRControllerInput";
29
+ static WaitForStreamer: "WaitForStreamer";
30
+ static HideUI: "HideUI";
31
+ }
32
+ export type FlagsKeys = Exclude<keyof typeof Flags, 'prototype'>;
33
+ export type FlagsIds = (typeof Flags)[FlagsKeys];
34
+ /**
35
+ * A collection of numeric parameters that are core to all Pixel Streaming experiences.
36
+ *
37
+ */
38
+ export declare class NumericParameters {
39
+ static AFKTimeoutSecs: "AFKTimeout";
40
+ static AFKCountdownSecs: "AFKCountdown";
41
+ static MinQP: "MinQP";
42
+ static MaxQP: "MaxQP";
43
+ static WebRTCFPS: "WebRTCFPS";
44
+ static WebRTCMinBitrate: "WebRTCMinBitrate";
45
+ static WebRTCMaxBitrate: "WebRTCMaxBitrate";
46
+ static MaxReconnectAttempts: "MaxReconnectAttempts";
47
+ static StreamerAutoJoinInterval: "StreamerAutoJoinInterval";
48
+ }
49
+ export type NumericParametersKeys = Exclude<keyof typeof NumericParameters, 'prototype'>;
50
+ export type NumericParametersIds = (typeof NumericParameters)[NumericParametersKeys];
51
+ /**
52
+ * A collection of textual parameters that are core to all Pixel Streaming experiences.
53
+ *
54
+ */
55
+ export declare class TextParameters {
56
+ static SignallingServerUrl: "ss";
57
+ }
58
+ export type TextParametersKeys = Exclude<keyof typeof TextParameters, 'prototype'>;
59
+ export type TextParametersIds = (typeof TextParameters)[TextParametersKeys];
60
+ /**
61
+ * A collection of enum based parameters that are core to all Pixel Streaming experiences.
62
+ *
63
+ */
64
+ export declare class OptionParameters {
65
+ static PreferredCodec: "PreferredCodec";
66
+ static StreamerId: "StreamerId";
67
+ }
68
+ export type OptionParametersKeys = Exclude<keyof typeof OptionParameters, 'prototype'>;
69
+ export type OptionParametersIds = (typeof OptionParameters)[OptionParametersKeys];
70
+ /**
71
+ * Utility types for inferring data type based on setting ID
72
+ */
73
+ export type OptionIds = FlagsIds | NumericParametersIds | TextParametersIds | OptionParametersIds;
74
+ export type OptionKeys<T> = T extends FlagsIds ? boolean : T extends NumericParametersIds ? number : T extends TextParametersIds ? string : T extends OptionParametersIds ? string : never;
75
+ export type AllSettings = {
76
+ [K in OptionIds]: OptionKeys<K>;
77
+ };
78
+ export interface ConfigParams {
79
+ /** Initial Pixel Streaming settings */
80
+ initialSettings?: Partial<AllSettings>;
81
+ /** If useUrlParams is set true, will read initial values from URL parameters and persist changed settings into URL */
82
+ useUrlParams?: boolean;
83
+ }
84
+ export declare class Config {
85
+ private flags;
86
+ private numericParameters;
87
+ private textParameters;
88
+ private optionParameters;
89
+ private _useUrlParams;
90
+ constructor(config?: ConfigParams);
91
+ /**
92
+ * True if reading configuration initial values from URL parameters, and
93
+ * persisting changes in URL when changed.
94
+ */
95
+ get useUrlParams(): boolean;
96
+ /**
97
+ * Populate the default settings for a Pixel Streaming application
98
+ */
99
+ private populateDefaultSettings;
100
+ /**
101
+ * Add a callback to fire when the numeric setting is toggled.
102
+ * @param id The id of the flag.
103
+ * @param onChangedListener The callback to fire when the numeric value changes.
104
+ */
105
+ _addOnNumericSettingChangedListener(id: NumericParametersIds, onChangedListener: (newValue: number) => void): void;
106
+ _addOnOptionSettingChangedListener(id: OptionParametersIds, onChangedListener: (newValue: string) => void): void;
107
+ /**
108
+ * @param id The id of the numeric setting we are interested in getting a value for.
109
+ * @returns The numeric value stored in the parameter with the passed id.
110
+ */
111
+ getNumericSettingValue(id: NumericParametersIds): number;
112
+ /**
113
+ * @param id The id of the text setting we are interested in getting a value for.
114
+ * @returns The text value stored in the parameter with the passed id.
115
+ */
116
+ getTextSettingValue(id: TextParametersIds): string;
117
+ /**
118
+ * Set number in the setting.
119
+ * @param id The id of the numeric setting we are interested in.
120
+ * @param value The numeric value to set.
121
+ */
122
+ setNumericSetting(id: NumericParametersIds, value: number): void;
123
+ /**
124
+ * Add a callback to fire when the flag is toggled.
125
+ * @param id The id of the flag.
126
+ * @param onChangeListener The callback to fire when the value changes.
127
+ */
128
+ _addOnSettingChangedListener(id: FlagsIds, onChangeListener: (newFlagValue: boolean) => void): void;
129
+ /**
130
+ * Add a callback to fire when the text is changed.
131
+ * @param id The id of the flag.
132
+ * @param onChangeListener The callback to fire when the value changes.
133
+ */
134
+ _addOnTextSettingChangedListener(id: TextParametersIds, onChangeListener: (newTextValue: string) => void): void;
135
+ /**
136
+ * Get the option which has the given id.
137
+ * @param id The id of the option.
138
+ * @returns The SettingOption object matching id
139
+ */
140
+ getSettingOption(id: OptionParametersIds): SettingOption;
141
+ /**
142
+ * Get the value of the configuration flag which has the given id.
143
+ * @param id The unique id for the flag.
144
+ * @returns True if the flag is enabled.
145
+ */
146
+ isFlagEnabled(id: FlagsIds): boolean;
147
+ /**
148
+ * Set flag to be enabled/disabled.
149
+ * @param id The id of the flag to toggle.
150
+ * @param flagEnabled True if the flag should be enabled.
151
+ */
152
+ setFlagEnabled(id: FlagsIds, flagEnabled: boolean): void;
153
+ /**
154
+ * Set the text setting.
155
+ * @param id The id of the setting
156
+ * @param settingValue The value to set in the setting.
157
+ */
158
+ setTextSetting(id: TextParametersIds, settingValue: string): void;
159
+ /**
160
+ * Set the option setting list of options.
161
+ * @param id The id of the setting
162
+ * @param settingOptions The values the setting could take
163
+ */
164
+ setOptionSettingOptions(id: OptionParametersIds, settingOptions: Array<string>): void;
165
+ /**
166
+ * Set option enum settings selected option.
167
+ * @param id The id of the setting
168
+ * @param settingOptions The value to select out of all the options
169
+ */
170
+ setOptionSettingValue(id: OptionParametersIds, settingValue: string): void;
171
+ /**
172
+ * Set the label for the flag.
173
+ * @param id The id of the flag.
174
+ * @param label The new label to use for the flag.
175
+ */
176
+ setFlagLabel(id: FlagsIds, label: string): void;
177
+ /**
178
+ * Set a subset of all settings in one function call.
179
+ *
180
+ * @param settings A (partial) list of settings to set
181
+ */
182
+ setSettings(settings: Partial<AllSettings>): void;
183
+ /**
184
+ * Get all settings
185
+ * @returns All setting values as an object with setting ids as keys
186
+ */
187
+ getSettings(): Partial<AllSettings>;
188
+ /**
189
+ * Get all Flag settings as an array.
190
+ * @returns All SettingFlag objects
191
+ */
192
+ getFlags(): Array<SettingFlag>;
193
+ /**
194
+ * Get all Text settings as an array.
195
+ * @returns All SettingText objects
196
+ */
197
+ getTextSettings(): Array<SettingText>;
198
+ /**
199
+ * Get all Number settings as an array.
200
+ * @returns All SettingNumber objects
201
+ */
202
+ getNumericSettings(): Array<SettingNumber>;
203
+ /**
204
+ * Get all Option settings as an array.
205
+ * @returns All SettingOption objects
206
+ */
207
+ getOptionSettings(): Array<SettingOption>;
208
+ /**
209
+ * Emit events when settings change.
210
+ * @param eventEmitter
211
+ */
212
+ _registerOnChangeEvents(eventEmitter: EventEmitter): void;
213
+ }
214
+ /**
215
+ * The enum associated with the mouse being locked or hovering
216
+ */
217
+ export declare enum ControlSchemeType {
218
+ LockedMouse = 0,
219
+ HoveringMouse = 1
220
+ }
@@ -1,30 +1,43 @@
1
- /**
2
- * Base class for a setting that has a text label and an arbitrary setting value it stores.
3
- */
4
- export declare class SettingBase {
5
- id: string;
6
- description: string;
7
- _label: string;
8
- _value: unknown;
9
- onChange: (changedValue: unknown, setting: SettingBase) => void;
10
- onChangeEmit: (changedValue: unknown) => void;
11
- constructor(id: string, label: string, description: string, defaultSettingValue: unknown, defaultOnChangeListener?: (changedValue: unknown, setting: SettingBase) => void);
12
- /**
13
- * Set the label text for the setting.
14
- * @param label setting label.
15
- */
16
- set label(inLabel: string);
17
- /**
18
- * @returns The label text for the setting.
19
- */
20
- get label(): string;
21
- /**
22
- * @return The setting's value.
23
- */
24
- get value(): unknown;
25
- /**
26
- * Update the setting's stored value.
27
- * @param inValue The new value for the setting.
28
- */
29
- set value(inValue: unknown);
30
- }
1
+ /**
2
+ * Base class for a setting that has a text label and an arbitrary setting value it stores.
3
+ */
4
+ export declare class SettingBase {
5
+ id: string;
6
+ description: string;
7
+ useUrlParams: boolean;
8
+ _urlParams: Record<string, string>;
9
+ _label: string;
10
+ _value: unknown;
11
+ onChange: (changedValue: unknown, setting: SettingBase) => void;
12
+ onChangeEmit: (changedValue: unknown) => void;
13
+ constructor(id: string, label: string, description: string, defaultSettingValue: unknown, defaultOnChangeListener?: (changedValue: unknown, setting: SettingBase) => void);
14
+ /**
15
+ * Set the label text for the setting.
16
+ * @param label setting label.
17
+ */
18
+ set label(inLabel: string);
19
+ /**
20
+ * @returns The label text for the setting.
21
+ */
22
+ get label(): string;
23
+ /**
24
+ * @return The setting's value.
25
+ */
26
+ get value(): unknown;
27
+ /**
28
+ * Update the setting's stored value.
29
+ * @param inValue The new value for the setting.
30
+ */
31
+ set value(inValue: unknown);
32
+ /**
33
+ * Persist the setting value in URL.
34
+ */
35
+ updateURLParams(): void;
36
+ /**
37
+ * Allows sub types to provide their value for the url search params.
38
+ */
39
+ protected getValueAsString(): string;
40
+ private parseURLParams;
41
+ protected hasURLParam(name: string): boolean;
42
+ protected getURLParam(name: string): string;
43
+ }
@@ -1,33 +1,24 @@
1
- import type { FlagsIds } from './Config';
2
- import { SettingBase } from './SettingBase';
3
- /**
4
- * A boolean flag setting object with a text label.
5
- */
6
- export declare class SettingFlag<CustomIds extends string = FlagsIds> extends SettingBase {
7
- id: FlagsIds | CustomIds;
8
- onChangeEmit: (changedValue: boolean) => void;
9
- useUrlParams: boolean;
10
- constructor(id: FlagsIds | CustomIds, label: string, description: string, defaultFlagValue: boolean, useUrlParams: boolean, defaultOnChangeListener?: (changedValue: unknown, setting: SettingBase) => void);
11
- /**
12
- * Parse the flag value from the url parameters.
13
- * @returns True if the url parameters contains /?id, but False if /?id=false
14
- */
15
- getUrlParamFlag(): boolean;
16
- /**
17
- * Persist the setting value in URL.
18
- */
19
- updateURLParams(): void;
20
- /**
21
- * Enables this flag.
22
- */
23
- enable(): void;
24
- /**
25
- * @return The setting's value.
26
- */
27
- get flag(): boolean;
28
- /**
29
- * Update the setting's stored value.
30
- * @param inValue The new value for the setting.
31
- */
32
- set flag(inValue: boolean);
33
- }
1
+ import type { FlagsIds } from './Config';
2
+ import { SettingBase } from './SettingBase';
3
+ /**
4
+ * A boolean flag setting object with a text label.
5
+ */
6
+ export declare class SettingFlag<CustomIds extends string = FlagsIds> extends SettingBase {
7
+ id: FlagsIds | CustomIds;
8
+ onChangeEmit: (changedValue: boolean) => void;
9
+ constructor(id: FlagsIds | CustomIds, label: string, description: string, defaultFlagValue: boolean, useUrlParams: boolean, defaultOnChangeListener?: (changedValue: unknown, setting: SettingBase) => void);
10
+ protected getValueAsString(): string;
11
+ /**
12
+ * Enables this flag.
13
+ */
14
+ enable(): void;
15
+ /**
16
+ * @return The setting's value.
17
+ */
18
+ get flag(): boolean;
19
+ /**
20
+ * Update the setting's stored value.
21
+ * @param inValue The new value for the setting.
22
+ */
23
+ set flag(inValue: boolean);
24
+ }