Comments (3)
Nice! There is definitely a bug in that logic.
Still, your resolution does not seem to return what is expected in some situations:
for the following cues:
const cues = [
{ start: 1, end: 2, element: {} },
{ start: 2, end: 3, element: {} },
{ start: 3, end: 4, element: {} },
{ start: 4, end: 5, element: {} }
];
getCuesBefore
is defined as returning all cues strictly before a given time, so it should do:
const before1 = getCuesBefore(cues, 3);
// before1 should only contain the first two cues, as 3-to-4 is not strictly before 3
const before2 = getCuesBefore(cues, 3.5);
// before1 should only contain the first two cues, as 3-to-4 is not strictly before 3.5
But with your modifications, both will include the third cue as their start is inferior or equal to the given time.
I've worked on an implementation that should work (PR #450).
I've written some tests to ensure that it works correctly in all cases.
from rx-player.
Good job! +1 for the tests.
from rx-player.
This issue should be resolved in the v3.10.3
from rx-player.
Related Issues (20)
- Is there a way to catch/handle a fatal error? HOT 8
- Support for DASH thumbnails HOT 2
- Inconsistency in v4.0.0-beta.0 release note example for DASH `endNumber` attribute handling HOT 1
- Feature Request: Use Document Picture-in-Picture Web API HOT 2
- INCOMPATIBLE_KEYSYSTEMS error using DASH/Widevine on Panasonic 2019 HOT 16
- Expose text adaptation's role HOT 4
- Support in-manifest LAURL for ClearKey HOT 4
- Streams media error on Edge HOT 4
- Segment GCed multiple times in a row warnings using DASH/PlayReady on Vestel MB211 HOT 6
- DISCONTINUITY_ENCOUNTERED errors after consecutive audio track switches, for DASH live content, result in an endless loop HOT 2
- KEY_GENERATE_REQUEST_ERROR - The initDataType parameter is empty (observed on Tizen 2017) HOT 7
- Video playback issues on Android Mobile in Chrome HOT 9
- Check Dolby Atmos and Dolby Vision in current stream HOT 3
- Unable to play some streams in Edge browser on RxPlayer v3.30.0 HOT 11
- Streams freeze on first frame with audio only playback on Edge browser (and probably Chrome) HOT 6
- Safari 17 brings MSE to iOS HOT 10
- Some DASH/Widevine streams are looping on a Vestel MB130 HOT 3
- First playback of PlayReady content fails on EDGE browsers HOT 3
- PIPELINE_ERROR_DECODE error observed in Edge browser when zapping live channels HOT 2
- Safari 17.1 issue with playback DRM content HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rx-player.