-
Notifications
You must be signed in to change notification settings - Fork 133
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
peaBerberian
wants to merge
2
commits into
dev
Choose a base branch
from
feat/resolution-checks
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
04904c9
to
fc7b62f
Compare
05e4f32
to
c67995c
Compare
c233f42
to
7bf784b
Compare
7bf784b
to
d9c5f0b
Compare
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`.
d9c5f0b
to
0c1d7df
Compare
Automated performance checks have been performed on commit Tests results✅ Tests have passed. Performance tests 1st run outputNo significative change in performance for tests:
If you want to skip performance checks for latter commits, add the |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theloadVideo
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 totrue
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
anddecipherable
properties ofRepresentation
.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)