Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Add new Common and signalling libs and rewrite Cirrus (now Wilbur) to use them #497

Merged
merged 64 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
ed37cc6
Initial setup of new cirrus
mcottontensor Jan 31, 2024
c0e6e17
Merge remote-tracking branch 'upstream/UE5.5' into new_cirrus
mcottontensor Feb 1, 2024
c2f0526
halfway through getting the MVP going.
mcottontensor Feb 2, 2024
2cbc1e8
First basic working
mcottontensor Feb 5, 2024
ab0ef56
Moving to IStreamer and IPlayer interfaces to support SFU connections
mcottontensor Feb 5, 2024
d5dc992
Working SFU implementation.
mcottontensor Feb 6, 2024
f73aa0b
Cleaning up some things. Added events that connections can listen to.
mcottontensor Feb 6, 2024
ab8aba6
Making some parts of the connections private
mcottontensor Feb 6, 2024
33fe802
Working on logging behaviour. Preventing spam. Adding colour.
mcottontensor Feb 7, 2024
c141845
Cleaning up the new logging system.
mcottontensor Feb 7, 2024
76b74b7
Adding timestamps to logging
mcottontensor Feb 7, 2024
f0a0342
Cleaning up logging further. Added structured logging. WIP.
mcottontensor Feb 7, 2024
f4e3b7c
Moved to using winston for logging. More tity up. Added SignallingSer…
mcottontensor Feb 8, 2024
71d115e
Cleaning up naming.
mcottontensor Feb 8, 2024
a5932cb
Adding WebServer and various configuration options. Still swinging ba…
mcottontensor Feb 8, 2024
b063f9a
Sorting out some irks i had with how connections handled themselves. …
mcottontensor Feb 12, 2024
8adc807
Maybe fixing case
mcottontensor Feb 12, 2024
bb3eacf
Streamer list should now only list streaming streamers.
mcottontensor Feb 12, 2024
4de159e
Adding some comments to exposed symbols.
mcottontensor Feb 12, 2024
f5d218b
Adding command line arguments.
mcottontensor Feb 15, 2024
89bfece
Added protocol version in common lib. Signalling server should now pr…
mcottontensor Feb 15, 2024
e761170
Added a config file. Added keyboard input support.
mcottontensor Feb 16, 2024
8e22a5d
Adding some REST APIs. WIP
mcottontensor Feb 19, 2024
1c22aa9
Adding REST API support. Should be mostly done now.
mcottontensor Feb 19, 2024
471229d
Adding more options related to config file handling.
mcottontensor Feb 19, 2024
29e0a6b
Adding linting rules and fixing linter issues.
mcottontensor Feb 20, 2024
eaf0216
Fixing library and ui-library packages. Updated windows scripts to ru…
mcottontensor Feb 20, 2024
c51e096
updated package lock for common lib
mcottontensor Feb 20, 2024
12733bc
Updating bash scripts for new cirrus
mcottontensor Feb 20, 2024
6b3496e
Testing typedoc results.
mcottontensor Feb 20, 2024
33ba8d3
Comparing gitlab format to github
mcottontensor Feb 20, 2024
95d2b15
General markdown
mcottontensor Feb 20, 2024
e8a95da
Excluding non public api in documentation
mcottontensor Feb 20, 2024
22d73cd
Adding some more documentation. Building the API docs. A few review c…
mcottontensor Feb 20, 2024
9e99810
Adding version to api/status
mcottontensor Feb 20, 2024
8288e1d
Update README.md
mcottontensor Feb 20, 2024
127263d
Updating help text in readme. Generated docs.
mcottontensor Feb 20, 2024
32068e1
Merge branch 'new_cirrus' of github.com:mcottontensor/PixelStreamingI…
mcottontensor Feb 20, 2024
ebacbf2
Small fix for readme. Genreated docs again.
mcottontensor Feb 20, 2024
4b7b7a5
Added notes about differences from cirrus. Generated docs.
mcottontensor Feb 21, 2024
59fc21f
Small change to help display
mcottontensor Feb 21, 2024
3d1a0ec
Readme no longer duplicated into the docs folder
mcottontensor Feb 21, 2024
e75fbea
Removed old cirrus. Moved wilbur into SignallingWebServer. Split out …
mcottontensor Feb 21, 2024
2412e3a
Updating wilbur readme
mcottontensor Feb 21, 2024
0f6ea61
Updating signalling package name. Updating docs.
mcottontensor Feb 21, 2024
e52550f
Adding matchmaker support.
mcottontensor Feb 21, 2024
8a78930
Adding https support.
mcottontensor Feb 21, 2024
db560b1
Added Common library documents. Updating Signalling docs with matchma…
mcottontensor Feb 21, 2024
291bef7
Small readme updates. Testing markdown protobuf doc generation.
mcottontensor Feb 22, 2024
9763671
Updated proto file with detailed documentation.
mcottontensor Feb 22, 2024
713ba47
Trying to make some docs look nicer.
mcottontensor Feb 22, 2024
40e7f1a
Another attempt.
mcottontensor Feb 22, 2024
8c343e5
Docs shouldnt clean the docs dir. also switched link from revision to…
mcottontensor Feb 22, 2024
a6184ae
signalling - Docs shouldnt clean the docs dir. also switched link fro…
mcottontensor Feb 22, 2024
1d8a258
Reverted back to doc generation using revisions. Branch mode requires…
mcottontensor Feb 22, 2024
894bb74
Remove some overly specific functions from protocol and updated refer…
mcottontensor Feb 22, 2024
b743da3
refactored bash scripts.
mcottontensor Feb 26, 2024
19b4518
Updated docker scripts for wilbur
mcottontensor Feb 27, 2024
afc5853
Separating out the node and coturn setup steps
mcottontensor Feb 27, 2024
196b808
Updating windows batch scripts for wilbur
mcottontensor Feb 28, 2024
178ffc5
my god i hate batch script
mcottontensor Feb 28, 2024
c51db16
Fixing up signalling tester
mcottontensor Feb 28, 2024
2beb994
Fixing test script
mcottontensor Feb 28, 2024
ddc5151
Some small fix ups from the PR review.
mcottontensor Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Common/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
dist
build
node_modules
types
package-lock.json
package.json
tsconfig.json
.eslintrc.js
.eslintrc.js
src/Messages/signalling_messages.ts
15 changes: 13 additions & 2 deletions Common/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended']
plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
rules: {
"tsdoc/syntax": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
}
};
24 changes: 7 additions & 17 deletions Common/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
## lib-pixelstreamingcommon
# lib-pixelstreamingcommon

