视频html标签上的CORB错误阻止显示视频内容



我正在尝试构建一个可嵌入的视频帧,以在其他页面上显示视频内容。视频本身是从某个位置提供的,使用<iframe></iframe>播放效果很好,但我希望这个特定的视频构建能够针对不同的src,这就是为什么我想用视频html标签而不是iframe 来构建它

<video width="320" height="240" controls autoPlay>
<source src="https://embed.truthcasting.com/video/100003694/208448" type="video/mp4"/>
Your browser does not support the video tag.
</video>

问题是CORB错误,但是如果我从iframe 提供相同的内容

<iframe
style={{ height: "25rem", width: "100%" }}
scrolling="no"
src="https://embed.truthcasting.com/video/100003694/208448"
webkitallowfullscreen="true"
mozallowfullscreen="true"
allow="autoplay; fullscreen;encrypted-media;"></iframe>

内容将通过,没有CORB错误。现在通常我不会介意,我只会使用iframe来显示内容,但我希望使用<video>可以指定多个源。

但不管我怎么努力,我似乎都绕不过去。。这是类似于CORS的服务器问题吗?我是否需要在服务器中的某个位置添加一些内容,以便以这种方式显示?

videohtml标签需要一个实际的视频,提供给html标签的srcurl是播放视频的外部网站的url,但它本身不是实际的视频。它在<iframe>上工作的原因是iframe将显示网页,而<video>不会。

最新更新