import React, { Component, EventHandler, HTMLAttributes, MutableRefObject, SyntheticEvent } from 'react';
import { CloudinaryVideo } from '@cloudinary/url-gen';
import { HtmlVideoLayer, Plugins, VideoPoster, VideoSources } from '@cloudinary/html';
declare type ReactEventHandler<T = Element> = EventHandler<SyntheticEvent<T>>;
interface VideoProps extends HTMLAttributes<HTMLVideoElement> {
    cldVid: CloudinaryVideo;
    cldPoster?: VideoPoster;
    plugins?: Plugins;
    sources?: VideoSources;
    innerRef?: ((instance: any) => void) | MutableRefObject<unknown> | null;
    useFetchFormat?: boolean;
    controls?: boolean;
    loop?: boolean;
    muted?: boolean;
    poster?: string;
    preload?: string;
    autoPlay?: boolean;
    playsInline?: boolean;
    onPlay?: ReactEventHandler<any>;
    onLoadStart?: ReactEventHandler<any>;
    onPlaying?: ReactEventHandler<any>;
    onError?: ReactEventHandler<any>;
    onEnded?: ReactEventHandler<any>;
}
/**
 * @memberOf ReactSDK
 * @type {Component}
 * @description The Cloudinary video component.
 * @prop {CloudinaryVideo} transformation Generated by @cloudinary/url-gen
 * @prop {Plugins} plugins Advanced image component plugins lazyload()
 * @prop videoAttributes Optional attributes include controls, loop, muted, poster, preload, autoplay
 * @prop videoEvents Optional video events include play, loadstart, playing, error, ended
 * @prop {VideoSources} sources Optional sources to generate
 * @example
 *  <caption>
 *  Using custom defined resources.
 * </caption>
 * const vid = new CloudinaryVideo('dog', {cloudName: 'demo'});
 * const videoEl = useRef();
 * const sources = [
 *  {
 *    type: 'mp4',
 *    codecs: ['vp8', 'vorbis'],
 *    transcode: videoCodec(auto())
 *  },
 *  {
 *    type: 'webm',
 *    codecs: ['avc1.4D401E', 'mp4a.40.2'],
 *    videoCodec: videoCodec(auto())
 *  }];
 *
 * return <AdvancedVideo cldVid={vid} sources={sources} ref={videoEl} controls />
 */
declare class AdvancedVideo extends Component<VideoProps> {
    videoRef: MutableRefObject<HTMLVideoElement | null>;
    htmlVideoLayerInstance: HtmlVideoLayer;
    constructor(props: VideoProps);
    /**
     * On mount, creates a new HTMLVideoLayer instance and initializes with ref to video element,
     * user generated cloudinaryVideo and the plugins to be used.
     */
    componentDidMount(): void;
    /**
     * On update, we cancel running plugins and update the video instance if the src
     * was changed.
     */
    componentDidUpdate(): void;
    /**
     * On unmount, we cancel the currently running plugins.
     */
    componentWillUnmount(): void;
    /**
     * Returns video attributes.
     */
    getVideoAttributes(): {};
    /**
     * Attach both this.videoRef and props.innerRef as ref to the given element.
     * @param element - the element to attach a ref to
     */
    attachRef(element: HTMLVideoElement): void;
    render(): React.JSX.Element;
}
export { AdvancedVideo };
