Skip to content

Commit

Permalink
fix: backward compatibility in 4.28.1 (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyzyl-ool authored Oct 23, 2023
1 parent 987f728 commit 51e8ceb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/components/ReactPlayer/ReactPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ interface PlayerPropgress {
played: number;
}

type ReactPlayerBlockRefType = ReactPlayerBlockHandler | undefined;
// eslint-disable-next-line react/display-name
export const ReactPlayerBlock = React.forwardRef<ReactPlayerBlockRefType, ReactPlayerBlockProps>(
export const ReactPlayerBlock = React.forwardRef<ReactPlayerBlockHandler, ReactPlayerBlockProps>(
(props, originRef) => {
const isMobile = useContext(MobileContext);
const {metrika} = useContext(MetrikaContext);
Expand Down
5 changes: 3 additions & 2 deletions src/models/components.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export type ArrowDirection = 'left' | 'right';

export interface ReactPlayerBlockHandler
extends Pick<HTMLVideoElement, 'play' | 'pause' | 'addEventListener'> {}
export type ReactPlayerBlockHandler =
| Pick<HTMLVideoElement, 'play' | 'pause' | 'addEventListener'>
| undefined;

0 comments on commit 51e8ceb

Please sign in to comment.