-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat(FEC-11979): add setCurrentTime middleware #641
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I suggest @semarche-kaltura will use this PR locally and check if it works perfect for us before merging
_setCurrentTime(to: number): void { | ||
if (this._engine) { | ||
if (Utils.Number.isNumber(to)) { | ||
let boundedTo = to; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let boundedTo = to; | |
const boundedTo = to < 0 ? 0 : boundedTo; |
if (boundedTo > safeDuration) { | ||
boundedTo = safeDuration; | ||
} | ||
this._engine.currentTime = boundedTo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this._engine.currentTime = boundedTo; | |
this._engine.currentTime = Math.min(boundedTo, safeDuration); |
Co-authored-by: Sivan Agranov <[email protected]>
Description of the Changes
add setCurrentTime middleware
add support for middleware params chaining
Solves FEC-11979
CheckLists