YouTube嵌入的实时聊天无法在移动设备上运行(最近) [英] Youtube embed live chat is not working on mobile (recently)

查看:1056
本文介绍了YouTube嵌入的实时聊天无法在移动设备上运行(最近)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个网络应用程序,该应用程序依赖于YouTube的实时流和实时聊天(也来自YouTube).当突然嵌入的聊天功能无法在移动设备上运行时,情况变得非常好.

I'm working on a web app that depends on YouTube live streams and live chats (also from YouTube). Things went great, when suddently embeded chat refused to work on mobile devices.

我已经尝试在我这边找到一个错误或一些无效的配置,但是找不到.据我所知,当User-Agent标头中出现移动"语句时,带有聊天功能的iframe无法正确加载.

I've tried to found a bug or some invalid configuration on my side but I can't find one. As far as I know, iframe with chat is not loading properly when "Mobile" statement is present on User-Agent header.

这是未在移动设备上调用的请求

此图片显示聊天功能可以在移动设备上正常运行

同一窗口,但带有移动"标题

这很奇怪,因为当我将WebView中的User-Agent标头更改为桌面时,一次聊天就可以正常进行了:

It's very weird because when I changed the User-Agent header in WebView to Desktop one chat is working flawlessy:

带有桌面用户代理标头的Android WebView

似乎移动请求被阻止,台式机没有被阻止,但我不知道为什么.我找不到有关它的任何YouTube或Google声明.

It looks like mobile requests are blocked and desktop are not, but I don't know why. I couldn't find any Youtube or Google statement about it.

推荐答案

这似乎是由于YouTube上的用户为其频道选择了用户名"live_chat"而引起的,该用户名与YouTube自己的聊天嵌入代码冲突.

This seems to have been caused by a user on YouTube picking the username "live_chat" for their channel, which conflicted with YouTube's own chat embed code.

YouTube已在24小时内使用其反馈选项将问题报告给YouTube,并提供了用户频道的屏幕截图!

Having reported the problem to YouTube using their feedback option and including a screenshot of the user's channel, within 24 hours YouTube had fixed the issue!

现在可以在Android设备上嵌入YouTube的实时聊天,而无需在Chrome中请求网站的桌面版本或以任何方式更改用户代理!

Now embedding YouTube's live chat works on Android devices without the need to request the desktop version of the site in Chrome or alter the user-agent in any way!

这篇关于YouTube嵌入的实时聊天无法在移动设备上运行(最近)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