Repository URL to install this package:
|
Version:
2.7.3 ▾
|
import React from 'react';
import { VideoTypes as VideoProps } from './typings';
interface VideoRef extends React.RefObject<HTMLVideoElement> {
current: HTMLVideoElement;
value?: HTMLVideoElement;
}
/**
* @type { HTMLMediaElement }
* @todo - merge with OneGallery/VideoPlayer - this one does not embedded url/youtube
* https://www.youtube.com/watch?v=r21CMDyPuGo
* @todo - allow borderless iframe inserting
* @example <iframe data-reactid="26" frameborder="0" allowfullscreen="1" gesture="media" allow="encrypted-media" title="YouTube video player" width="100%" height="100%" src="https://www.youtube.com/embed/51SmzJzu-PI?autoplay=0&playsinline=1&showinfo=0&rel=0&iv_load_policy=3&controls=0&start=0&origin=http%3A%2F%2Ftruthdubstep.audio&enablejsapi=1&widgetid=1" id="widget2"></iframe>
*/
declare class VideoPlayer extends React.PureComponent<VideoProps> {
dom: VideoRef;
static defaultProps: {
shouldAutoPlay: boolean;
muted: undefined;
shouldLoop: boolean;
enableControls: boolean;
isPaused: undefined;
src: string[];
preload: string;
className: string;
};
updateRef(): void;
/**
* try this https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops
* @todo if this does not work change it
*/
static getDerivedStateFromProps(nextProps: VideoProps): {
isForcingPlayPause: boolean;
isPlaying: boolean;
};
/**
* @todo @fixme
*/
componentDidUpdate(): void;
render(): JSX.Element;
}
export { VideoPlayer };
export default VideoPlayer;