import React, { Component, CSSProperties } from 'react'; import flvjs from 'flv.js'; export declare const FLV_EVENT: Readonly; export interface VideoPlayerProps { className: string; style?: CSSProperties; type: string; isLive?: boolean; cors?: boolean; withCredentials?: boolean; playId?: number; hasAudio?: boolean; hasVideo?: boolean; duration?: number; filesize?: number; url?: string; autoPlay?: boolean; onCreat?: any; /** * @see https://github.com/Bilibili/flv.js/blob/master/docs/api.md#config */ config: object; } export default class VideoPlayer extends Component { state: { curPlayUrl: string; shouldReinit: boolean; }; flvPlayer: any; videoElement: null; static getDerivedStateFromProps: (nextProps: { url?: any; playId?: any; }, prevState: { curPlayUrl?: any; playId?: any; }) => { playId: any; curPlayUrl: any; shouldReinit: boolean; } | null; initFlv: ($video: null) => void; componentWillUnmount(): void; componentDidUpdate(): void; render(): React.JSX.Element; }