refactor: improve goView iframe detection and video defaults

This commit is contained in:
clawdbot 2026-01-28 03:13:02 +08:00
parent 499aafcaab
commit 437193787b
2 changed files with 10 additions and 2 deletions

View File

@ -496,7 +496,7 @@ function NodeView(props: {
src={node.props.src} src={node.props.src}
width={rect.w} width={rect.w}
height={rect.h} height={rect.h}
autoPlay={node.props.autoplay ?? true} autoPlay={node.props.autoplay ?? false}
playsInline playsInline
loop={node.props.loop ?? false} loop={node.props.loop ?? false}
muted={node.props.muted ?? false} muted={node.props.muted ?? false}

View File

@ -124,7 +124,15 @@ function isIframe(c: GoViewComponentLike): boolean {
// keep the plain 'web' check last; it's broad and may overlap other widgets. // keep the plain 'web' check last; it's broad and may overlap other widgets.
k === 'web' || k === 'web' ||
k.endsWith('_web') || k.endsWith('_web') ||
k.startsWith('web_') k.startsWith('web_') ||
// common embed platforms (usually rendered in an <iframe>)
k.includes('youtube') ||
k.includes('youtu') ||
k.includes('vimeo') ||
k.includes('bilibili') ||
k.includes('youku') ||
k.includes('tencent') ||
k.includes('iqiyi')
); );
} }