我在 github 中的问题: https ://github.com/webrtc/apprtc/issues/615 我无法为信号服务器配置 apprtc,只需通过 wifi 调用视频即可,但通过移动网络没有运气。请查看我的配置,我在任何地方都找不到 constands.py 的任何示例。这是我的配置:
ICE_SERVER_OVERRIDE = [
{
"urls": [
"stun:stun.l.google.com:19302"
]
},
{
"urls": [
"turn:my_ip_address:3478?transport=udp"
],
"username": "my_account",
"credential": "password"
},
{
"urls": [
"turn:my_ip_address:3479?transport=udp"
],
"username": "my_account",
"credential": "password"
}
]
TURN_SERVER_OVERRIDE = [
{
"urls": "turn:my_ip_address:3478",
"username": "my_account",
"credential": "password"
},
{
"urls": "stun:stun.l.google.com:19302"
}
]
TURN_BASE_URL = 'http://my_url.com'
TURN_URL_TEMPLATE = '%s/turn?username=%s&key=%s'
CEOD_KEY = ''
ICE_SERVER_BASE_URL = 'http://my_url.com'
ICE_SERVER_URL_TEMPLATE = '%s/v1alpha/iceconfig?key=%s'
ICE_SERVER_API_KEY = os.environ.get('ICE_SERVER_API_KEY')
对撞机实例信息常量中的字典键。
WSS_INSTANCE_HOST_KEY = 'my_ip_address:8443'
WSS_INSTANCE_NAME_KEY = 'wsserver-std'
WSS_INSTANCE_ZONE_KEY = 'us-central1-a'
WSS_INSTANCES = [{
WSS_INSTANCE_HOST_KEY: 'my_ip_address:8443',
WSS_INSTANCE_NAME_KEY: 'wsserver-std',
WSS_INSTANCE_ZONE_KEY: 'us-central1-a'
}, {
WSS_INSTANCE_HOST_KEY: 'apprtc-ws-2.webrtc.org:443',
WSS_INSTANCE_NAME_KEY: 'wsserver-std-2',
WSS_INSTANCE_ZONE_KEY: 'us-central1-f'
}]
WSS_HOST_PORT_PAIRS = [ins[WSS_INSTANCE_HOST_KEY]
When I run it, my apprtc return error:
WebSocket open error: WebSocket error.
So, I don't understand what keys mean:
WSS_INSTANCE_HOST_KEY: 'my_ip_address:8443',
WSS_INSTANCE_NAME_KEY: 'wsserver-std',
WSS_INSTANCE_ZONE_KEY: 'us-central1-a'
当我在原始代码中更改为默认值时,它只能通过 Wifi 工作,没有移动网络工作,我还在端口 3478 中运行 turnserver,在 8443 中使用 pem 文件运行 collinder。所以任何人都可以告诉我如何成功测试collinder和turnserver配置以进行移动连接?