import { RenderTarget } from "../../core/types"; import { Plugin } from "../types"; import { IStatsInfosV1, IWebRTCConnectOption } from "./reducers/types"; import { IControlPluginMap } from "../controller"; import MaskPlugin from "../mask"; import SpinnerPlugin from "../spinner"; import VideoPlugin from "../video"; import ModalPlugin from "../modal"; import PlayerPanel from "./panel"; import { IPlayerPluginEventMap } from "./event"; import PtzPlugin from "../ptz"; import { CreateIntercomUtils, MikeButton } from "../../components/subComponent/mikeButton"; import { IPuOption } from "../../main"; import { IRecorderConfig } from "src/utils/webmContainerUtils"; import { IWatermarkConfig } from "../watermark"; export declare enum PLAYER_MODES { DIRECT = "direct", PLUGIN = "plugin", REJECT = "reject" } declare enum DIRECT_SUPPORT_TYPES { MP4 = "MP4", FLAC = "FLAC", OGG = "OGG", WEBM = "WEBM", AUTO = "AUTO" } declare enum PLUGIN_SUPPORT_TYPES { WEBRTC = "WEBRTC", "WS-BVRTC" = "WS-BVRTC" } interface IVideoOption { url?: string; type?: keyof typeof DIRECT_SUPPORT_TYPES | keyof typeof PLUGIN_SUPPORT_TYPES; } export interface IVideoFits { contain: string; fill: string; } interface IPluginOption { webrtc?: IWebRTCConnectOption; } interface IPlayerConfig { autoPlay: boolean; enableController: boolean; disabledControls?: (keyof IControlPluginMap)[]; videoFit: keyof IVideoFits; } export interface IPlayerPluginOptions { video: IVideoOption; pluginOption: IPluginOption; playerConfig: Partial; direct: string; puOptions: IPuOption; recorderConfig?: IRecorderConfig; watermark?: IWatermarkConfig; } declare class PlayerPlugin extends Plugin { private _mode; private _videoOption?; private _pluginOption?; private _playerConfig; private _puOptions?; private _video; private _spinner; private _toast; private _mask; private _watermark; private _panel?; private _infoModal; private _recordState; private _timer; private _lastTotalReceivedBytes; private _webrtcConnect?; readonly ptz: PtzPlugin; mikeBtn?: MikeButton; constructor(options?: Partial); private justifyVideoType; private _restrictPlayerMode; init(): RenderTarget; get mode(): PLAYER_MODES; get pluginOption(): IPluginOption | undefined; get video(): VideoPlugin; get spinner(): SpinnerPlugin; get mask(): MaskPlugin; get infoModal(): ModalPlugin; get panel(): PlayerPanel | undefined; play(muted?: boolean): Promise; pause(): void; mute(muted?: boolean): void; setProductRemoteSdp(productRemoteSdp: (localDescription: RTCSessionDescription) => Promise): void; prepareWebrtc(): Promise; close(): Promise; protected beforeDestroy(): void; private loadPlayerConfig; intercomUtils?: ReturnType; startIntercom(): Promise; stopIntercom(): void; screenShot(): Promise; setVolume(percent: number): void; private DisplayVolumn; recordStart(): void; recordStop(): void; private initEvents; private prepare; private prepareDirect; private closeWebrtc; showMediaStaticInfo({ audio, video, meta }: IStatsInfosV1): Promise; private _getStatsInfosV1?; set statsInfosV1(val: (() => Promise) | undefined); get statsInfosV1(): (() => Promise) | undefined; refreshInfoModal(): Promise; togglePtz(): Promise; enableCanvas(enable: boolean, captureStream?: () => MediaStream): void; replaceCanvas(canvas: HTMLCanvasElement): void; setVideoFit(fit: keyof IVideoFits): void; fullscreen(): void; } export default PlayerPlugin;