Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.43 KB

api_transition_guide.md

File metadata and controls

53 lines (37 loc) · 1.43 KB

Migrating from libspsfrontend predating v0.1.4

SPS frontend changed to use the Epic Games Pixel Streaming 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.

Listening for UE messages

Refer to this PR for more details.

Before:

iWebRtcController.dataChannelController.onResponse = (messageBuffer) => { 
	/* whatever */ 
}

Now:

pixelstreaming.addResponseEventListener(name, funct)

// or

pixelstreaming.removeResponseEventListener(name)

Sending messages to UE

Refer to this PR for more details.

Before:

iWebRtcController.sendUeUiDescriptor(JSON.stringify({ /* whatever */ } )) 

Now:

pixelstreaming.emitUIInteraction(data: object | string)

Listening for WebRTC stream start

Refer to this PR for more details.

Before:

override onVideoInitialised()

Now:

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