Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加载远程vtt字幕文件时,浏览器会报:“ Unsafe attempt to load URL aaa from frame with URL bbb ”错误,导致加载不了字幕 #25

Open
iamithunk opened this issue Mar 10, 2022 · 2 comments

Comments

@iamithunk
Copy link

iamithunk commented Mar 10, 2022

电脑网页观看视频,加载远程vtt字幕文件时,会出现Unsafe attempt to load URL aaa from frame with URL bbb 错误,加载不了字幕。但是同样的配置,换成videojs播放器是可以加载解析远程字幕的,且浏览器不会报错。

@muiplayer
Copy link
Owner

加载 vtt 字幕文件的网络资源

您好,请问 vtt 文件的网络资源地址是否与网站地址同源呢?如果域名非同源这可能是跨域导致的,请切换到同源地址后尝试。

请查阅:同源政策(CORS)、html5 video crossorigin

@iamithunk
Copy link
Author

iamithunk commented Mar 10, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants