diff --git a/packages/griffith/src/components/Player.tsx b/packages/griffith/src/components/Player.tsx index 1cc82f73..4c6f0078 100644 --- a/packages/griffith/src/components/Player.tsx +++ b/packages/griffith/src/components/Player.tsx @@ -34,6 +34,7 @@ import Video from './Video' import Controller from './Controller' import VolumeItem from './items/VolumeItem' import MinimalTimeline from './MinimalTimeline' +import Layer from './Layer' import getBufferedTime from '../utils/getBufferedTime' import formatDuration from '../utils/formatDuration' import storage from '../utils/storage' @@ -81,6 +82,7 @@ type InnerPlayerProps = { hideMobileControls?: boolean hideCover?: boolean noWriteDocTitle?: boolean + layerContent?: React.ReactNode } // 仅供 Provider 使用的属性 @@ -136,6 +138,7 @@ const InnerPlayer: React.FC = ({ hideMobileControls, hideCover, noWriteDocTitle, + layerContent, }) => { const {emitEvent, subscribeAction} = useContext(InternalMessageContext) const {currentSrc} = useContext(VideoSourceContext) @@ -691,6 +694,7 @@ const InnerPlayer: React.FC = ({ )} {controlsOverlay} + {layerContent && {layerContent}} {error && (