This commit is contained in:
parent
0ce146f89d
commit
0af708f4ba
@ -21,18 +21,23 @@ WebRTCClientPage::WebRTCClientPage() : Wt::WTemplate(tr("Wt.WebRTC.Home")) {
|
||||
addStyleClass("bulma-is-flex-grow-1 bulma-is-flex bulma-is-flex-direction-column");
|
||||
auto localId = randomId(4);
|
||||
bindNew<Wt::WLabel>("localId")->setText(localId);
|
||||
auto offerId = bindNew<Wt::WLineEdit>("offerId");
|
||||
|
||||
auto textBrowser = bindNew<Wt::WTextArea>("textBrowser");
|
||||
textBrowser->setReadOnly(true);
|
||||
|
||||
auto offerId = bindNew<Wt::WLineEdit>("offerId");
|
||||
offerId->setDisabled(true);
|
||||
|
||||
auto offerBtn = bindNew<Wt::WPushButton>("offerBtn");
|
||||
offerBtn->setText("Offer");
|
||||
offerBtn->setDisabled(true);
|
||||
|
||||
auto sendMsg = bindNew<Wt::WLineEdit>("sendMsg");
|
||||
sendMsg->setDisabled(true);
|
||||
|
||||
auto sendBtn = bindNew<Wt::WPushButton>("sendBtn");
|
||||
sendBtn->setText("发送");
|
||||
sendBtn->setDisabled(true);
|
||||
|
||||
std::string url = "ws://127.0.0.1:8081/api/v1/webrtc/signal";
|
||||
|
||||
|
@ -2,15 +2,22 @@
|
||||
<messages>
|
||||
<message id="Wt.WebRTC.Home">
|
||||
<h1 class="bulma-subtitle bulma-has-text-centered">WebRTC 测试</h1>
|
||||
ID: ${localId}
|
||||
<br/>
|
||||
${textBrowser}
|
||||
<h2 class="bulma-subtitle bulma-is-6">通过信令服务器发送 offer</h2>
|
||||
${offerId type="text" placeholder="remote ID" disabled="true" }
|
||||
${offerBtn disabled="true"}
|
||||
<br/>
|
||||
<div class="bulma-block">
|
||||
ID: ${localId}
|
||||
</div>
|
||||
${textBrowser class="bulma-textarea bulma-is-flex-grow-1"}
|
||||
<h2 class="bulma-subtitle bulma-is-6 bulma-has-text-right bulma-mt-4">通过信令服务器发送 offer</h2>
|
||||
|
||||
<div class="bulma-field bulma-has-addons bulma-has-addons-right">
|
||||
<div class="bulma-control">
|
||||
${offerId class="bulma-input" type="text" placeholder="remote ID" disabled="true" }
|
||||
</div>
|
||||
<div class="bulma-control">
|
||||
${offerBtn class="bulma-button bulma-is-info" disabled="true"}
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="bulma-subtitle bulma-is-6">通过 DataChannel 发送消息</h2>
|
||||
<div class="bulma-field bulma-has-addons">
|
||||
<div class="bulma-field bulma-has-addons bulma-mb-6">
|
||||
<div class="bulma-control bulma-is-expanded">
|
||||
${sendMsg class="bulma-input" type="text" placeholder="message" disabled="true" }
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user