Repository URL to install this package:
Version:
0.9.6 ▾
|
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: {
autoPlay: boolean;
muted: any;
loop: boolean;
controls: boolean;
isPaused: any;
src: string[];
preload: string;
className: string;
};
updateRef(): void;
static getDerivedStateFromProps(nextProps: VideoProps): {
isForcingPlayPause: boolean;
isPlaying: boolean;
};
componentDidUpdate(): void;
render(): JSX.Element;
}
export { VideoPlayer };
export default VideoPlayer;