88 href ="https://fonts.googleapis.com/css2?family=Oxygen:wght@300;400;700&display=swap "
99 rel ="stylesheet "
1010 />
11- < link href ="../../libs/toastify.css " rel ="stylesheet " / >
11+ < link href ="../../libs/toastify.css " rel ="stylesheet " type =" text/css " >
1212 < title > Data Messages</ title >
13+ < script src ="../../util/i18n.js " defer > </ script >
1314 < script src ="../../components/header.js " defer > </ script >
15+ < script src ="../../components/params-form.js " defer > </ script >
16+ < script src ="../../components/invite-section.js " defer > </ script >
17+ < script src ="../../components/video-views.js " defer > </ script >
1418 < script
1519 src ="https://cdn-go.cn/aegis/aegis-sdk/latest/aegis.min.js "
1620 defer
2024 src ="https://web.sdk.qcloud.com/trtc/webrtc/v5/dist/trtc.js "
2125 defer
2226 > </ script >
23- < script src ="../../libs/toastify-js.js "> </ script >
27+ < script src ="../../libs/toastify-js.js " defer > </ script >
2428 < script src ="../../libs/clipboard.min.js " defer > </ script >
2529 < script src ="../../util/utils.js " defer > </ script >
2630 < script src ="./script.js " defer > </ script >
2933 < header-nav > </ header-nav >
3034 < main >
3135 < div class ="feature-container ">
32- < h1 style ="color: #1c66e5 "> Data Messages</ h1 >
36+ < h1 style ="color: #1c66e5 " data-i18n ="dataMessages.title "> Data Messages</ h1 >
37+ < params-form > </ params-form >
3338 < section >
34- < h3 > Step-1: Fill in the blanks</ h3 >
35- < span class ="note "
36- > Get SDKAppId and SDKSecretKey from
37- < a
38- target ="_top "
39- href ="https://console.trtc.io/?quickclaim=engine_trial "
40- > TRTC Console</ a
41- >
42- </ span >
43- < span class ="warning "
44- > Note: This demo is for demonstration purposes only. Before official
45- launch, please migrate SDKSecretKey and the UserSig calculation code
46- to your own backend server to avoid unauthorized traffic use caused
47- by the key leakage.
48- < a target ="_top " href ="https://trtc.io/document/35166 "
49- > View Documents</ a
50- > </ span
51- >
52- < div class ="input-list ">
53- < div class ="input-group ">
54- < label for ="sdk-app-id "> SDKAppId</ label >
55- < input
56- id ="sdk-app-id "
57- type ="number "
58- class ="form-control "
59- placeholder ="SDKAppId "
60- />
61- </ div >
62- < div class ="input-group ">
63- < label for ="sdk-secret-key "> SDKSecretKey</ label >
64- < input
65- id ="sdk-secret-key "
66- type ="text "
67- class ="form-control "
68- placeholder ="SDKSecretKey "
69- />
70- </ div >
71- </ div >
72- < div class ="input-list ">
73- < div class ="input-group ">
74- < label for ="user-id "> UserId</ label >
75- < input id ="user-id " type ="text " class ="form-control " />
76- </ div >
77- < div class ="input-group ">
78- < label for ="room-id "> RoomId</ label >
79- < input id ="room-id " type ="number " class ="form-control " />
80- </ div >
81- </ div >
82- </ section >
83- < section >
84- < h3 > Step-2: Enter the room and activate remote stream</ h3 >
39+ < h3 > < span class ="step-badge "> 2</ span > < span data-i18n ="dataMessages.enterAndActivate "> Enter the room and activate remote stream</ span > </ h3 >
8540 < div class ="btn-list ">
8641 < button id ="enter-btn " class ="btn " onclick ="enterRoom() ">
87- < span class ="btn-text "> Enter Room</ span >
42+ < span class ="btn-text " data-i18n =" common.enterRoom " > Enter Room</ span >
8843 </ button >
8944 < button id ="exit-btn " class ="btn " onclick ="exitRoom() " disabled >
90- < span class ="btn-text "> Exit Room</ span >
45+ < span class ="btn-text " data-i18n =" common.exitRoom " > Exit Room</ span >
9146 </ button >
9247 </ div >
93- < div class ="invite-container ">
94- < span class ="note "
95- > Copy the link to send invitation. Each link can only invite one
96- person, and the link will be updated after being copied.</ span
97- >
98- < div class ="copy ">
99- < button id ="invite-btn " data-clipboard-target ="#invite-url ">
100- < img
101- src ="https://web.sdk.qcloud.com/trtc/webrtc/v5/demo/samples/icons/clippy.svg "
102- width ="12px "
103- height ="12px "
104- alt ="Copy to clipboard "
105- />
106- </ button >
107- < input id ="invite-url " class ="invite-input " readonly />
108- </ div >
109- </ div >
48+ < invite-section id ="invite-section-el "> </ invite-section >
11049 </ section >
11150 < section >
112- < h3 > Step-3: Send custom message</ h3 >
51+ < h3 > < span class =" step-badge " > 3 </ span > < span data-i18n =" dataMessages.sendCustomMessage " > Send custom message</ span > </ h3 >
11352 < div class ="message-container ">
11453 < input
11554 type ="text "
@@ -123,50 +62,41 @@ <h3>Step-3: Send custom message</h3>
12362 onclick ="sendCustomMessage() "
12463 disabled
12564 >
126- < span class ="btn-text "> Send</ span >
65+ < span class ="btn-text " data-i18n =" dataMessages.send " > Send</ span >
12766 </ button >
12867 </ div >
12968 </ section >
13069 < section >
131- < h3 > Step-4: Start video and send SEI message</ h3 >
70+ < h3 > < span class =" step-badge " > 4 </ span > < span data-i18n =" dataMessages.startVideoAndSei " > Start video and send SEI message</ span > </ h3 >
13271 < div class ="btn-list ">
13372 < button
13473 id ="start-video-btn "
13574 class ="btn "
13675 onclick ="startLocalVideo() "
13776 disabled
13877 >
139- < span class ="btn-text "> Start Local Video</ span >
78+ < span class ="btn-text " data-i18n =" common.startLocalVideo " > Start Local Video</ span >
14079 </ button >
14180 < button
14281 id ="stop-video-btn "
14382 class ="btn "
14483 onclick ="stopLocalVideo() "
14584 disabled
14685 >
147- < span class ="btn-text "> Stop Local Video</ span >
86+ < span class ="btn-text " data-i18n =" common.stopLocalVideo " > Stop Local Video</ span >
14887 </ button >
14988 < button
15089 id ="send-SEI-message-btn "
15190 class ="btn "
15291 onclick ="sendSEIMessage() "
15392 disabled
15493 >
155- < span class ="btn-text "> Send SEI Message</ span >
94+ < span class ="btn-text " data-i18n =" dataMessages.sendSeiMessage " > Send SEI Message</ span >
15695 </ button >
15796 </ div >
15897 </ section >
15998 </ div >
160- < div class ="video-container ">
161- < div class ="video-sub-container ">
162- < h2 > Local Video</ h2 >
163- < div id ="local-video-view " class ="video-view "> </ div >
164- </ div >
165- < div class ="video-sub-container ">
166- < h2 > Remote Video</ h2 >
167- < div id ="remote-video-view " class ="video-view "> </ div >
168- </ div >
169- </ div >
99+ < video-views > </ video-views >
170100 </ main >
171101 </ body >
172102</ html >
0 commit comments