Android应用程序不连接到PEERJS服务器

发布于 2025-01-27 04:18:53 字数 312 浏览 4 评论 0 原文

我正在研究一个项目,将Android应用流摄像头制作到另一个我使Peerjs Server与HTML和Java网站一起使用的应用我的Android即使我的计算机和电话都在同一wifi上(我看不到client connect in emulator上的同一应用程序),它也不会连接到PEERJS服务器),我什至尝试使用移动热点并连接他们 。

代码正在用来

peer = new peer (userId, {
host: '192.168.91.3',
port: '8000',
path: '/myapp'}

提前连接THX :)

am working on a project to make android app stream camera to another app i made peerjs server to work with html and java website then used webview to use it in the app on the emulator everything is working but the problem is when i install the app on my android it doesn't connect to the peerjs server even when both my computer and phone are on the same wifi ( i don't see client connect like when i use the same app on the emulator ) i even tried using mobile hotspot and connect them .

The code am using to connect

peer = new peer (userId, {
host: '192.168.91.3',
port: '8000',
path: '/myapp'}

Thx in advance :)

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

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

发布评论

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

评论(1

世俗缘 2025-02-03 04:18:53

我遇到了同样的问题,终于找到了解决我的问题的解决方案,我认为您的问题可以通过以下行解决:

android:usecleartexttraffic =“ true”

将其添加到应用程序标签中的subtest.xml中。

我在这两个站点中找到了答案:

如何连接到Android 10 的远程服务器

I had the same problem and finally found a solution for my problem and I think your problem can be solved with this line:

android:usesClearTextTraffic="true"

add this to your Manifest.xml in application tag.

I found my answer in this two sites:
https://www.pdftron.com/documentation/android/faq/uses-clear-text-traffic/,
how connect to remote server in android 10

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