-
Notifications
You must be signed in to change notification settings - Fork 125
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
[DRAFT] Demo: store the settings in the url hash #1349
base: dev
Are you sure you want to change the base?
Commits on Feb 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 923fa25 - Browse repository at this point
Copy the full SHA 923fa25View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe5f68c - Browse repository at this point
Copy the full SHA fe5f68cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b684af - Browse repository at this point
Copy the full SHA 9b684afView commit details -
Configuration menu - View commit details
-
Copy full SHA for b7b26bf - Browse repository at this point
Copy the full SHA b7b26bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec9b355 - Browse repository at this point
Copy the full SHA ec9b355View commit details -
Configuration menu - View commit details
-
Copy full SHA for 232a588 - Browse repository at this point
Copy the full SHA 232a588View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09f1d67 - Browse repository at this point
Copy the full SHA 09f1d67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3517d09 - Browse repository at this point
Copy the full SHA 3517d09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d3bd64 - Browse repository at this point
Copy the full SHA 8d3bd64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 048564f - Browse repository at this point
Copy the full SHA 048564fView commit details -
[Proposal] Solution 1: PlaybackObserver is moved in
src
Root issue ---------- While working on code refactoring for better taking into account the new potentially multithread nature of the RxPlayer code (with some files only running in a WebWorker environment and others only running in a main thread environment), we recently refactored our file hierarchy (#1365) to better reflect that new situation. The idea is to make RxPlayer developpers more aware of what code is intended to run where. In that work, we had a remaining issue concerning the `PlaybackObserver`. This is the part of the code that is monitoring and advertising playback conditions to the rest of the RxPlayer code. Most core RxPlayer modules rely on it, in both main thread and WebWorker environments. The root issue is that the `PlaybackObserver` is a class and thus cannot be easily transmitted in-between environments (as the main thread and WebWorker only exchanges between one another through `postMessage` calls, which follows some rules preventing from doing that). As such, and only on a multithreaded scenario, the RxPlayer is serializing in some way the constructed source PlaybackObserver in the main thread to reconstruct one (the `WorkerPlaybackObserver`) on the worker. Because a whole complex PlaybackObserver-compatible structure has to both be constructed in the main thread and in the worker (yet only the main thread can act as the "true" source one, because the media element can only be accessed in main thread), we were asking ourselves where should we put the common utils (required by both the main thread and worker) needed to construct one (like the `ObservationPosition` class and the `generateReadOnlyObserver` util). Solution 1 ---------- This is a first solution proposal, which moves the `PlaybackObserver` directory outside of the `main_thread` and `core` directories. Instead, its code is now directly in `src/playback_observer`. This solution takes inspiration from the `src/mse` directory, which also exports both: 1. files intended to be imported when MSE API are present in the current environment (when in main thread or when in a WebWorker with the MSE-in-worker feature) and 2. files intended to be imported in environments without MSE. For example the `src/mse/main_media_source_interface.ts` should __ONLY__ be imported in environments with MSE capabilities. If you do not, you should import `src/mse/worker_media_source_interface.ts`. Likewise, I here added a `src/playback_observer/media_element_playback_observer.ts` file exporting a `MediaElementPlaybackObserver` structure (new name of the `PlaybackObserver`) which can only be imported in environements where the media element is available (so, only on main thread) and a `src/playback_observer/worker_playback_observer.ts` file which should only be imported in other environments. Doing this allows to easily share common utils, in a `src/playback_observer/utils` directory, without involving the rest of the RxPlayer code. Result ------ I'm quite happy with the result, though I get it may seem weird to have a complex core frequently-running logic part directly in `src` (and not in `main_thread` or `core` as was the norm) - though it is also the case of directories like `mse` or `transports`. RxPlayer code very rarely imported files inside other directories (which it does here with paths like `../playback_observer/media_element_playback_observer`) as a way to push better modularization. Though here it may seem like a feature because its unusual-ness forces the developper to double check if this is the right file that is imported.
Configuration menu - View commit details
-
Copy full SHA for 9d59746 - Browse repository at this point
Copy the full SHA 9d59746View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b11702 - Browse repository at this point
Copy the full SHA 1b11702View commit details -
Configuration menu - View commit details
-
Copy full SHA for adfd991 - Browse repository at this point
Copy the full SHA adfd991View commit details -
Configuration menu - View commit details
-
Copy full SHA for e091b24 - Browse repository at this point
Copy the full SHA e091b24View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e3847f - Browse repository at this point
Copy the full SHA 0e3847fView commit details -
Configuration menu - View commit details
-
Copy full SHA for cce5d0d - Browse repository at this point
Copy the full SHA cce5d0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 45351b6 - Browse repository at this point
Copy the full SHA 45351b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a9bca9 - Browse repository at this point
Copy the full SHA 6a9bca9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b9136fc - Browse repository at this point
Copy the full SHA b9136fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca61b54 - Browse repository at this point
Copy the full SHA ca61b54View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6a0300 - Browse repository at this point
Copy the full SHA b6a0300View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66fc6fe - Browse repository at this point
Copy the full SHA 66fc6feView commit details -
refactor: create a fn getRetryDelay and test it
maxDelay now restrict the value of the delay after that the fuzzFactor has been applied. This ensure that the returned delay is trully equal or inferior the the maxDelay. This would reduce from 3900ms to 3000ms the maxDefault based on our current config but updating the value does not seem necessary.
Configuration menu - View commit details
-
Copy full SHA for 300ae2a - Browse repository at this point
Copy the full SHA 300ae2aView commit details -
Don't re-load a Manifest's optional external resource each time if in…
…itial failed While doing some testing on `<UTCTiming>` elements in a DASH MPD, it has been brought to us that if attempts to load an URL linked to it for the initial fetch of the Manifest failed (in which case we fallback to a mode where we don't rely on that element) and if the Manifest has to be refreshed multiple times, then the URL will be accessed every time the Manifest is refreshed, even if just one sucessful attempt would be enough. The issue was very simple to fix, as it was just that a newly obtained `clockOffset` - the actual metadata derived from parsing an `<UTCTiming>` element, was just not actually copied when updating the base Manifest by its new parsed version. Once that `clockOffset` is set to the base Manifest, that information will be communicated to our Manifest parser when refreshed, so it won't retry to load the clock and continue relying on the one fetched before.
Configuration menu - View commit details
-
Copy full SHA for 1bc73c0 - Browse repository at this point
Copy the full SHA 1bc73c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3707906 - Browse repository at this point
Copy the full SHA 3707906View commit details -
fix(test): fix flaky test by changing timeout according to the
expected retryDelay
Configuration menu - View commit details
-
Copy full SHA for fe60ef2 - Browse repository at this point
Copy the full SHA fe60ef2View commit details -
Merge pull request #1370 from canalplus/fix/update-clock-offset
Don't re-load a Manifest's optional external resource each time if initial failed
Configuration menu - View commit details
-
Copy full SHA for e6a2a99 - Browse repository at this point
Copy the full SHA e6a2a99View commit details -
Configuration menu - View commit details
-
Copy full SHA for e729d9a - Browse repository at this point
Copy the full SHA e729d9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 441f91b - Browse repository at this point
Copy the full SHA 441f91bView commit details -
fix(types): remove IIFE to correctly export Player class type
exporting a class with an IIFE change the exported type of the class from "RxPlayer" to "typeof RxPlayer". That will provoke typechecking errors for applications that used "RxPlayer" as a type. This does NOT mess-up with the sideEffects config because the global overrides, such as "patchWebkitSourceBuffer()" are executed at the entry point for RxPlayer class (src/index and src/minimal).
Configuration menu - View commit details
-
Copy full SHA for 2632ab4 - Browse repository at this point
Copy the full SHA 2632ab4View commit details -
Merge pull request #1359 from canalplus/fix/flaky-test-get-license
fix(test): fix flaky test get_license
Configuration menu - View commit details
-
Copy full SHA for 8da7fb9 - Browse repository at this point
Copy the full SHA 8da7fb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1c605c - Browse repository at this point
Copy the full SHA c1c605cView commit details -
Merge pull request #1376 from canalplus/fix/error-ts-iife
fix(types): remove IIFE to correctly export Player class type
Configuration menu - View commit details
-
Copy full SHA for b8d11c9 - Browse repository at this point
Copy the full SHA b8d11c9View commit details -
fix circular dependencies issues.
Commit 2744e33 Reorganized the repo and introduce circular dependencies.
Configuration menu - View commit details
-
Copy full SHA for e28caad - Browse repository at this point
Copy the full SHA e28caadView commit details -
Merge pull request #1381 from canalplus/demo/fix-limit-video-res
fix(demo): text for limit video resolution updates when selecting another options
Configuration menu - View commit details
-
Copy full SHA for 0897199 - Browse repository at this point
Copy the full SHA 0897199View commit details -
Merge pull request #1383 from canalplus/fix/circular-dependencies-reorg
fix circular dependencies issues.
Configuration menu - View commit details
-
Copy full SHA for 6e9177f - Browse repository at this point
Copy the full SHA 6e9177fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c7d9175 - Browse repository at this point
Copy the full SHA c7d9175View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85a9856 - Browse repository at this point
Copy the full SHA 85a9856View commit details -
Configuration menu - View commit details
-
Copy full SHA for 552649d - Browse repository at this point
Copy the full SHA 552649dView commit details -
Configuration menu - View commit details
-
Copy full SHA for cc6a502 - Browse repository at this point
Copy the full SHA cc6a502View commit details
Commits on Feb 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a40526f - Browse repository at this point
Copy the full SHA a40526fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a5ed8f - Browse repository at this point
Copy the full SHA 5a5ed8fView commit details -
Merge pull request #1385 from canalplus/fix/canal-ps5-close-session
fix: workaround for ps5 to prevent error when closing persistent session
Configuration menu - View commit details
-
Copy full SHA for 8bf8876 - Browse repository at this point
Copy the full SHA 8bf8876View commit details
Commits on Feb 23, 2024
-
[POC]: Experiment with "txml" parser, to get rid of the DOMParser
Motivation ---------- Currently, we relied on our WebAssembly MPD parser for two different scenarios: 1. performance reasons (on **HUGE** MPD of tens of MB, with a lot of `SegmentTimeline` data to parse). Also Relying on WebAssembly here instead of DOM parsing led us to much less GC pressure which was also a big issue. 2. Multithread scenarios as the browser's own fast XML parser, `DOMParser`, is not usable in other threads. Though that second scenario only relied on the WebAssembly parser because it was already written before (and it was because of the first scenario). Nothing stops us from relying on a JavaScript MPD parser in Multithread mode, we only cannot use `DOMParser` there. Having to provide the WebAssembly code to the `MULTI_THREAD` feature is a little awkward. We recommend to applications that they use our "embedded" versions to make it more simple, though it weighs in the 400+KB. Even if it compresses very very well, it is still a huge file. It also turn out that WebAssembly is much more recent than the WebWorker API and as such we're currently not able to rely on the Multithread mode on very old devices like old smart TV models and old game consoles. Even worse, an issue in the `v4.0.0-rc.1` made us realize that a device might be compatible to WebAssembly but might fail to compile it for various reasons, leading to a fallback to main thread - it would be better to have a fallback to a JS Parser, like we already have on main thread today. It may even make Multithread-only RxPlayer builds (e.g. not having to import both monothread code and multithread code, just in case multithreading is not possible) much more doable, which [I guess almost everyone could prefer for their applications](https://caniuse.com/webworkers). Thus, relying on a JavaScript parser in a Multithread scenario could be a very nice feature. Previous work ------------- In a previous work (I never made the Pull Request for it yet), I compiled down the WebAssembly file to JavaScript (through binaryen's wasm2js util), but it involved a lot of manual maintainance so I quickly abandonned it (I may re-explore that way in the future). This could have been nice as it prevented adding yet another MPD parser to the codebase. I also made quick tests with dependencies like `fast-xml-parser` but performances appeared poor so I did not continue in this path. This solution ------------- To be perfectly honest, it was only after looking at some Shaka-player code that I noticed that they now rely on a "txml" dependency for their XML parsing. It's actually very recent: shaka-project/shaka-player@7116a34 (the recent-ness of it made me feel that I may be looking at their codebase a little too much ^^) and it seems to be on their side for performance reason - very interestingly. So I looked up that txml thing (repo available here: https://github.com/TobiasNickel/tXml/). It is a fairly minimal XML DOM parser with a specific focus on speed. It advertises speed competitive with the native DOMParser API and quite amazingly it actually was, sometimes it was even faster (though still slower than our WebAssembly parser). If this goes very well, we could even imagine doing like the Shaka-player and completely remove the DOMParser - even opening the way to also do things like parsing subtitles in a worker. For that, there is still a lot to do though. The code was a little hard to integrate through `npm` in a TypeScript client-side project (for various reasons) so I made the same choice than Shaka-player by completely copying its code (keeping the licence in the file) into `src/utils/xml-parser.ts`. I also had to update its code, this means that code updates on their side will have to be backported on ours. However, the code seems to not be much maintained anymore, so this is not that much of an issue. Remaining issues ---------------- There are some remaining issues: - First I did not yet add parsing for `EventStream` elements nor for `SegmentTimeline` elements yet. Both seems doable, and the latter will be the real-world test (as it can be incredibly huge on some contents). - From what I understand from TobiasNickel/tXml#44, It doesn't translate entities (like `>` to `>`). This doesn't seem to hard to implement though and is rarely important. Maybe others. There doesn't seem to be a lot of issues (but it doesn't seem to be a hugely-relied on project either) so I'll look at each of them in the future.
Configuration menu - View commit details
-
Copy full SHA for 71a25e3 - Browse repository at this point
Copy the full SHA 71a25e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4579511 - Browse repository at this point
Copy the full SHA 4579511View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe92987 - Browse repository at this point
Copy the full SHA fe92987View commit details -
Configuration menu - View commit details
-
Copy full SHA for dce924c - Browse repository at this point
Copy the full SHA dce924cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 69c1d83 - Browse repository at this point
Copy the full SHA 69c1d83View commit details -
Configuration menu - View commit details
-
Copy full SHA for c849efb - Browse repository at this point
Copy the full SHA c849efbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89f2e1c - Browse repository at this point
Copy the full SHA 89f2e1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9238d1a - Browse repository at this point
Copy the full SHA 9238d1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1707042 - Browse repository at this point
Copy the full SHA 1707042View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e07364 - Browse repository at this point
Copy the full SHA 5e07364View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66605c6 - Browse repository at this point
Copy the full SHA 66605c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4bf4fc8 - Browse repository at this point
Copy the full SHA 4bf4fc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3b92a1 - Browse repository at this point
Copy the full SHA f3b92a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6c2166 - Browse repository at this point
Copy the full SHA b6c2166View commit details -
Configuration menu - View commit details
-
Copy full SHA for fded006 - Browse repository at this point
Copy the full SHA fded006View commit details -
Merge pull request #1384 from canalplus/feat/txml
DASH: rely on "txml" parser for Multithreading usages
Configuration menu - View commit details
-
Copy full SHA for 753400e - Browse repository at this point
Copy the full SHA 753400eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0344cef - Browse repository at this point
Copy the full SHA 0344cefView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9cfe8d6 - Browse repository at this point
Copy the full SHA 9cfe8d6View commit details -
tests: perform exponential backoff in integration tests
This is an implementation of an idea we had in the past to speed up asynchronous tests. Those often depend on some timeout, with a timeout set very high (hundreds of milliseconds, sometimes seconds) to ensure a test pass even on the slowest machine running up our tests. This results in our integration tests taking a lot of time to finish (more than 30 minutes), even more considering that those are not parallelized, unlike our unit tests (and doing so is not straightforward because we rely on a dependency, mocha, as a test runner and on another, karma, as a browser launcher). To make it less long, we wondered if we could not rely on another strategy: 1. Perform the check almost immediately, on fast computers it has a chance of very quickly passing 2. If the check fails, wait some amount of time and re-perform the check. 3. If the check fails multiple times, it surely means that the current device is slow, so we'll wait a longer and longer delay before re-performing the check. 4. If the check still fails after some set time (or 4 seconds by default), fail the test. This is basically another implementation of an "exponential backoff" algorithm in the player (we already use this type of algorithm at several places in the player, like for media requests for example).
Configuration menu - View commit details
-
Copy full SHA for 60f1651 - Browse repository at this point
Copy the full SHA 60f1651View commit details
Commits on Feb 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7211b73 - Browse repository at this point
Copy the full SHA 7211b73View commit details
Commits on Feb 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for df4b05f - Browse repository at this point
Copy the full SHA df4b05fView commit details
Commits on Mar 4, 2024
-
Merge pull request #1393 from canalplus/fix/directfile-autoplay-infin…
…ite-spinner fix(directfile): media with autoplay:false is infinitly in loading state
Configuration menu - View commit details
-
Copy full SHA for 17c131a - Browse repository at this point
Copy the full SHA 17c131aView commit details -
Remove
isSafariMobile
mention frommain_thread
code.When doing some hotfixes for our v4.0.0 version, we directly integrated a browser detection check in the main code of the RxPlayer. The normal way for the RxPlayer of handling device compatibility, is to clearly list and document all differences in the `src/compat` directory, not directly in the main code. This commit fixes that by giving a name to that work-around, documentating it and moving it in the `src/compat` directory.
Configuration menu - View commit details
-
Copy full SHA for 4f91e78 - Browse repository at this point
Copy the full SHA 4f91e78View commit details
Commits on Mar 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0a54469 - Browse repository at this point
Copy the full SHA 0a54469View commit details
Commits on Mar 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e8a7671 - Browse repository at this point
Copy the full SHA e8a7671View commit details -
Merge pull request #1395 from canalplus/misc/remove-is-safari-mobile-…
…from-initial-seek-and-play Remove `isSafariMobile` mention from `main_thread` code.
Configuration menu - View commit details
-
Copy full SHA for 70c50d5 - Browse repository at this point
Copy the full SHA 70c50d5View commit details
Commits on Mar 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 026fb05 - Browse repository at this point
Copy the full SHA 026fb05View commit details -
Configuration menu - View commit details
-
Copy full SHA for c42c4b6 - Browse repository at this point
Copy the full SHA c42c4b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66e19b7 - Browse repository at this point
Copy the full SHA 66e19b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09aece7 - Browse repository at this point
Copy the full SHA 09aece7View commit details -
Configuration menu - View commit details
-
Copy full SHA for f4aecea - Browse repository at this point
Copy the full SHA f4aeceaView commit details -
Configuration menu - View commit details
-
Copy full SHA for bc4f508 - Browse repository at this point
Copy the full SHA bc4f508View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e176de - Browse repository at this point
Copy the full SHA 7e176deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e1d19e - Browse repository at this point
Copy the full SHA 2e1d19eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 12636d6 - Browse repository at this point
Copy the full SHA 12636d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f64b702 - Browse repository at this point
Copy the full SHA f64b702View commit details -
Configuration menu - View commit details
-
Copy full SHA for c7765b6 - Browse repository at this point
Copy the full SHA c7765b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c8aca2 - Browse repository at this point
Copy the full SHA 2c8aca2View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2e92fb - Browse repository at this point
Copy the full SHA b2e92fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for bda1349 - Browse repository at this point
Copy the full SHA bda1349View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f3c3d7 - Browse repository at this point
Copy the full SHA 1f3c3d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d176fb - Browse repository at this point
Copy the full SHA 6d176fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for ac519b0 - Browse repository at this point
Copy the full SHA ac519b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for e7685f2 - Browse repository at this point
Copy the full SHA e7685f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a7da65 - Browse repository at this point
Copy the full SHA 1a7da65View commit details
Commits on May 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c02bc4b - Browse repository at this point
Copy the full SHA c02bc4bView commit details