Navigation
API > API/Plugins > API/Plugins/PixelStreaming2Input
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.
| Name | IPixelStreaming2InputHandler |
| Type | class |
| Header File | /Engine/Plugins/Media/PixelStreaming2/Source/PixelStreaming2Input/Public/IPixelStreaming2InputHandler.h |
| Include Path | #include "IPixelStreaming2InputHandler.h" |
Syntax
class IPixelStreaming2InputHandler : public IInputDevice
Implements Interfaces
Classes
| Name | Remarks |
|---|---|
| FOnSendMessage |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CommandHandlerFn | TFunction< void(FString SourceId, FString Descriptor, FString CommandString)> | The callback signature for handling a command sent to the data channel. | IPixelStreaming2InputHandler.h |
| MessageHandlerFn | TFunction< void(FString SourceId, FMemoryReader Message)> | The callback signature for handling a command sent to the data channel. | IPixelStreaming2InputHandler.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnSendMessage | FOnSendMessage | An event that is only fired internally of the InputHandler when it wants to send a message to all connected players. | IPixelStreaming2InputHandler.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
MessageHandlerFn FindMessageHandler
(
const FString& MessageType |
Find the function to be called whenever the specified message type is received. | IPixelStreaming2InputHandler.h | |
TSharedPtr< IPixelStreaming2DataProtocol > GetFromStreamerProtocol() |
IPixelStreaming2InputHandler.h | ||
TWeakPtr< FIntRect > GetTargetScreenRect() |
Get the target screen rectangle for this streamer. | IPixelStreaming2InputHandler.h | |
TWeakPtr< SViewport > GetTargetViewport() |
Get the viewport this input device is associated with. | IPixelStreaming2InputHandler.h | |
TWeakPtr< SWindow > GetTargetWindow() |
Get the viewport this input device is associated with. | IPixelStreaming2InputHandler.h | |
TSharedPtr< IPixelStreaming2DataProtocol > GetToStreamerProtocol() |
IPixelStreaming2InputHandler.h | ||
bool IsElevated
(
const FString& Id |
Checks whether the given id has elevated priviledges. | IPixelStreaming2InputHandler.h | |
bool IsFakingTouchEvents() |
Set whether the input devices is faking touch events using keyboard and mouse this can be useful for debugging. | IPixelStreaming2InputHandler.h | |
bool OnControllerAnalog
(
uint8 ControllerIndex, |
Notify the input handler of a controller analog event. | IPixelStreaming2InputHandler.h | |
bool OnControllerButtonPressed
(
uint8 ControllerIndex, |
Notify the input handler of a controller button press event. | IPixelStreaming2InputHandler.h | |
bool OnControllerButtonReleased
(
uint8 ControllerIndex, |
Notify the input handler of a controller button release event. | IPixelStreaming2InputHandler.h | |
uint8 OnControllerConnected() |
Notify the input handler of a controller connecting. | IPixelStreaming2InputHandler.h | |
bool OnControllerDisconnected
(
uint8 ControllerIndex |
Notify the input handler of a controller disconnecting. | IPixelStreaming2InputHandler.h | |
bool OnKeyChar
(
TCHAR Character |
Notify the input handler of a character event. | IPixelStreaming2InputHandler.h | |
bool OnKeyDown
(
FKey Key, |
Notify the input handler of a key down event. | IPixelStreaming2InputHandler.h | |
bool OnKeyUp
(
FKey Key |
Notify the input handler of a key up event. | IPixelStreaming2InputHandler.h | |
| Handle the message from the WebRTC data channel. | IPixelStreaming2InputHandler.h | ||
bool OnMouseDoubleClick
(
EMouseButtons::Type Button, |
Notify the input handler of a mouse double click event. | IPixelStreaming2InputHandler.h | |
bool OnMouseDown
(
EMouseButtons::Type Button, |
Notify the input handler of a mouse down event. | IPixelStreaming2InputHandler.h | |
bool OnMouseEnter() |
Notify the input handler of the mouse entering the application (typically the browser window). | IPixelStreaming2InputHandler.h | |
bool OnMouseLeave() |
Notify the input handler of the mouse leaving the application (typically the browser window). | IPixelStreaming2InputHandler.h | |
bool OnMouseMove
(
FIntPoint ScreenPosition, |
Notify the input handler of a mouse move event. | IPixelStreaming2InputHandler.h | |
bool OnMouseUp
(
EMouseButtons::Type Button |
Notify the input handler of a mouse up event. | IPixelStreaming2InputHandler.h | |
bool OnMouseWheel
(
FIntPoint ScreenPosition, |
Notify the input handler of a mouse wheel event. | IPixelStreaming2InputHandler.h | |
bool OnTouchEnded
(
FIntPoint TouchPosition, |
Notify the input handler of a touch ended event. | IPixelStreaming2InputHandler.h | |
bool OnTouchMoved
(
FIntPoint TouchPosition, |
Notify the input handler of a touch moved event. | IPixelStreaming2InputHandler.h | |
bool OnTouchStarted
(
FIntPoint TouchPosition, |
Notify the input handler of a touch start event. | IPixelStreaming2InputHandler.h | |
bool OnXRAnalog
(
EControllerHand Handedness, |
Notify the input handler of receiving a XR controller button release event to use with XR streaming. | IPixelStreaming2InputHandler.h | |
bool OnXRButtonPressed
(
EControllerHand Handedness, |
Notify the input handler of receiving a XR controller button press event to use with XR streaming. | IPixelStreaming2InputHandler.h | |
bool OnXRButtonReleased
(
EControllerHand Handedness, |
Notify the input handler of receiving a XR controller button release event to use with XR streaming. | IPixelStreaming2InputHandler.h | |
bool OnXRButtonTouched
(
EControllerHand Handedness, |
Notify the input handler of receiving a XR controller button touch event to use with XR streaming. | IPixelStreaming2InputHandler.h | |
bool OnXRButtonTouchReleased
(
EControllerHand Handedness, |
Notify the input handler of receiving a XR controller button touch release event to use with XR streaming. | IPixelStreaming2InputHandler.h | |
bool OnXRControllerTransform
(
FTransform ControllerTransform, |
Notify the input handler of receiving the transform of an XR controller to use with XR streaming (received once per frame that the HMD displays). | IPixelStreaming2InputHandler.h | |
bool OnXREyeViews
(
FTransform LeftEyeTransform, |
Notify the input handler of receiving the Eye Views to use with XR streaming (usually received oncne at the start of a stream) | IPixelStreaming2InputHandler.h | |
bool OnXRHMDTransform
(
FTransform HMDTransform |
Notify the input handler of receiving the transform of the HMD to use with XR streaming (received once per frame that the HMD displays). | IPixelStreaming2InputHandler.h | |
bool OnXRSystem
(
EPixelStreaming2XRSystem System |
Notify the input handler of the headset system connected to the frontend to use with XR streaming. | IPixelStreaming2InputHandler.h | |
void RegisterMessageHandler
(
const FString& MessageType, |
Register a function to be called whenever the specified message type is received. | IPixelStreaming2InputHandler.h | |
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". | IPixelStreaming2InputHandler.h | |
| 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". | IPixelStreaming2InputHandler.h | ||
void SetInputType
(
EPixelStreaming2InputType InputType |
Set the input handlers type. This controls whether input is routed to widgets or windows. | IPixelStreaming2InputHandler.h | |
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. | IPixelStreaming2InputHandler.h | |
void SetTargetViewport
(
TWeakPtr< SViewport > InTargetViewport |
Set the viewport this input device is associated with. | IPixelStreaming2InputHandler.h | |
void SetTargetWindow
(
TWeakPtr< SWindow > InTargetWindow |
Set the viewport this input device is associated with. | IPixelStreaming2InputHandler.h |