无法从同一网络中的其他计算机访问apprtc

时间:2017-11-30 08:52:36

标签: webrtc apprtc apprtcdemo

我是webRtc的新手。我需要在我的本地机器上运行appRtc应用程序。我从github获得了代码库,并在我当地的ubuntu机器上成功运行。

使用我的电脑上的浏览器时,这些是日志

INFO     2017-11-30 09:00:18,966 api_server.py:205] Starting API server at: http://localhost:51242
WARNING  2017-11-30 09:00:18,976 inotify_file_watcher.py:196] There are too many directories in your application for changes in all of them to be monitored. You may have to restart the development server to see some changes to your files.
INFO     2017-11-30 09:00:18,976 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO     2017-11-30 09:00:18,978 admin_server.py:116] Starting admin server at: http://localhost:8000
INFO     2017-11-30 09:00:43,290 apprtc.py:93] Applying media constraints: {'video': {'mandatory': {}, 'optional': [{'minWidth': '1280'}, {'minHeight': '720'}]}, 'audio': True}
WARNING  2017-11-30 09:00:43,299 apprtc.py:137] Invalid or no value returned from memcache, using fallback: null
INFO     2017-11-30 09:00:43,370 module.py:788] default: "GET / HTTP/1.1" 200 8616
INFO     2017-11-30 09:00:43,430 module.py:788] default: "GET /callstats/callstats.min.js HTTP/1.1" 304 -
INFO     2017-11-30 09:00:43,433 module.py:788] default: "GET /css/main.css HTTP/1.1" 304 -
INFO     2017-11-30 09:00:43,491 module.py:788] default: "GET /js/apprtc.debug.js HTTP/1.1" 304 -
INFO     2017-11-30 09:00:47,736 apprtc.py:417] Added client 02588444 in room 490664053, retries = 0
INFO     2017-11-30 09:00:47,738 apprtc.py:93] Applying media constraints: {'video': {'mandatory': {}, 'optional': [{'minWidth': '1280'}, {'minHeight': '720'}]}, 'audio': True}
WARNING  2017-11-30 09:00:47,746 apprtc.py:137] Invalid or no value returned from memcache, using fallback: null
INFO     2017-11-30 09:00:47,748 apprtc.py:560] User 02588444 joined room 490664053
INFO     2017-11-30 09:00:47,751 apprtc.py:561] Room 490664053 has state ['02588444']
INFO     2017-11-30 09:00:47,902 module.py:788] default: "POST /join/490664053 HTTP/1.1" 200 1199
INFO     2017-11-30 09:00:49,820 apprtc.py:485] Saved message for client 02588444:{True, 1} in room 490664053, retries=0
INFO     2017-11-30 09:00:49,833 module.py:788] default: "POST /message/490664053/02588444 HTTP/1.1" 200 21
INFO     2017-11-30 09:00:49,880 apprtc.py:485] Saved message for client 02588444:{True, 2} in room 490664053, retries=0
INFO     2017-11-30 09:00:49,894 module.py:788] default: "POST /message/490664053/02588444 HTTP/1.1" 200 21
INFO     2017-11-30 09:00:49,930 apprtc.py:485] Saved message for client 02588444:{True, 3} in room 490664053, retries=0
INFO     2017-11-30 09:00:49,958 module.py:788] default: "POST /message/490664053/02588444 HTTP/1.1" 200 21
INFO     2017-11-30 09:00:49,970 apprtc.py:485] Saved message for client 02588444:{True, 4} in room 490664053, retries=0
INFO     2017-11-30 09:00:49,982 module.py:788] default: "POST /message/490664053/02588444 HTTP/1.1" 200 21
INFO     2017-11-30 09:00:50,074 apprtc.py:485] Saved message for client 02588444:{True, 5} in room 490664053, retries=0
INFO     2017-11-30 09:00:50,084 module.py:788] default: "POST /message/490664053/02588444 HTTP/1.1" 200 21

我可以在浏览器上打开apprtc应用程序。但我可以从同一网络中的任何其他机器进行访问。