The common library for the browser/client side of Pixel Streaming experiences. This library exposes common functionality for frontend applications of the pixel streaming ecosystem.

See [lib-pixelstreamingfrontend](/Frontend/library) for an example of how to implement this library.
For examples of how to implement this library.
- See [lib-pixelstreamingfrontend](/Frontend/library)
- See [lib-pixelstreamingsignalling](/Signalling)
- Also see [Wilbur](/SignallingWebServer) which uses the signalling library to implement a full signalling server.

Currently exposed.
### Logger
A small helper class for handling logging across the pixel streaming infrastructure.

### ITransport
An interface to a transport protocol that is in charge of sending and receiving signalling messages. Users can make use of supplied transport protocols or implement their own transport protocol via extending this interface. They can then pass the transport into the constructor of `SignallingProtocol` which is explained below.

### WebSocketTransport
An `ITransport` implementation that sends signalling messages over a websocket. This is currently the only transport in use by the official pixel streaming frontend.

### SignallingProtocol
This is the object where the user should send/receive messages. Currently there are specific functions for specific messages sent, but in the future this should change to be more generic. You can specify your own transport protocol by passing an implementation of `ITransport` to this class, allowing you to send and receive messages through any protocol you wish.

### Adding it to your project
`npm i @epicgames-ps/lib-pixelstreamingcommon-ue5.5`
## Documentation
The API is documented [here](docs).
1 change: 1 addition & 0 deletions Common/docs/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
17 changes: 17 additions & 0 deletions Common/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@epicgames-ps/lib-pixelstreamingcommon-ue5.5

# @epicgames-ps/lib-pixelstreamingcommon-ue5.5

## Table of contents

### Modules

