2
0

index.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <!DOCTYPE html>
  2. <!--
  3. * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
  4. *
  5. * Use of this source code is governed by a BSD-style license
  6. * that can be found in the LICENSE file in the root of the source
  7. * tree.
  8. -->
  9. <html>
  10. <head>
  11. <meta charset="utf-8">
  12. <meta name="description" content="WebRTC code samples">
  13. <meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1, maximum-scale=1">
  14. <meta itemprop="description" content="Client-side WebRTC code samples">
  15. <meta itemprop="image" content="./images/webrtc-icon-192x192.png">
  16. <meta itemprop="name" content="WebRTC code samples">
  17. <meta name="mobile-web-app-capable" content="yes">
  18. <meta id="theme-color" name="theme-color" content="#ffffff">
  19. <base target="_blank">
  20. <title>Trickle ICE</title>
  21. <link rel="icon" sizes="192x192" href="./images/webrtc-icon-192x192.png">
  22. <link href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" type="text/css">
  23. <link rel="stylesheet" href="css/main.css"/>
  24. </head>
  25. <body>
  26. <div id="container">
  27. <h1>Turn服务功能测试</h1>
  28. <h2>测试步骤:</h2>
  29. <section>
  30. <p>1. 填写TURN URI,格式为<strong>turn:IP或URL:3478</strong>,比如野火IM提供的测试服务是 turn:turn.wildfirechat.cn:3478。</p>
  31. <p>2. 填写您的TURN服务的用户名和密码,比如野火IM提供的测试服务器用户名和密码是wfchat:wfchat1。
  32. </p>
  33. <p>3. 点击添加按钮,提交TURN服务信息,提交成功后,TURN服务框中会列有您刚添加的turn服务信息。</p>
  34. <p>4. 如果有多余的TURN服务,可以选中然后点删除按钮来删除。</p>
  35. <p>5. 点击<strong>收集候选</strong>按钮,查看结果,当<strong><em>候选结果中出现relay,且IP地址为您的turn服务公网地址时,证明您的TURN服务部署成功,否则就是失败</em></strong>!</p>
  36. </section>
  37. <section id="iceServers">
  38. <h2>TURN服务</h2>
  39. <select id="servers" size="4">
  40. </select>
  41. <div>
  42. <label for="url">TURN URI:</label>
  43. <input id="url">
  44. </div>
  45. <div>
  46. <label for="username">TURN用户名:</label>
  47. <input id="username">
  48. </div>
  49. <div>
  50. <label for="password">TURN密码:</label>
  51. <input id="password">
  52. </div>
  53. <div>
  54. <button id="add">添加服务</button>
  55. <button id="remove">删除服务</button>
  56. <button id="reset">重置</button>
  57. </div>
  58. </section>
  59. <section id="iceOptions">
  60. <h2>ICE options</h2>
  61. <div id="iceTransports">
  62. <label for="transports"><span>IceTransports value:</span></label>
  63. <input type="radio" name="transports" value="all" id="all" checked>
  64. <span>all</span>
  65. <input type="radio" name="transports" value="relay" id="relay">
  66. <span>relay</span>
  67. </div>
  68. <div>
  69. <label>ICE Candidate Pool:</label>
  70. <span id="poolValue">0</span>
  71. <span class="gray">0</span>
  72. <input id="iceCandidatePool" type="range" min="0" max="10" value="0">
  73. <span class="gray">10</span>
  74. </div>
  75. </section>
  76. <section>
  77. <table id="candidates">
  78. <thead id="candidatesHead">
  79. <tr>
  80. <th>Time</th>
  81. <th>Component</th>
  82. <th>Type</th>
  83. <th>Foundation</th>
  84. <th>Protocol</th>
  85. <th>Address</th>
  86. <th>Port</th>
  87. <th>Priority</th>
  88. </tr>
  89. </thead>
  90. <tbody id="candidatesBody"></tbody>
  91. </table>
  92. <button id="gather">收集候选</button>
  93. <div id="error-note">Note: errors from onicecandidateerror above are not neccessarily fatal. For example an IPv6 DNS lookup may fail but relay candidates can still be gathered via IPv4.</div>
  94. <div id="error"></div>
  95. </section>
  96. </div>
  97. <script src="js/adapter-latest.js"></script>
  98. <script src="js/main.js" async></script>
  99. </body>
  100. </html>