这些是在同一网络中的任何其他PC上使用浏览器时的日志。

INFO     2017-11-30 08:55:06,749 api_server.py:205] Starting API server at: http://localhost:55410
    WARNING  2017-11-30 08:55:06,758 inotify_file_watcher.py:196] There are too many directories in your application for changes in all of them to be monitored. You may have to restart the development server to see some changes to your files.
    INFO     2017-11-30 08:55:06,759 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
    INFO     2017-11-30 08:55:06,760 admin_server.py:116] Starting admin server at: http://localhost:8000
    INFO     2017-11-30 08:55:10,582 apprtc.py:93] Applying media constraints: {'audio': True, 'video': {'optional': [{'minWidth': '1280'}, {'minHeight': '720'}], 'mandatory': {}}}
    WARNING  2017-11-30 08:55:10,589 apprtc.py:137] Invalid or no value returned from memcache, using fallback: null
    INFO     2017-11-30 08:55:10,636 module.py:788] default: "GET / HTTP/1.1" 200 8616
    INFO     2017-11-30 08:55:10,685 module.py:788] default: "GET /css/main.css HTTP/1.1" 200 6402
    INFO     2017-11-30 08:55:10,689 module.py:788] default: "GET /callstats/callstats.min.js HTTP/1.1" 200 245432
    INFO     2017-11-30 08:55:10,696 module.py:788] default: "GET /js/apprtc.debug.js HTTP/1.1" 200 101567
    INFO     2017-11-30 08:55:11,086 module.py:788] default: "GET /images/webrtc-icon-192x192.png HTTP/1.1" 200 31806
    INFO     2017-11-30 08:55:18,872 apprtc.py:417] Added client 26553344 in room 419183955, retries = 0
    INFO     2017-11-30 08:55:18,874 apprtc.py:93] Applying media constraints: {'audio': True, 'video': {'optional': [{'minWidth': '1280'}, {'minHeight': '720'}], 'mandatory': {}}}
    WARNING  2017-11-30 08:55:18,879 apprtc.py:137] Invalid or no value returned from memcache, using fallback: null
    INFO     2017-11-30 08:55:18,880 apprtc.py:560] User 26553344 joined room 419183955
    INFO     2017-11-30 08:55:18,881 apprtc.py:561] Room 419183955 has state ['26553344']
    INFO     2017-11-30 08:55:18,896 module.py:788] default: "POST /join/419183955 HTTP/1.1" 200 1203
    INFO     2017-11-30 08:55:24,331 module.py:788] default: "GET /images/webrtc-icon-192x192.png HTTP/1.1" 304 -
    INFO     2017-11-30 08:55:24,363 apprtc.py:485] Saved message for client 26553344:{True, 1} in room 419183955, retries=0
    INFO     2017-11-30 08:55:24,383 module.py:788] default: "POST /message/419183955/26553344 HTTP/1.1" 200 21
    INFO     2017-11-30 08:55:24,396 apprtc.py:485] Saved message for client 26553344:{True, 2} in room 419183955, retries=1
    INFO     2017-11-30 08:55:24,405 module.py:788] default: "POST /message/419183955/26553344 HTTP/1.1" 200 21
    INFO     2017-11-30 08:55:58,211 apprtc.py:455] Removed client 26553344 from room 419183955, retries=0
    INFO     2017-11-30 08:55:58,212 apprtc.py:494] Room 419183955 has state None
    INFO     2017-11-30 08:55:58,221 module.py:788] default: "POST /leave/419183955/26553344 HTTP/1.1" 200 -
    INFO     2017-11-30 08:55:59,071 module.py:788] default: "GET /r/ HTTP/1.1" 404 154
    INFO     2017-11-30 08:56:00,542 module.py:788] default: "GET /favicon.ico HTTP/1.1" 404 154

浏览器会显示一些错误消息,如

Failed to get access to local media. Error name was NotSupportedError. Continuing without sending a stream.

为什么会这样?我需要从其他电脑访问。这有可能吗?

1 个答案:

答案 0 :(得分:1)

请启用SSL。访问权限仅适用于SSL