Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(FEC-14047): playkit-js-providers - add aspectRatio to media metadata #241

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

SivanA-Kaltura
Copy link
Collaborator

Description of the Changes

Changes since previous PR:

  • Rename to aspectRatio, which is the standard name
  • Divide width by height and not vice versa
  • Remove the default value
  • Fix unit tests

Why we don't want to set a default value:

  • Default value was set when context / height / width were not set. This happened when fetching the partial sources data for playlist.
  • Meaning, the partial source of an entry in playlist always had an INITIAL value of aspectRatio = 1.78
  • When loadMedia was called, this code was called again, with context this time, and it returned a source with the CORRECT value of aspectRatio
  • The player would then try to merge the two sources objects (partial and full), but because the initial aspectRatio was already set - the correct value did not override the initial value, since it would only override values which are not yet set.
  • This caused the entry aspectRatio to have an incorrect value.

Resolves FEC-14047

@SivanA-Kaltura SivanA-Kaltura merged commit 5432c2a into master Jul 22, 2024
11 checks passed
@SivanA-Kaltura SivanA-Kaltura deleted the FEC-14047-2 branch July 22, 2024 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants