Skip to content

Commit

Permalink
fix(Timeline): render nothing if duration is 0 or Infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
timaramazanov committed Jul 1, 2024
1 parent 8727af3 commit 4bedbc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class VideoContainer extends LitElement {
case "loadeddata":
dispatch(this, Types.Action.updateDuration, {
initialized: true,
duration: getVideoDuration(video),
duration: getVideoDuration(video)
});
break;
case "ratechange":
Expand Down
2 changes: 1 addition & 1 deletion src/components/video-timeline/Video-timeline.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class VideoTimeline extends DependentPropsMixin(LitElement) {
render() {
const disabled = this.disabled || !this.canPlay;

if (!this.duration) return nothing
if (!this.duration || this.duration === Infinity) return nothing

return html`
<video-slider
Expand Down

0 comments on commit 4bedbc8

Please sign in to comment.