Skip to content

fix: seek jump back to current time#22

Merged
luwes merged 1 commit intomainfrom
fix-seek-jump
Sep 23, 2025
Merged

fix: seek jump back to current time#22
luwes merged 1 commit intomainfrom
fix-seek-jump

Conversation

@luwes
Copy link
Copy Markdown
Collaborator

@luwes luwes commented Sep 23, 2025

This change fixes the jump back to current time issue in a comparable way for React and HTML.

@luwes luwes requested a review from Copilot September 23, 2025 19:54
@luwes luwes self-assigned this Sep 23, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a jump back issue in time range components by tracking seeking time to prevent the slider from jumping back to current time while seeking is in progress.

  • Adds seeking time tracking using refs in React and instance variables in HTML components
  • Implements logic to use seeking time instead of current time when seek operation hasn't completed
  • Updates both React and HTML implementations to maintain consistent behavior

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/react/react/src/components/TimeRange.tsx Adds seeking time tracking with useRef and updates slider fill logic
packages/html/html/src/components/media-time-range.ts Implements seeking time tracking and updates state management
packages/core/media-store/src/state-mediators/index.ts Fixes import path for temporal module
packages/core/media-store/src/media-store.ts Fixes import path for temporal module
packages/core/media-store/src/index.ts Fixes export path for temporal module

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +50 to +53
_setState(state: any): void {
this._state = { ...this._state, ...state };
this._update(useTimeRangeRootProps(this._state!, this), this._state!);
}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter type any is too broad and provides no type safety. Consider defining a proper interface for the state parameter to ensure type safety and better developer experience.

Copilot uses AI. Check for mistakes.
@@ -119,24 +130,32 @@ export class TimeRangeRootBase extends HTMLElement {
}

_update(props: any, state: any): void {
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameters props and state have type any which eliminates type safety. Consider defining proper interfaces for these parameters.

Copilot uses AI. Check for mistakes.
@luwes luwes merged commit a3f9630 into main Sep 23, 2025
@luwes luwes deleted the fix-seek-jump branch September 23, 2025 20:26
@github-actions github-actions bot mentioned this pull request Oct 24, 2025
@github-actions github-actions bot mentioned this pull request Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants