Navigation
API > API/Plugins > API/Plugins/PixelStreaming2Input
Inheritance Hierarchy
- IInputDevice
- PIXELSTREAMING2IPixelStreaming2InputHandler
References
| Module | PixelStreaming2Input |
| Header | /Engine/Plugins/Media/PixelStreaming2/Source/PixelStreaming2Input/Public/IPixelStreaming2InputHandler.h |
| Include | #include "IPixelStreaming2InputHandler.h" |
Syntax
class PIXELSTREAMING2IPixelStreaming2InputHandler : public IInputDevice
Remarks
The IPixelStreaming2InputHandler, used to handle input from a remote peer and pass it to UE accordingly. Setting the target viewport allows for scaling of input from browser to application, and setting the target window ensure that if windows are tiled (eg editor) that the streamed input only affect the target window.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FOnSendMessage | OnSendMessage | An event that is only fired internally of the InputHandler when it wants to send a message to all connected players. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| MessageHandlerFn | FindMessageHandler
(
const FString& MessageType |
Find the function to be called whenever the specified message type is received. | |
| TSharedPtr< IPixelStreaming2DataProtocol > | |||
| TWeakPtr< FIntRect > | Get the target screen rectangle for this streamer. | ||
| TWeakPtr< SViewport > | Get the viewport this input device is associated with. | ||
| TWeakPtr< SWindow > | Get the viewport this input device is associated with. | ||
| TSharedPtr< IPixelStreaming2DataProtocol > | |||
| bool | IsElevated
(
const FString& Id |
Checks whether the given id has elevated priviledges. | |
| bool | Set whether the input devices is faking touch events using keyboard and mouse this can be useful for debugging. | ||
| void | Handle the message from the WebRTC data channel. | ||
| void | RegisterMessageHandler
(
const FString& MessageType, |
Register a function to be called whenever the specified message type is received. | |
| void | SetCommandHandler
(
const FString& CommandName, |
Register a custom function to execute when command JSON is received over the data channel: "{ type: "Command", YourCommand: YourCommandValue }". Note: You can also override the default Pixel Streaming command handlers by setting handlers with the same name as those already used, e.g. "Stat.FPS". | |
| void | SetElevatedCheck
(
const TFunction< bool(FString)>& CheckFn |
Some behaviours might want to be limited to a specific source or group of sources. This method sets a check function to test of a given source id is "elevated". | |
| void | SetInputType
(
EPixelStreaming2InputType InputType |
Set the input handlers type. This controls whether input is routed to widgets or windows. | |
| void | SetTargetScreenRect
(
TWeakPtr< FIntRect > InTargetScreenRect |
Set the target screen rectangle for this streamer. This is used to when the streamer doesn't have a singular target window / viewport and as such we just use the manual scale. | |
| void | SetTargetViewport
(
TWeakPtr< SViewport > InTargetViewport |
Set the viewport this input device is associated with. | |
| void | SetTargetWindow
(
TWeakPtr< SWindow > InTargetWindow |
Set the viewport this input device is associated with. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FOnSendMessage |
Typedefs
| Name | Description |
|---|---|
| CommandHandlerFn | The callback signature for handling a command sent to the data channel. |
| MessageHandlerFn | The callback signature for handling a command sent to the data channel. |