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

[Proposal]: Add experimental.enableResolutionChecks loadVideo option #1533

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

peaBerberian
Copy link
Collaborator

@peaBerberian peaBerberian commented Sep 5, 2024

This is a Proposal to optionally move some "resolution checks" that were historically on the application-side on the RxPlayer side.

Some devices aren't able to play video content with a higher resolution than e.g. what their screen size can display: some will fail on error, others will just infinitely freeze etc.

Many of those devices have vendor-specific API that indicates whether a device was e.g. compatible to 4k content, 1080p content etc.

Until now we told the application developers to do the Representation filtering themselves with the help of the representationFilter option from the loadVideo API. This is because of the vast numbers of devices out there, each with their own API, and because we didn't want to take the risk of having false negatives if it turned out some of those API were not always right.

However, many of those devices are very popular (Lg and Samsung TVs, game consoles). Thus I'm wondering if it would be better that we provide some of those resolution checks ourselves, to lower the efforts an application have to make to rely on the RxPlayer on those common devices.

Implementation

For now I added an experimental loadVideo option: experimental.enableResolutionChecks, that has to be set to true to enable the behavior. The long term idea would be that for devices where it seems 100% accurate, we would enable the check by default.

It will directly filter out resolutions that are too high, unless all resolutions are too high on the current video track in which case it will disable the check (as a security).
In other cases, it follows the exact same rules than the isCodecSupported and decipherable properties of Representation.

Note about multithreading environment

For now, to simplify, I assume that those vendor API are available in a WebWorker environment. To check if they aren't (in which case we won't filter out anything, so not dramatic either)

@peaBerberian peaBerberian added the proposal This Pull Request or Issue is only a proposal for a change with the expectation of a debate on it label Sep 5, 2024
@peaBerberian peaBerberian added the Compatibility Relative to the RxPlayer's compatibility with various devices and environments label Sep 5, 2024
@peaBerberian peaBerberian force-pushed the feat/resolution-checks branch 3 times, most recently from 05e4f32 to c67995c Compare September 5, 2024 20:53
@peaBerberian peaBerberian added the Priority: 3 (Low) This issue or PR has a low priority. label Sep 6, 2024
This is a Proposal to optionally move some "resolution checks" that
were historically on the application-side on the RxPlayer side.

Some devices aren't able to play video content with a higher resolution
than e.g. what their screen size can display: some will fail on error,
others will just infinitely freeze etc.

Many of those devices have vendor-specific API that indicated whether a
device was e.g. compatible to 4k content, 1080p content etc.

Until now we told the application developers to do the Representation
filtering themselves with the help of the `representationFilter` option
from the `loadVideo` API. This is because of the vast numbers of devices
out there, each with their own API, and because we didn't want to take
the risk of having false negatives if it turned out some of those
API were not always right.

However, many of those devices are very popular (Lg and Samsung TVs,
game consoles). Thus I'm wondering if it would be better that we
provide some of those resolution checks ourselves, to lower the
efforts an application have to make to rely on the RxPlayer on those
common devices.

For now I added an experimental `loadVideo` option:
`experimental.enableResolutionChecks`, that has to be set to `true`
to enable the behavior. The long term idea would be that for devices
where it seems 100% accurate, we would enable the check by default.

It will directly filter out resolutions that are too high, unless all
resolutions are too high on the current video track in which case it
will disable the check (as a security).
In other cases, it follows the exact same rules than the
`isCodecSupported` and `decipherable` properties of `Representation`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compatibility Relative to the RxPlayer's compatibility with various devices and environments Priority: 3 (Low) This issue or PR has a low priority. proposal This Pull Request or Issue is only a proposal for a change with the expectation of a debate on it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant