Skip to content

Frontend - Provide default values to avoid potential NAN value returned when using dynamic player aspect ratios#167

Merged
lukehb merged 1 commit intoEpicGamesExt:masterfrom
richardFocus:HotFixCoordinateConverter
Jul 10, 2024
Merged

Frontend - Provide default values to avoid potential NAN value returned when using dynamic player aspect ratios#167
lukehb merged 1 commit intoEpicGamesExt:masterfrom
richardFocus:HotFixCoordinateConverter

Conversation

@richardFocus
Copy link
Copy Markdown
Contributor

@richardFocus richardFocus commented Jul 3, 2024

Relevant components:

  • Signalling server
  • Common library
  • Frontend library
  • Frontend UI library
  • Matchmaker
  • Platform scripts
  • SFU

Problem statement:

What problem does this PR address?
Our app uses various UI layouts for different pages and the pixel streaming player resizes to fit the available space as needed. Currently there is an issue in the where the value of the X mouse coord in CoordinateConverter.tsx can return NAN. I have found this to happen when the stream first starts and when the player hasn't yet resized and therefore could be zero, however resizing the player to zero width could also cause similar issues.

Solution

How does this PR solve the problem?
The PR provides temporary default values that are divisible and prevents NAN from being returned.

Documentation

If you added a new feature or changed an existing feature please add some documentation here.

Or better yet, link to the relevant /Docs update in your PR.

Test Plan and Compatibility

What steps have you taken to ensure this PR maintains compatibility with the existing functionality?
I have printed the returning value to the screen from every possible combination of layouts I have available.

Or better yet, link to the unit tests that accompany this PR.

@richardFocus richardFocus changed the title Frontend - Provide default values to avoid potential NAN values when using dynamic player aspect ratios Frontend - Provide default values to avoid potential NAN value returned when using dynamic player aspect ratios Jul 3, 2024
Copy link
Copy Markdown
Contributor

@lukehb lukehb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this!

@lukehb lukehb added auto-backport Used to specify we want a PR to auto backport to a branch, must be paired with auto-backport-to-UEX. auto-backport-to-UE5.4 Auto backport to UE 5.4 auto-backport-to-UE5.3 Auto backport to UE 5.3 auto-backport-to-UE5.2 Auto backport to UE 5.2 labels Jul 10, 2024
@lukehb lukehb merged commit 0524416 into EpicGamesExt:master Jul 10, 2024
github-actions bot pushed a commit that referenced this pull request Jul 10, 2024
github-actions bot pushed a commit that referenced this pull request Jul 10, 2024
github-actions bot pushed a commit that referenced this pull request Jul 10, 2024
@github-actions
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
UE5.4
UE5.3
UE5.2

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

lukehb pushed a commit that referenced this pull request Jul 10, 2024
…sing dynamic aspect ratios (#167) (#173)

(cherry picked from commit 0524416)

Co-authored-by: richardFocus <164948400+richardFocus@users.noreply.github.com>
lukehb pushed a commit that referenced this pull request Jul 10, 2024
…sing dynamic aspect ratios (#167) (#174)

(cherry picked from commit 0524416)

Co-authored-by: richardFocus <164948400+richardFocus@users.noreply.github.com>
lukehb pushed a commit that referenced this pull request Jul 10, 2024
…sing dynamic aspect ratios (#167) (#175)

(cherry picked from commit 0524416)

Co-authored-by: richardFocus <164948400+richardFocus@users.noreply.github.com>
lukehb pushed a commit that referenced this pull request Jul 10, 2024
@richardFocus richardFocus deleted the HotFixCoordinateConverter branch July 16, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Used to specify we want a PR to auto backport to a branch, must be paired with auto-backport-to-UEX. auto-backport-to-UE5.2 Auto backport to UE 5.2 auto-backport-to-UE5.3 Auto backport to UE 5.3 auto-backport-to-UE5.4 Auto backport to UE 5.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants