Hi Guys,
Incase anyone else is here looking for a solution I’ve found out a few things that might be able to help you until these commands are back in. Its a bit of a hack but an easy one to do!
So a couple things to point out:
- In order for the r.SetRes command to work, the unreal instance must be in windowed mode so make sure to add the -Windowed parameter on your game’s shortcut
- Currently there is a bug in calculating the size of the video in the frontend of the pixel streaming. Inside app.js line 1140 it calculates the video’s aspect ratio by grabbing the video element and getting its size. This doesn’t work as the video element has to be referenced using an index so using
videoElement[0].videoHeight
would actually get the video height. However, this issue actually helps us as we want the outcome ofvideoAspectRatio
to beNaN
. That way it sets the style of the video container to be the size of our window
So, now the fix. Currently, if you have the window resizing, the video is distorted as its trying to fit its original aspect ratio. One change in the CSS will allow for the video to be stretched to fill the screen and therefore counter the distortion caused by the video. Inside Public/player.css
add on line 54 (inside the video class) object-fit: fill;
this will allow the video to stretch inside the video container which is the same size as the instance’s viewport
A lot of scouring into the signalling server code went into this, and I hope this fix helps people for the time being until the right commands are in.