- [Logger/Logger](modules/Logger_Logger.md)
- [Messages/base\_message](modules/Messages_base_message.md)
- [Messages/message\_helpers](modules/Messages_message_helpers.md)
- [Messages/message\_registry](modules/Messages_message_registry.md)
- [Protocol/SignallingProtocol](modules/Protocol_SignallingProtocol.md)
- [Transport/ITransport](modules/Transport_ITransport.md)
- [Transport/WebSocketTransport](modules/Transport_WebSocketTransport.md)
- [Transport/WebSocketTransportNJS](modules/Transport_WebSocketTransportNJS.md)
- [pixelstreamingcommon](modules/pixelstreamingcommon.md)
206 changes: 206 additions & 0 deletions Common/docs/classes/Logger_Logger.Logger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
[@epicgames-ps/lib-pixelstreamingcommon-ue5.5](../README.md) / [Logger/Logger](../modules/Logger_Logger.md) / Logger

# Class: Logger

[Logger/Logger](../modules/Logger_Logger.md).Logger

A basic console logger utilized by the Pixel Streaming frontend to allow
logging to the browser console.

## Table of contents

### Constructors

- [constructor](Logger_Logger.Logger.md#constructor)

### Properties

- [verboseLogLevel](Logger_Logger.Logger.md#verboseloglevel)

### Methods

- [CommonLog](Logger_Logger.Logger.md#commonlog)
- [Error](Logger_Logger.Logger.md#error)
- [GetStackTrace](Logger_Logger.Logger.md#getstacktrace)
- [Info](Logger_Logger.Logger.md#info)
- [Log](Logger_Logger.Logger.md#log)
- [SetLoggerVerbosity](Logger_Logger.Logger.md#setloggerverbosity)
- [Warning](Logger_Logger.Logger.md#warning)

## Constructors

### constructor

• **new Logger**(): [`Logger`](Logger_Logger.Logger.md)

#### Returns

[`Logger`](Logger_Logger.Logger.md)

## Properties

### verboseLogLevel

▪ `Static` **verboseLogLevel**: `number` = `5`

#### Defined in

[Logger/Logger.ts:8](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L8)

## Methods

### CommonLog

▸ **CommonLog**(`level`, `stack`, `message`): `void`

The common log function that all other log functions call to.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `level` | `string` | the level of this log message. |
| `stack` | `string` | an optional stack trace string from where the log message was called. |
| `message` | `string` | the message to be logged. |

#### Returns

`void`

#### Defined in

[Logger/Logger.ts:87](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L87)

___

### Error

▸ **Error**(`stack`, `message`): `void`

The standard logging output

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `stack` | `string` | the stack trace |
| `message` | `string` | the message to be logged |

#### Returns

`void`

#### Defined in

[Logger/Logger.ts:68](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L68)

___

### GetStackTrace

▸ **GetStackTrace**(): `string`

Captures the stack and returns it

#### Returns

`string`

the current stack

#### Defined in

[Logger/Logger.ts:14](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L14)

___

### Info

▸ **Info**(`stack`, `message`, `verbosity?`): `void`

The standard logging output

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `stack` | `string` | the stack trace |
| `message` | `string` | the message to be logged |
| `verbosity?` | `number` | the verbosity level |

#### Returns

`void`

#### Defined in

[Logger/Logger.ts:55](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L55)

___

### Log

▸ **Log**(`stack`, `message`, `verbosity?`): `void`

The standard logging output

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `stack` | `string` | the stack trace |
| `message` | `string` | the message to be logged |
| `verbosity?` | `number` | the verbosity level |

#### Returns

`void`

#### Defined in

[Logger/Logger.ts:41](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L41)

___

### SetLoggerVerbosity

▸ **SetLoggerVerbosity**(`verboseLogLevel`): `void`

Set the log verbosity level

#### Parameters

| Name | Type |
| :------ | :------ |
| `verboseLogLevel` | `number` |

#### Returns

`void`

#### Defined in

[Logger/Logger.ts:29](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L29)

___

### Warning

▸ **Warning**(`stack`, `message`): `void`

The standard logging output

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `stack` | `string` | the stack trace |
| `message` | `string` | the message to be logged |

#### Returns

`void`

#### Defined in

[Logger/Logger.ts:77](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L77)
Loading
Loading