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

Remove RxJS from the SegmentBuffer and related code #1127

Merged
merged 2 commits into from
Sep 9, 2022

Conversation

peaBerberian
Copy link
Collaborator

This is yet another PR to remove RxJS from parts of the code to raise the RxPlayer's "approachability", after #962 (for the transports code), #1042 (the content decryption code) and #1091 (from the adaptive code).

This time, this is the turn of a relatively smaller part of the code: the "SegmentBuffers (in src/core/segment_buffers) which is the code wrapping browser's buffers (or even implementing them in the case of subtitles and image buffers).

Like the other PR before it, this one makes heavy usage of:

  • ISharedReference objects, which are very similar to RXJS BehaviorSubjects (always-set Observable values which are not lazy and can be getted at any time) to easily share values between blocks while allowing to trigger a callback when its inner state changes.
  • TaskCanceller and CancellationSignal, which are very similar to respectively the AbortController and AbortSignal APIs and which allows to easily and explicitly (generally unlike RxJS Observables where it often happens as a side-effect of unsubscription) abort cancellable asynchronous operations.

@peaBerberian peaBerberian added Refacto This Pull Request changes a lot of RxPlayer's code and/or logic SegmentBuffers Relative to the `SegmentBuffers` media buffers Priority: 3 (Low) This issue or PR has a low priority. Performance checks Performance tests are run on this issue / PR labels Jun 13, 2022
@peaBerberian peaBerberian force-pushed the misc/segment_buffer-no-rxjs branch from 47d9f63 to 51149c1 Compare June 13, 2022 14:54
@peaBerberian peaBerberian added Performance checks Performance tests are run on this issue / PR and removed Performance checks Performance tests are run on this issue / PR labels Jun 13, 2022
@peaBerberian peaBerberian force-pushed the misc/segment_buffer-no-rxjs branch from 51149c1 to e9301fc Compare June 14, 2022 14:56
@peaBerberian peaBerberian force-pushed the next branch 2 times, most recently from d784283 to 675d062 Compare June 21, 2022 13:41
@peaBerberian peaBerberian force-pushed the misc/segment_buffer-no-rxjs branch from e9301fc to 1cd2b42 Compare June 28, 2022 09:17
@peaBerberian peaBerberian force-pushed the misc/segment_buffer-no-rxjs branch from 1cd2b42 to c581e7a Compare September 1, 2022 14:20
@peaBerberian peaBerberian added this to the 3.29.0 milestone Sep 5, 2022
@peaBerberian peaBerberian added Performance checks Performance tests are run on this issue / PR and removed Performance checks Performance tests are run on this issue / PR labels Sep 5, 2022
@peaBerberian peaBerberian merged commit 29149e4 into next Sep 9, 2022
peaBerberian added a commit that referenced this pull request Sep 9, 2022
Remove RxJS from the SegmentBuffer and related code
@peaBerberian peaBerberian deleted the misc/segment_buffer-no-rxjs branch August 13, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance checks Performance tests are run on this issue / PR Priority: 3 (Low) This issue or PR has a low priority. Refacto This Pull Request changes a lot of RxPlayer's code and/or logic SegmentBuffers Relative to the `SegmentBuffers` media buffers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant