问题描述
我正在尝试构建一个可嵌入的视频框架以在其他页面上显示视频内容。视频本身是从某个位置提供的,使用 <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>
可以指定多个来源。
但无论我尝试过什么,我似乎都无法绕过 CORB .. 这是类似于 CORS 的服务器问题吗?我是否需要在服务器中的某处添加一些东西才能以这种方式显示?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)