-
Notifications
You must be signed in to change notification settings - Fork 131
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
Bring multiple feature switching improvements #1287
Merged
Merged
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
peaBerberian
force-pushed
the
feat/demo-improvs
branch
from
September 25, 2023 19:24
60afb5b
to
ab78338
Compare
peaBerberian
force-pushed
the
feat/demo-improvs
branch
from
September 25, 2023 19:43
ab78338
to
9a50edb
Compare
peaBerberian
added a commit
that referenced
this pull request
Sep 27, 2023
Bring multiple feature switching improvements
peaBerberian
added a commit
that referenced
this pull request
Sep 27, 2023
In #1287, I deprecated the `NATIVE_TEXT_BUFFER` and `HTML_TEXT_BUFFER` as they already are automatically included when importing one of the corresponding text track parsers (so there's no point to have a separate import here, it can just be lazily added on any of those parser's injection to the RxPlayer). Yet I forgot that the exact same situation was there for the `IMAGE_BUFFER` (and even completely forgot to re-document image-related features). This is now done.
peaBerberian
added a commit
that referenced
this pull request
Sep 27, 2023
In #1287, I deprecated the `NATIVE_TEXT_BUFFER` and `HTML_TEXT_BUFFER` as they already are automatically included when importing one of the corresponding text track parsers (so there's no point to have a separate import here, it can just be lazily added on any of those parser's injection to the RxPlayer). Yet I forgot that the exact same situation was there for the `IMAGE_BUFFER` (and even completely forgot to re-document image-related features). This is now done.
This was referenced Sep 27, 2023
Merged
peaBerberian
added a commit
that referenced
this pull request
Oct 12, 2023
In #1287, I deprecated the `NATIVE_TEXT_BUFFER` and `HTML_TEXT_BUFFER` as they already are automatically included when importing one of the corresponding text track parsers (so there's no point to have a separate import here, it can just be lazily added on any of those parser's injection to the RxPlayer). Yet I forgot that the exact same situation was there for the `IMAGE_BUFFER` (and even completely forgot to re-document image-related features). This is now done.
peaBerberian
added a commit
that referenced
this pull request
Oct 13, 2023
Bring multiple feature switching improvements
peaBerberian
added a commit
that referenced
this pull request
Oct 13, 2023
In #1287, I deprecated the `NATIVE_TEXT_BUFFER` and `HTML_TEXT_BUFFER` as they already are automatically included when importing one of the corresponding text track parsers (so there's no point to have a separate import here, it can just be lazily added on any of those parser's injection to the RxPlayer). Yet I forgot that the exact same situation was there for the `IMAGE_BUFFER` (and even completely forgot to re-document image-related features). This is now done.
peaBerberian
added a commit
that referenced
this pull request
Oct 13, 2023
Bring multiple feature switching improvements
peaBerberian
added a commit
that referenced
this pull request
Oct 13, 2023
In #1287, I deprecated the `NATIVE_TEXT_BUFFER` and `HTML_TEXT_BUFFER` as they already are automatically included when importing one of the corresponding text track parsers (so there's no point to have a separate import here, it can just be lazily added on any of those parser's injection to the RxPlayer). Yet I forgot that the exact same situation was there for the `IMAGE_BUFFER` (and even completely forgot to re-document image-related features). This is now done.
peaBerberian
added a commit
that referenced
this pull request
Oct 13, 2023
Bring multiple feature switching improvements
peaBerberian
added a commit
that referenced
this pull request
Oct 13, 2023
In #1287, I deprecated the `NATIVE_TEXT_BUFFER` and `HTML_TEXT_BUFFER` as they already are automatically included when importing one of the corresponding text track parsers (so there's no point to have a separate import here, it can just be lazily added on any of those parser's injection to the RxPlayer). Yet I forgot that the exact same situation was there for the `IMAGE_BUFFER` (and even completely forgot to re-document image-related features). This is now done.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The RxPlayer has an API to allow an application to only import features it needs, e.g. only importing text track parsers for needed subtitles formats, only DRM handling if it plays encrypted content, and so on.
While working on the WebWorker branch (#1272), I noticed several feature switching improvements could be performed without breaking the current API:
I added an implicit
MEDIA_SOURCE
(and un-importable) feature which is automatically added when either transport protocol feature is added (DASH
,SMOOTH
,LOCAL
orMETAPLAYLIST
).Here it allows to drastically reduce the bundle size if only
"directfile"
mode is needed - as it does not share the same core logic. When / if the worker work is merged, it will also greatly reduce the size if only on-worker playback is needed.The
addFeatures
static method is now also added for the default RxPlayer import (import RxPlayer from "rx-player"
) as well as for the builds published in thedist
directory and in on our release notes.Before you needed to explicitly import the minimal RxPlayer through the
"rx-player/minimal"
path, but there was no reason left for that.Now the only current difference between the default and minimal import will be that the default has all non-experimental features already imported, which seems logical.
So now, it will be possible to add experimental features also to the default RxPlayer build. Consequently, the corresponding features' documentation has been updated to remove the notion that you need the minimal build to import them. The code examples still relies on the minimal build as we expect that's what most applications would want to do.
Because now feature switching can happen on any build, it's documentation has moved from tutorials to its own page in the API documentation.
NATIVE_TEXT_BUFFER
andHTML_TEXT_BUFFER
are now optional features which are automatically and implicitly imported if respectively any native text parser or any html text parser is imported.I also chose to un-document both feature to simplify the features' documentation. Though it may be a bad idea for applications looking what an already-added feature does. So I may re-add it to the doc and announce it as deprecated instead.
The features's code unit tests has been simplified. There's no need to mock and to
as any
here as it was before.