diff --git a/index.html b/index.html index a48c3ca..dbbec66 100644 --- a/index.html +++ b/index.html @@ -7,16 +7,20 @@
+

基本

+ +

その他

diff --git a/messaging/index.html b/messaging/index.html index ece0fc7..eadffa1 100644 --- a/messaging/index.html +++ b/messaging/index.html @@ -10,10 +10,21 @@

リアルタイムメッセージングサンプル

複数のブラウザで開いて sendMessage することで動作確認できます

-

sora-js-sdk version:

- -
-
+

+ + +
+

+

+ channel_id: + +
+ session_id: + +
+ connection_id: + +


@@ -26,9 +37,6 @@

sora-js-sdk version:

- - -

messaging

-
-
+

+ +


+    

diff --git a/replace_track/index.html b/replace_track/index.html index f748ef7..b9dee40 100644 --- a/replace_track/index.html +++ b/replace_track/index.html @@ -23,13 +23,15 @@

replaceTrack サンプル


- +
-
-
+

+ +


+    

diff --git a/sendonly/index.html b/sendonly/index.html index b651be3..5bfdf91 100644 --- a/sendonly/index.html +++ b/sendonly/index.html @@ -14,14 +14,17 @@

送信のみサンプル

+ channel_id: + +
session_id: - +
connection_id:

- +


diff --git a/sendrecv/index.html b/sendrecv/index.html
index 057fcd2..24c3ce6 100644
--- a/sendrecv/index.html
+++ b/sendrecv/index.html
@@ -14,14 +14,17 @@ 

送受信サンプル

+ channel_id: + +
session_id: - +
connection_id:

- +
diff --git a/sendrecv/main.ts b/sendrecv/main.ts index 13fbee7..a6e82fc 100644 --- a/sendrecv/main.ts +++ b/sendrecv/main.ts @@ -132,10 +132,6 @@ class SoraClient { event.event_type === "connection.created" && this.connection.connectionId === event.connection_id ) { - const channelIdElement = document.querySelector("#channel-id"); - if (channelIdElement) { - channelIdElement.textContent = this.channelId; - } const sessionIdElement = document.querySelector("#session-id"); if (sessionIdElement) { sessionIdElement.textContent = this.connection.sessionId; diff --git a/simulcast/index.html b/simulcast/index.html index 54294fc..31a5171 100644 --- a/simulcast/index.html +++ b/simulcast/index.html @@ -8,34 +8,48 @@
-

サイマルキャストサンプル

- - -
+

サイマルキャストサンプル

+

+ + +
+

+

+ channel_id: + +
+ session_id: + +
+ connection_id: + +

-

sendonly

+

送信のみ

- +
-

recvonly r0

+

受信のみ: r0

-

recvonly r1

+

受信のみ: r1

-

recvonly r2

+

受信のみ: r2

-
-
+

+ +


+    

diff --git a/simulcast/main.ts b/simulcast/main.ts index ecc4ba6..3836847 100644 --- a/simulcast/main.ts +++ b/simulcast/main.ts @@ -88,29 +88,18 @@ document.addEventListener("DOMContentLoaded", () => { document.querySelector("#get-stats")?.addEventListener("click", async () => { const statsReport = await sendonly.getStats(); - const statsDiv = document.querySelector("#stats-report") as HTMLElement; - const statsReportJsonDiv = document.querySelector("#stats-report-json"); - if (statsDiv && statsReportJsonDiv) { - let statsHtml = ""; - const statsReportJson: Record[] = []; - for (const report of statsReport.values()) { - statsHtml += `

Type: ${report.type}

"; - statsReportJson.push(reportJson); - } - statsDiv.innerHTML = statsHtml; - // データ属性としても保存(オプション) - statsDiv.dataset.statsReportJson = JSON.stringify(statsReportJson); + const statsReportJson: Record[] = []; + for (const report of statsReport.values()) { + statsReportJson.push(report); + } + const statsReportJsonElement = + document.querySelector("#stats-report-json"); + if (statsReportJsonElement) { + statsReportJsonElement.textContent = JSON.stringify( + statsReportJson, + null, + 2, + ); } }); }); @@ -251,11 +240,17 @@ class SimulcastRecvonlySoraClient { event.event_type === "connection.created" && event.connection_id === this.connection?.connectionId ) { - const localVideoConnectionId = document.querySelector( - `#remote-video-connection-id-${this.options.simulcastRid}`, - ); - if (localVideoConnectionId) { - localVideoConnectionId.textContent = `${event.connection_id}`; + const channelIdElement = document.querySelector("#channel-id"); + if (channelIdElement) { + channelIdElement.textContent = this.channelId; + } + const sessionIdElement = document.querySelector("#session-id"); + if (sessionIdElement) { + sessionIdElement.textContent = this.connection.sessionId; + } + const connectionIdElement = document.querySelector("#connection-id"); + if (connectionIdElement) { + connectionIdElement.textContent = this.connection.connectionId; } } } diff --git a/spotlight_sendrecv/index.html b/spotlight_sendrecv/index.html index e351b64..1a6b855 100644 --- a/spotlight_sendrecv/index.html +++ b/spotlight_sendrecv/index.html @@ -3,23 +3,34 @@ - Spotlight Sendrecv サンプル + スポットライト送受信サンプル
-

Spotlight Sendrecv サンプル

-
-
-

sendrecv

- -
-
- -
-
-
+

スポットライト送受信サンプル

+

+ + + +

+

+ channel_id: + +
+ session_id: + +
+ connection_id: + +

+ +
+

+ +


+