diff --git a/example/src/MP4Page.tsx b/example/src/MP4Page.tsx index b7564ab0..6b300689 100644 --- a/example/src/MP4Page.tsx +++ b/example/src/MP4Page.tsx @@ -70,6 +70,7 @@ const App = () => { key={query.key} autoplay={query.autoplay !== '0'} sources={'hls' in query ? hlsSources : sources} + crossOrigin="anonymous" localeConfig={{ 'zh-Hans': { 'quality-ld': { diff --git a/packages/griffith/src/components/Player.tsx b/packages/griffith/src/components/Player.tsx index 89389dc5..4b9ad92f 100644 --- a/packages/griffith/src/components/Player.tsx +++ b/packages/griffith/src/components/Player.tsx @@ -86,6 +86,7 @@ type InnerPlayerProps = { hideCover?: boolean noWriteDocTitle?: boolean layerContent?: React.ReactNode + crossOrigin?: string | undefined } // 仅供 Provider 使用的属性 @@ -143,6 +144,7 @@ const InnerPlayer: React.FC = ({ hideCover, noWriteDocTitle, layerContent, + crossOrigin, }) => { const {emitEvent, subscribeAction} = useContext(InternalMessageContext) const {currentSrc, sources} = useContext(VideoSourceContext) @@ -634,6 +636,7 @@ const InnerPlayer: React.FC = ({