Browse Source

[purejs demo] - 更新样式

kevin.song 6 years ago
parent
commit
638a716792

+ 4 - 8
examples/pureJS/css/index.css

@@ -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 {

+ 3 - 1
examples/pureJS/index.html

@@ -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>
     </div>
     <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>

+ 2 - 0
examples/pureJS/js/index.js

@@ -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);
 

+ 2 - 2
examples/pureJS/package.json

@@ -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"
   }
-}
+}