sdk: broaden goView url detection for iframe/video

This commit is contained in:
clawdbot 2026-01-28 21:17:20 +08:00
parent 5f67a5bca1
commit 19279174e6

View File

@ -72,14 +72,26 @@ function pickUrlLikeInner(input: unknown, depth: number): string {
'path',
'source',
'address',
// snake_case aliases seen in some exporters
'src_url',
'source_url',
'play_url',
'iframe_url',
'iframe_src',
'video_url',
'video_src',
// some editors use page-ish naming
'pageUrl',
'pageSrc',
'page',
'documentUrl',
// iframe-ish HTML-in-URL fields (handled by iframe widget converter)
'srcdoc',
'srcDoc',
// common aliases
'srcUrl',
'sourceUrl',
@ -87,6 +99,7 @@ function pickUrlLikeInner(input: unknown, depth: number): string {
'file',
'fileUrl',
'fileSrc',
// iframe-ish
'iframeUrl',
'iframeSrc',
@ -95,9 +108,11 @@ function pickUrlLikeInner(input: unknown, depth: number): string {
'frameSrc',
'htmlUrl',
'htmlSrc',
// generic web-ish
'webUrl',
'webSrc',
// video-ish
'videoUrl',
'videoSrc',
@ -106,6 +121,7 @@ function pickUrlLikeInner(input: unknown, depth: number): string {
'mp4',
'm3u8',
'flv',
// other streaming-ish keys
'hls',
'hlsUrl',
@ -115,6 +131,7 @@ function pickUrlLikeInner(input: unknown, depth: number): string {
'rtspUrl',
'rtmp',
'rtmpUrl',
// camera-ish
'cameraUrl',
'cameraSrc',
@ -133,8 +150,12 @@ function pickUrlLikeInner(input: unknown, depth: number): string {
'option',
'options',
'props',
'style',
'attr',
'attrs',
'source',
'media',
// common list-ish wrappers for media sources
'sources',
'sourceList',
@ -142,12 +163,14 @@ function pickUrlLikeInner(input: unknown, depth: number): string {
'srcList',
'playList',
'playlist',
// other list-ish wrappers seen in low-code exports
'items',
'list',
'videos',
'videoList',
'iframelist',
// widget-ish wrappers seen in exports
'iframe',
'video',