Commit Graph

25 Commits

Author SHA1 Message Date
Luke Bermingham a543a9d430
Merge pull request #193 from kass-kass/ui-export-updates
Added exports for UI configuration types
2023-04-13 11:48:49 +10:00
William Belcher 3a19ab15af
Update indentation to 4 spaces 2023-04-11 13:32:28 +10:00
William Belcher 63c21c73c9
Alter reconnection flow 2023-04-11 13:11:50 +10:00
k_a_s_s 4d9ff71d85 Added exports for UI configuration types 2023-04-07 16:00:12 +02:00
Matthew Cotton 0be5f5d04a Bump versions 2023-03-28 14:57:45 +11:00
k_a_s_s 045288bbb5
Added ability to optionally disable certain frontend elements (#161)
* 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>
2023-03-24 09:39:26 +10:00
Luke Bermingham 5c87ac546a Bump ui-library to 0.2.0 and force NPM publish 2023-03-21 16:40:17 +10:00
Luke Bermingham f6bdbcf442 Bump versions in package-lock.json for ui-library 2023-03-21 16:38:55 +10:00
Luke Bermingham 9ede4260a4
Bump lib-pixelstreamingfrontend-ui to 0.2.0 update dep versions
Signed-off-by: Luke Bermingham <1215582+lukehb@users.noreply.github.com>
2023-03-21 16:36:05 +10:00
dependabot[bot] 43813ab6a4
Bump webpack from 5.75.0 to 5.76.0 in /Frontend/ui-library
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 23:26:19 +00:00
Luke Bermingham a3feb7788f Bump peer dependency version and package-lock.json of ui-library to use library version 0.2.0 2023-03-08 14:54:09 +10:00
Luke Bermingham 09eff4809a
Make ui-library use library version 0.2.0
Signed-off-by: Luke Bermingham <1215582+lukehb@users.noreply.github.com>
2023-03-08 14:31:18 +10:00
Luke Bermingham 8f246b121d
Bump ui-library to 0.1.0
Signed-off-by: Luke Bermingham <1215582+lukehb@users.noreply.github.com>
2023-03-08 14:27:35 +10:00
hmuurine 95f2bef334
Enable/disable user input devices (#136)
* 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
2023-03-06 17:32:58 +10:00
hmuurine 73bc553055
Customize styles through UI API (#133)
* 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
2023-03-02 16:41:35 +10:00
Luke Bermingham a002575f57
Bump ui-library to 0.0.4
Signed-off-by: Luke Bermingham <1215582+lukehb@users.noreply.github.com>
2023-02-25 20:33:29 +10:00
Luke Bermingham 56a64b3f91 Exposed websocketController and webXRController to public API 2023-02-25 20:08:33 +10:00
Luke Bermingham 42da3d3b83 Update ui-library package.json description. 2023-02-23 10:46:57 +10:00
Luke Bermingham 070869086a Update package-lock and remove dep on lib from reference frontend as this is present through npm link 2023-02-23 10:42:51 +10:00
Luke Bermingham 236232e061 Bump ui-library to 0.0.3 2023-02-23 10:29:10 +10:00
hmuurine 6282965dab
Smaller bundle size (#117)
* 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
2023-02-23 09:53:01 +10:00
Luke Bermingham 38311c3bc2 Bump ui-library version number for patch to 0.0.2 2023-02-22 17:58:25 +10:00
Luke Bermingham c994d9f2f9 Bump package-lock.json library dep to 0.1.0 2023-02-22 17:57:20 +10:00
Luke Bermingham bcc7ac4abc Bump dep version of library 0.1.0 in ui-library 2023-02-22 17:54:22 +10:00
hmuurine 781667247f
Decouple UI from the frontend library (#110)
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>
2023-02-22 17:12:12 +10:00