Steps to Reproduce

follow the official document to deploy a Pixel streaming application

start the application with all the necessary param (including -AllowPixelStreamingCommands )

modify the app.js in the signalingwebServer to add the following codes in "kickbutton.onclick" event for test:

let descriptor =

{     ConsoleCommand: 'stat fps' }

;

emitCommand(descriptor);

then click the "kick button" when you succeeded connecting to the app in your browser.

 

expected: the running app show fps info in the viewport, but actually it doesn't. In its log it says

Warning: failed to run command = {"ConsoleCommand": "stat fps"}

 

Debug: after reading the source codes it looks like there is a typo error in \Engine\Plugins\Media\PixelStreaming\Source\PixelStreaming\Private\PixelStreamerInputComponent.cpp  line23

UPixelStreamerInputComponent::OnCommand(const FString& Descriptor)

{

FString ConsoleCommand; bool bSuccess = false;

GetJsonStringValue(Descriptor, TEXT("ConsoleCommand"), ConsoleCommand, bSuccess);

if (!bSuccess) // looks like here should have NO "!"

{ return GEngine->Exec(GetWorld(), *ConsoleCommand); }

...

 

it is also reported by UDN 

https://udn.unrealengine.com/s/case/5002L00001ArUHxQAN/allowpixelstreamingcommands-for-pixel-streaming-doesnt-work

https://udn.unrealengine.com/s/question/0D52L000050YpaaSAC/pixel-streaming-%E7%A4%BA%E4%BE%8B-demo-%E8%B0%83%E7%94%A8-emitcommand-%E6%96%B9%E6%B3%95%E4%BC%9A%E5%BC%95%E5%8F%91-crash?fromCase=1

 

NOTE: It can be workaround by users to define some customized UIInteraction.

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-104359 in the post.

7
Login to Vote

Duplicate
ComponentPixelStreaming
Affects Versions4.244.254.26
Target Fix4.27
CreatedDec 10, 2020
ResolvedMay 31, 2021
UpdatedMay 31, 2021
View Jira Issue