Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Support for Upscale and downscale % metrics no longer blocked by RN bug #45

Open
Waltari10 opened this issue Jan 10, 2023 · 2 comments
Open

Comments

@Waltari10
Copy link

In the readme.md caveats it states that upscale and downscale % metrics couldn't be calculated because can't get width and height from HLS format. It links to an issue stating that it's open, but it has been closed some time ago. Link to issue: TheWidlarzGroup/react-native-video#1194. Fixed by: TheWidlarzGroup/react-native-video#1992

Could we now have support for upscale and downscale metrics as that issue has been fixed? :)

@jsanford8
Copy link
Contributor

Hey @Waltari10 - thanks for bringing this to our attention! We took a quick look at this, and while it's a step in the right direction, I'm not sure that it will fully resolve this issue for us. In order for Mux to track upscaling/downscaling, we need to be able to interrogate the player and video size (height and width) throughout the whole of playback.

With HLS, the video size can change as different renditions are selected. From what I see of this change, it looks like react-native-video may only be storing the source resolution when a new player item is loaded/ready - https://github.com/react-native-video/react-native-video/pull/1992/files#diff-9ca9c62c4df28839b6a39c52207fa8885bf25dd0ea662635fc318bf0219ed11fL616. If that's the case, then we won't be able to tell the source size as it changes through playback, which would result in inaccurate metrics for upscaling/downscaling.

We will take a pass to see if this is actually the case or not, but in the meantime, do you happen to know yourself if react-native-video will report the changing source resolution throughout playback?

@Waltari10
Copy link
Author

I think you're right that react-native-video doesn't report the source resolution when the quality changes. At least couldn't find any callback or ref. So yeah, looks like would have to first expand react-native-video somehow :/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants