* Split FullScreenIcon into base/external/internal
* Added common types for UI (button/panel) config
* UI Controls can now be configured with input params
* Application config to allow disable buttons/panels
* Updated UI configuration types and functionality
* Updated frontend docs and readme
Signed-off-by: Luke Bermingham <1215582+lukehb@users.noreply.github.com>
---------
Signed-off-by: Luke Bermingham <1215582+lukehb@users.noreply.github.com>
Co-authored-by: Luke Bermingham <1215582+lukehb@users.noreply.github.com>
* move registerLockedMouseEvents and registerHoveringMouseEvents to MouseController
* add a utility that keeps track of registered event handlers for easy unregistering
* fix stream handler name MoveMouse -> MouseMove
* support unregistering gamepad events
* support unregistering keyboard events
* support unregistering mouse events
* support unregistering touch events
* unregister input event handlers before registering new ones
* configurable keyboard/mouse/touch/gamepad support
* start/stop game pad polling on config enable/disable
* UI: add user input config to Settings menu
* added config flag EnableXRControllerInput for enabling/disabling XR controller messages
* added the new config flags to documentation
* smaller version of the settings panel image to better match the old image resolution
* Simplify input flag naming. Separate input toggles into new section in the settings panel
* support customizing styles through UI API
* do not apply styles automatically in constructor
* do not apply styles automatically in constructor for stresstest
* move light/dark mode palette change code to PixelStreamingApplicationStyle
* Renamed updateColors / onUpdateColors -> setColorMode / onColorModeChanged
* Changed Github actions to first do `npm ci`, then `npm link`
* Modified package to not bundle library dependencies into library JS
* Added: webpack config to build both umd and esm versions of the frontend library
* Changed package run to first do `npm ci`, then `npm link` also for implementation, since now it has the libraries as dependencies
* Updated package-lock
* Switch the order of `npm link` commands because the order matters
This PR splits the Frontend/library code into two parts:
1) /library - that provides an API for establishing Pixel Streaming sessions
2) /ui-library - that contains all the UI components like settings overlay panel, connection strength indicator, buttons, etc.
The library code is intended to be used as a library through the Javascript/Typescript API, and it can be used programmatically without the default UI implemented in ui-library. This allows the developers to bring their own UI if they wish to customize the user experience, or even start a Pixel Streaming session without any overlay UI.
The wish is to keep the library API stable and try to not make breaking changes if possible. If new non-breaking features are introduced to the API, it would be great if it was reflected in the version numbering following semantic versioning. Breaking changes should increase the major version number, while non-breaking changes increase only the minor or patch version number.
* add jss dependencies to UI project
* move PixelStreamingApplicationStyles to the UI project
* remove jss dependencies from library project
* add pixel streaming lib as ui dependency
* renamed lib Application -> PixelStreaming
* expose AFK callbacks from API
* expose callbacks for overlays
* onDismissAfk function added
* fix possible NPE in statistics panel (Firefox only)
* build both library projects in setup.sh|.bat
* extracted overlays from PixelStreaming library to UI
* bind callbacks to have access to `this`
* emit onStatsReceived callback
* replaced on\* callbacks with a typed event emitter
* reuse types in on() and emit()
* fix web-xr on Firefox (no navigator.xr available)
* latency test API and callback events
* move stats panel to UI project
* move settings panel to UI project
* extract video quality indicator to UI project
* move buttons to UI project
* events for freezeFrame functionality
* import UI project in stresstest.ts
* move UI wrapper elements to UI project
* optional override for videoParentElement
* created uiless.html and uiless.ts, which together are a sample UI application with no overlay UI
* let -> const everywhere in sample applications
* used named imports everywhere, not import * as libfrontend
* document overrides
* added onOpen, onClose, onError handlers for data channels
* events for webRtc data channel open, close, error
* added missing javadocs for classes and functions
* renamed webRtcDisconnect -> webRtcDisconnected
* added disconnect function to the API
* use EventTarget to emit events
* emit streamerListMessage, move new streamer select overlay to UI side
* Emit config change events
* API for changing settings
* add getSettings() for symmetry
* set partial initial settings in Config constructor
* configure initial params in uiless.ts to auto start muted
* add missing type exports
* extracted config UI from the config components
* configurable parameter saving to URL
* save config params to URL only on demand
* removed console.log
* removed unused import
* Extract light/dark mode config out of Pixel Streaming library
* update labels for custom settings
* Build the new library in setup scripts
* added a fallback click-to-play handler into uiless.ts
* hide non-public attributes in Config
* make the public API more compact by hiding private attributes
* added documentation for the public functions
* underscored some methods in Config
* make useUrlParameters read-only
* underscore for Config event listeners: public API users use settingsChanged events
* underscore for Config event listeners
* fix imports: @epicgames-ps/lib-pixelstreamingfrontend-ue5.2, not -dev
* added a comment to request function API docs: expected to be changed later
* reorganized directory structure
* ui-library build now uses NPM dependency, build-all linked filesystem dependency
* added ui-library build to GH release
* added github workflow for ui-library publishing
* Link base library when building ui-library
* Bring dispatchEvent, addEventListener and removeEventListener to the top level PixelStreaming class, simplifying API usage
* Allow settings to take a default onChange listener. This listener has two params of the new value as well as the calling settings, allowing you to modify the underlying settings members in this callback
* Fix overlay to properly notify is none or multiple streamers are connected
* Make dark mode the default color scheme regardless of browser preference.
* Make numeric settings spinner width take us less space.
* Make SettingUIOption match styling width of numeric settings.
* renamed EpicGames build-all-dev -> build-dev-all to match other projects
* added Click to play overlay in uiless.html and show/hide it when needed
* revised documentation for Config/*.ts
* revised documentation in PixelStreaming.ts
* documented EventEmitter events and event parameters
* emit webRtcConnected event when connected
* Fix max bitrate not being set correctly.
* Update package-lock.json for ui-library
* Refactor sendEncoderSettings to instead be sendEncoderMinQP and sendEncoderMaxQP
* Bump version numbers of library NPM package to 0.1.0 and bump 5.2 release to 0.2.0 as all changes here a non-breaking as far as we have tested.
---------
Co-authored-by: William Belcher <william.belcher@xa.epicgames.com>
Co-authored-by: Luke Bermingham <1215582+lukehb@users.noreply.github.com>