Skip to content

Commit

Permalink
Refresh video source on component update (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
live-memories-info committed Jun 30, 2021
1 parent e6e7f11 commit ab0ec17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ class Cropper extends React.Component<CropperProps, State> {
? this.containerRef.addEventListener('wheel', this.onWheel, { passive: false })
: this.clearScrollEvent()
}
if (prevProps.video !== this.props.video) {
this.videoRef?.load()
}
}

// this is to prevent Safari on iOS >= 10 to zoom the page
Expand Down

0 comments on commit ab0ec17

Please sign in to comment.