File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
client/web/src/components/Markdown Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -44,12 +44,20 @@ export const Markdown: React.FC<{
4444 preview = { true }
4545 />
4646 ) ,
47+ iframe : ( props ) => {
48+ let src = props . src ;
49+ if ( src && src . includes ( '?' ) ) {
50+ src += '&autoplay=0' ; // make sure media autoplay is false
51+ }
52+ return < iframe { ...props } src = { src } /> ;
53+ } ,
4754 style : ( ) => < div > { t ( '不支持自定义样式' ) } </ div > ,
4855 meta : ( ) => < div > { t ( '不支持自定义Meta' ) } </ div > ,
4956 } ) ,
5057 [ ]
5158 ) ;
52-
59+ // [md]<iframe src="//player.bilibili.com/player.html?isOutside=true&aid=113350126076732&bvid=BV1ZpyHYkEQ3&cid=26409569922&p=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>[/md]
60+ // <iframe src="//player.bilibili.com/player.html?isOutside=true&aid=113350126076732&bvid=BV1ZpyHYkEQ3&cid=26409569922&p=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>
5361 return (
5462 < ReactMarkdown
5563 className = "tailchat-markdown"
You can’t perform that action at this time.
0 commit comments