YouTube视频有时返回不可用

发布于 2025-01-24 21:19:40 字数 371 浏览 2 评论 0原文

在WordPress网站上,我们在产品页面上显示了一些视频。 没有任何规律性,就有一个“视频不可用”消息。我希望我们能得到一些帮助,以弄清楚这是可能的。以下是我们遇到的错误,这并没有提供大量的信息。

我已经有点排除了版权是问题,因为这并不是不断地发生,并且在随机时刻发生。间隔。

“ debug_error”:“ {\” errorcode \“:\” auth \“,\” errordetail \“:\” 0 \“ 0 \”,\“ errormessage \”:\“ deze deze deze Video是niet beschikbaar \” “ yk \”:\“ \”,\“ xi \”:\“ 0; a6s.0 \”,\“ ab \ \”:2}“:2}”,

On a wordpress website we are showing some video's on product pages.
Without any regularity there is a "video not available" message. I was hoping we could get some help figuring out any way this is possible. Below is the error we are getting, which doesnt provide a lot of inofrmation.

I already kind of ruled out the copyright to be the issue, since this is not constantly and happens at random moment & intervals.

"debug_error": "{\"errorCode\":\"auth\",\"errorDetail\":\"0\",\"errorMessage\":\"Deze video is niet beschikbaar\",\"yk\":\"\",\"xI\":\"0;a6s.0\",\"aB\":2}",

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

愛放△進行李 2025-01-31 21:19:40

自从它如此随机发生以来,我不得不调试这个问题一个星期。不知道是什么原因造成的,但是我为此而做了什么是更改现有事件功能以检查错误代码,然后在我们调用Play Event之前停止视频。

function onPlayerReady(event) {
    var data = event.target.playerInfo.videoData;
    if (data.errorCode == "auth") {
        event.target.stopVideo();
    }
    event.target.playVideo();
}

OnPlayerReady是我们在现有活动中所说的,如options.events.onready。
这只能进行一次检查,因为如果视频不加载,我不想锤击YouTube。

这是一个非常严重的问题,我似乎也找不到更多信息。验证错误将指出与身份验证有关的内容,但是我们可以使用我们拥有并专门启用嵌入的视频,据我所知,IFRAME API不需要任何API键即可使用。

I've had to debug this issue for a week since it happened so randomly. No idea what causes it, but what I did to get around it was altering the onReady event function to check the errorCode, and then stop the video before we call the play event.

function onPlayerReady(event) {
    var data = event.target.playerInfo.videoData;
    if (data.errorCode == "auth") {
        event.target.stopVideo();
    }
    event.target.playVideo();
}

onPlayerReady is what we call on the onReady event, as in options.events.onReady.
This only does the check once, since I did not want to hammer Youtube if a video doesn't load.

It is a very aggravating problem and I can't seem to find any more info on it either. An auth error would point to something authentication related, but we get this with videos we own and specifically enabled for embedding, and as far as I know the iframe api does not require any api keys to use.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文