Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation updates #54

Merged
merged 14 commits into from
Jul 16, 2024
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 - 2022 TensorWorks Pty Ltd
Copyright (c) 2021 - 2024 TensorWorks Pty Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
31 changes: 14 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
# Scalable Pixel Streaming Frontend
# Scalable Pixel Streaming frontend

This is the web frontend for [Scalable Pixel Streaming (SPS)](https://scalablestreaming.io).
This repository contains the web frontend for [Scalable Pixel Streaming (SPS)](https://scalablestreaming.io), which is a lightweight wrapper implementation of Epic Games [Pixel Streaming frontend](https://github.com/EpicGamesExt/PixelStreamingInfrastructure/tree/master/Frontend).

The SPS frontend is a lightweight implementation of Epic Games' [Pixel Streaming frontend](https://github.com/EpicGames/PixelStreamingInfrastructure/tree/master/Frontend).

## Features of the SPS Frontend
## Features of the SPS frontend

- [Extensions](./library/src/SignallingExtension.ts) to the default signalling messages to communicate with our custom signalling server.
- The sending of [streaming statistics](./library/src/SPSApplication.ts#L38) to our signalling server.
- [Streaming statistics](./library/src/SPSApplication.ts#L38) are being sent to our signalling server.

## Documentation

### Utilising the Scalable Pixel Streaming Frontend
Below is a comprehensive guide for accessing the Scalable Pixel Streaming Frontend. This guide includes where to download the library, how to consume it and how to customise it for usage in different projects.
- [Scalable Pixel Streaming Frontend utilisation guide](./docs/frontend_utilisation_guide.md)

### Migrating from Scalable Pixel Streaming Frontend
In general, the official Epic Games Pixel Streaming [Frontend docs](https://github.com/EpicGames/PixelStreamingInfrastructure/tree/master/Frontend) should cover most common usage cases (as our library is simply a thin wrapper on that). However, some Scalable Pixel Streaming Frontend specific docs are listed below:
Refer to our [Scalable Pixel Streaming frontend utilisation guide](./docs/frontend_utilisation_guide.md) for accessing the Scalable Pixel Streaming frontend, downloading the library, consuming it, and customising it for usage in different projects.

### Migrating legacy Scalable Pixel Streaming frontend

All SPS versions since `v0.1.4` are using the current version of Epic Games Pixel Streaming frontend. Refer to [our migration guide](./docs/api_transition_guide.md) if your frontend predates this version.

- [Migrating from Scalable Pixel Streaming Frontend <=0.1.4](./docs/api_transition_guide.md)
### Scalable Pixel Streaming frontend reference

### Scalable Pixel Streaming Frontend Reference section
The Scalable Pixel Streaming Frontend is a part of a complex system which abstracts a lot of its complexities behind the library. Below is a useful collection of references which explain how the Scalable Pixel Streaming Frontend fits within Scalable Pixel Streaming as a whole.
- [Scalable Pixel Streaming Frontend Reference guide](./docs/sps_frontend_refrence_guide.md)
The Scalable Pixel Streaming frontend is part of a complex system that abstracts a lot of its complexities behind the library. Refer to our [reference guide](./docs/sps_frontend_refrence_guide.md) to gain a deeper understanding of how the SPS frontend fits within Scalable Pixel Streaming as a whole.

## Issues

As the SPS frontend is a lightweight implementation of the Epic Games frontend, the majority of issues should be reported to the Epic Games frontend [here](https://github.com/EpicGames/PixelStreamingInfrastructure/issues).
As the SPS frontend is an implementation of the Epic Games Pixel Streaming frontend, the majority of issues will pertain to the Epic Games frontend and should be reported on [their repository](https://github.com/EpicGamesExt/PixelStreamingInfrastructure/issues).

However, in cases where you are certain it is an SPS specific frontend issue, please report your issue [here](https://github.com/ScalablePixelStreaming/Frontend/issues).
If you encounter an issue specific to the SPS implementation, please report it [here](https://github.com/ScalablePixelStreaming/Frontend/issues).


## Legal

Copyright &copy; 2021 - 2023, TensorWorks Pty Ltd. Licensed under the MIT License, see the file [LICENSE](./LICENSE) for details.
Copyright &copy; 2021 - 2024, TensorWorks Pty Ltd. Licensed under the MIT License, see the [license file](./LICENSE) for details.
40 changes: 15 additions & 25 deletions docs/api_transition_guide.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# Migrating from `libspsfrontend` <=0.1.4
# Migrating from `libspsfrontend` predating `v0.1.4`

All SPS versions after `0.1.4` are now using the [Epic Games' Pixel Streaming frontend](https://github.com/EpicGames/PixelStreamingInfrastructure/tree/master/Frontend). This shift to the Epic frontend has caused us to change both our API and our NPM packages.
SPS frontend changed to use the [Epic Games Pixel Streaming frontend](https://github.com/EpicGames/PixelStreamingInfrastructure/tree/master/Frontend) since version `0.1.4`, which involved modifications both to our API and NPM packages.

---
Below are some common usages of the SPS frontend API that have changed. Note that this list is not exhaustive, if you encounter more differences, please open an issue on this repository to report them.

# API Usage
### Listening for UE messages

Below are common usage of SPS Frontend API that have now changed (this list is not exhaustive, if there are more you would like documented please open an issue).
Refer to [this PR](https://github.com/EpicGames/PixelStreamingInfrastructure/pull/132) for more details.

## Listening for UE messages

**Before:**
Before:
```js
iWebRtcController.dataChannelController.onResponse = (messageBuffer) => {
/* whatever */
}
```

**Now:**
Now:
```js
pixelstreaming.addResponseEventListener(name, funct)

Expand All @@ -26,38 +24,30 @@ pixelstreaming.addResponseEventListener(name, funct)
pixelstreaming.removeResponseEventListener(name)
```

(More details [here](https://github.com/EpicGames/PixelStreamingInfrastructure/pull/132))

---
### Sending messages to UE

## Sending messages to UE
Refer to [this PR](https://github.com/EpicGames/PixelStreamingInfrastructure/pull/132) for more details.

**Before:**
Before:
```js
iWebRtcController.sendUeUiDescriptor(JSON.stringify({ /* whatever */ } ))
```

**Now:**
Now:
```js
pixelstreaming.emitUIInteraction(data: object | string)
```

(More details [here](https://github.com/EpicGames/PixelStreamingInfrastructure/pull/132))

---
### Listening for WebRTC stream start

## Listen for WebRTC stream start?
Refer to [this PR](https://github.com/EpicGames/PixelStreamingInfrastructure/pull/110) for more details.

**Before:**
Before:
```js
override onVideoInitialised()
```

**Now:**
Now:
```js
pixelStreaming.addEventListener("videoInitialized", ()=> { /* Do something */ });
```

(More details [here](https://github.com/EpicGames/PixelStreamingInfrastructure/pull/110))

------
Loading