Как настроить превращение сервера в исходный код приложения apprtc

Я новичок в webrtc. Я скачал текущую реализацию apprtc из git hub, и она развернута на моем облачном экземпляре.

После того, как я проверил с двумя машинами в моей локальной сети. это будет работать нормально. Но я получил ошибку при попытке потоковой передачи между двумя браузерами в другой сети, в консоли отобразится сообщение об ошибке.

это вывод консоли

Opening signaling channel.
apprtc.debug.js:1981 Error parsing json: <!DOCTYPE html>
<html>
  <head>
    <title>TURN Server</title>
  </head>
  <body>
    TURN Server
  </body>
</html>

apprtc.debug.js:703 Error parsing response JSON: <!DOCTYPE html>
<html>
  <head>
    <title>TURN Server</title>
  </head>
  <body>
    TURN Server
  </body>
</html>

apprtc.debug.js:775 Joined the room.
apprtc.debug.js:1946 XHR finished loading: GET "https://turn.bistri.com/turn?username=homeo&key=homeo".
(anonymous) @ apprtc.debug.js:1946
sendUrlRequest @ apprtc.debug.js:1927
sendAsyncUrlRequest @ apprtc.debug.js:1924
(anonymous) @ apprtc.debug.js:1955
requestTurnServers @ apprtc.debug.js:1953
Call.maybeGetTurnServers_ @ apprtc.debug.js:695
Call.requestMediaAndTurnServers_ @ apprtc.debug.js:512
Call @ apprtc.debug.js:508
AppController.createCall_ @ apprtc.debug.js:212
(anonymous) @ apprtc.debug.js:238
RoomSelection.loadRoom_ @ apprtc.debug.js:1353
RoomSelection.onJoinButton_ @ apprtc.debug.js:1342
apprtc.debug.js:1946 XHR finished loading: POST "https://manafcj.com/join/163581330".
(anonymous) @ apprtc.debug.js:1946
sendUrlRequest @ apprtc.debug.js:1927
sendAsyncUrlRequest @ apprtc.debug.js:1924
(anonymous) @ apprtc.debug.js:765
Call.joinRoom_ @ apprtc.debug.js:760
Call.connectToRoom_ @ apprtc.debug.js:649
Call.start @ apprtc.debug.js:518
AppController.finishCallSetup_ @ apprtc.debug.js:247
(anonymous) @ apprtc.debug.js:239
RoomSelection.loadRoom_ @ apprtc.debug.js:1353
RoomSelection.onJoinButton_ @ apprtc.debug.js:1342
apprtc.debug.js:679 Got access to local media with mediaConstraints:
  '{"audio":true,"video":{"mandatory":{},"optional":[{"minWidth":"1280"},{"minHeight":"720"}]}}'
apprtc.debug.js:310 User has granted access to local media.
apprtc.debug.js:1731 Signaling channel opened.
apprtc.debug.js:1780 Registering signaling channel.
apprtc.debug.js:1784 Signaling channel registered.
apprtc.debug.js:743 Starting signaling.
apprtc.debug.js:1043 Creating RTCPeerConnnection with:
  config: '{"iceServers":[]}';
  constraints: '{"optional":[]}'.
apprtc.debug.js:735 Created PeerConnectionClient
apprtc.debug.js:750 Adding local stream.

    apprtc.debug.js:1746 WSS->C: {"msg":"{\"type\":\"candidate\",\"label\":0,\"id\":\"audio\",\"candidate\":\"candidate:3403301412 1 udp 2122260223 10.12.0.114 59852 typ host generation 0 ufrag g7gm network-id 1\"}","error":""}

    apprtc.debug.js:1746 WSS->C: {"msg":"{\"type\":\"candidate\",\"label\":0,\"id\":\"audio\",\"candidate\":\"candidate:3908633170 1 udp 2122194687 192.168.43.43 58783 typ host generation 0 ufrag g7gm network-id 2 network-cost 10\"}","error":""}

    apprtc.debug.js:1168 Set remote session description success.
    apprtc.debug.js:285 Waiting for remote video.
    apprtc.debug.js:13 80.243: Remote candidate added successfully.
    apprtc.debug.js:13 80.247: Remote candidate added successfully.
    apprtc.debug.js:1226 Signaling state changed to: stable
    apprtc.debug.js:1235 ICE connection state changed to: checking
    apprtc.debug.js:302 Remote stream added.
    apprtc.debug.js:1235 ICE connection state changed to: failed

Это мои значения конфигурации apprtc

var constants = {
  LOOPBACK_CLIENT_ID: 'LOOPBACK_CLIENT_ID',
  TURN_BASE_URL: 'https://turn.bistri.com',
  TURN_URL_TEMPLATE: '%s/turn?username=%s&key=%s',
  CEOD_KEY: 'homeo',
  WSS_HOST_ACTIVE_HOST_KEY: 'wss_host_active_host', //memcache key for the active collider host.
  WSS_HOST_PORT_PAIRS: ['apprtc-ws.webrtc.org:443', 'apprtc-ws-2.webrtc.org:443'],
  RESPONSE_ERROR: 'ERROR',
  RESPONSE_UNKNOWN_ROOM: 'UNKNOWN_ROOM',
  RESPONSE_UNKNOWN_CLIENT: 'UNKNOWN_CLIENT',
  RESPONSE_ROOM_FULL: 'FULL',
  RESPONSE_DUPLICATE_CLIENT: 'DUPLICATE_CLIENT',
  RESPONSE_SUCCESS: 'SUCCESS',
  RESPONSE_INVALID_REQUEST: 'INVALID_REQUEST'

};

Это связано с включением URL сервера? Как решить эту проблему. любой свободный ход URL доступен для моего тестирования?

0 ответов

Другие вопросы по тегам