Skip to content

checkPortalSize function required Math.abs when calculating the Representation with nearest Width to the elementWidth

Created by: richardbushell

As per the title, the checkPortalSize function required Math.abs when calculating the Representation with nearest Width to the elementWidth.

We had 6 video representations: [0] 768px [1] 768px [2] 768px [3] 768px [4] 1280px [5] 1920px (obviously at different bitrates too)

Previously the function would choose representation [1] instead of [3] for all elementWidth values of 767px or less.

Merge request reports