@@ -1,14 +1,10 @@
-body {
- margin: 0;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
- 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
- sans-serif;
+.App {
+ margin-top: 60px;
+ font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-}
-
-.App {
text-align: center;
+ color: #2c3e50;
}
.room {
@@ -26,7 +26,9 @@
<button id="leaveRoomBtn">离开房间</button>
</div>
<br/>
- <a href="https://github.com/ucloud/urtc-sdk-web" target="_blank">API 文档请看这里</a>
+ <a href="https://github.com/ucloud/urtc-sdk-web" target="_blank" rel="noopener noreferrer">
+ API 文档请看这里
+ </a>
<script type="text/javascript" src="https://ucloud.github.io/urtc-sdk-web/lib/index.js"></script>
<script type="text/javascript" src="js/config.js"></script>
@@ -161,6 +161,8 @@ window.onload = function () {
},
init: function () {
+ this.renderRoomId();
+
const token = UCloudRTC.generateToken(AppId, AppKey, RoomId, UserId);
this.client = new UCloudRTC.Client(AppId, token);
@@ -3,11 +3,11 @@
"version": "1.0.0",
"description": "UCloud RTC 纯 JS 版本的 demo",
"scripts": {
- "start": "npx serve . -p 3000"
+ "start": "npx serve . -p 3001"
"author": "",
"license": "MIT",
"dependencies": {
"serve": "^11.2.0"
+}