UNPKG

@fluentui/react-northstar

Version:
46 lines (45 loc) 2.24 kB
import * as PropTypes from 'prop-types'; import * as React from 'react'; import { Accessibility, VideoBehaviorProps } from '@fluentui/accessibility'; import { UIComponentProps } from '../../utils'; import { FluentComponentStaticProps } from '../../types'; export interface VideoProps extends UIComponentProps { /** * Accessibility behavior if overridden by the user. */ accessibility?: Accessibility<VideoBehaviorProps>; /** Whether the video should start playing when rendered. Autoplay videos must be muted or they will not play immediately in certain browers like Chrome. */ autoPlay?: boolean; /** Whether to display the native video controls. */ controls?: boolean; /** Whether the video should automatically restart after it ends. */ loop?: boolean; /** Whether the video should be allowed to play audio. */ muted?: boolean; /** Image source URL for when video isn't playing. */ poster?: string; /** Video source URL. */ src?: string; } export declare const videoClassName = "ui-video"; export declare type VideoStylesProps = Required<Pick<VideoProps, 'variables'>>; /** * A Video provides ability to embed video content. */ export declare const Video: (<TExtendedElementType extends React.ElementType<any> = "video">(props: React.RefAttributes<HTMLVideoElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof VideoProps> & { as?: TExtendedElementType; } & VideoProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<VideoProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<VideoProps & { as: "video"; }>; displayName?: string; readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLVideoElement> & Omit<Pick<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "key" | keyof React.VideoHTMLAttributes<HTMLVideoElement>> & { ref?: React.Ref<HTMLVideoElement>; }, "as" | keyof VideoProps> & { as?: "video"; } & VideoProps; } & FluentComponentStaticProps<VideoProps>;