Skip to content

Commit

Permalink
どうしようもないヤツだけ以外は対応
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Dec 2, 2024
1 parent f504209 commit eafe263
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 21 deletions.
5 changes: 2 additions & 3 deletions examples/messaging/main.mts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ document.addEventListener('DOMContentLoaded', async () => {
if (statsDiv && statsReportJsonDiv) {
let statsHtml = ''
const statsReportJson: Record<string, unknown>[] = []
// biome-ignore lint/complexity/noForEach: <explanation>
statsReport.forEach((report) => {
for (const report of statsReport.values()) {
statsHtml += `<h3>Type: ${report.type}</h3><ul>`
const reportJson: Record<string, unknown> = { id: report.id, type: report.type }
for (const [key, value] of Object.entries(report)) {
Expand All @@ -74,7 +73,7 @@ document.addEventListener('DOMContentLoaded', async () => {
}
statsHtml += '</ul>'
statsReportJson.push(reportJson)
})
}
statsDiv.innerHTML = statsHtml
// データ属性としても保存(オプション)
statsDiv.dataset.statsReportJson = JSON.stringify(statsReportJson)
Expand Down
5 changes: 2 additions & 3 deletions examples/recvonly/main.mts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (statsDiv && statsReportJsonDiv) {
let statsHtml = ''
const statsReportJson: Record<string, unknown>[] = []
// biome-ignore lint/complexity/noForEach: <explanation>
statsReport.forEach((report) => {
for (const report of statsReport.values()) {
statsHtml += `<h3>Type: ${report.type}</h3><ul>`
const reportJson: Record<string, unknown> = { id: report.id, type: report.type }
for (const [key, value] of Object.entries(report)) {
Expand All @@ -52,7 +51,7 @@ document.addEventListener('DOMContentLoaded', () => {
}
statsHtml += '</ul>'
statsReportJson.push(reportJson)
})
}
statsDiv.innerHTML = statsHtml
// データ属性としても保存(オプション)
statsDiv.dataset.statsReportJson = JSON.stringify(statsReportJson)
Expand Down
5 changes: 2 additions & 3 deletions examples/replace_track/main.mts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ document.addEventListener('DOMContentLoaded', async () => {
if (statsDiv && statsReportJsonDiv) {
let statsHtml = ''
const statsReportJson: Record<string, unknown>[] = []
// biome-ignore lint/complexity/noForEach: <explanation>
statsReport.forEach((report) => {
for (const report of statsReport.values()) {
statsHtml += `<h3>Type: ${report.type}</h3><ul>`
const reportJson: Record<string, unknown> = { id: report.id, type: report.type }
for (const [key, value] of Object.entries(report)) {
Expand All @@ -77,7 +76,7 @@ document.addEventListener('DOMContentLoaded', async () => {
}
statsHtml += '</ul>'
statsReportJson.push(reportJson)
})
}
statsDiv.innerHTML = statsHtml
// データ属性としても保存(オプション)
statsDiv.dataset.statsReportJson = JSON.stringify(statsReportJson)
Expand Down
5 changes: 2 additions & 3 deletions examples/sendonly/main.mts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ document.addEventListener('DOMContentLoaded', async () => {
if (statsDiv && statsReportJsonDiv) {
let statsHtml = ''
const statsReportJson: Record<string, unknown>[] = []
// biome-ignore lint/complexity/noForEach: <explanation>
statsReport.forEach((report) => {
for (const report of statsReport.values()) {
statsHtml += `<h3>Type: ${report.type}</h3><ul>`
const reportJson: Record<string, unknown> = { id: report.id, type: report.type }
for (const [key, value] of Object.entries(report)) {
Expand All @@ -51,7 +50,7 @@ document.addEventListener('DOMContentLoaded', async () => {
}
statsHtml += '</ul>'
statsReportJson.push(reportJson)
})
}
statsDiv.innerHTML = statsHtml
// データ属性としても保存(オプション)
statsDiv.dataset.statsReportJson = JSON.stringify(statsReportJson)
Expand Down
5 changes: 2 additions & 3 deletions examples/sendonly_audio/main.mts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ document.addEventListener('DOMContentLoaded', async () => {
if (statsDiv && statsReportJsonDiv) {
let statsHtml = ''
const statsReportJson: Record<string, unknown>[] = []
// biome-ignore lint/complexity/noForEach: <explanation>
statsReport.forEach((report) => {
for (const report of statsReport.values()) {
statsHtml += `<h3>Type: ${report.type}</h3><ul>`
const reportJson: Record<string, unknown> = { id: report.id, type: report.type }
for (const [key, value] of Object.entries(report)) {
Expand All @@ -56,7 +55,7 @@ document.addEventListener('DOMContentLoaded', async () => {
}
statsHtml += '</ul>'
statsReportJson.push(reportJson)
})
}
statsDiv.innerHTML = statsHtml
// データ属性としても保存(オプション)
statsDiv.dataset.statsReportJson = JSON.stringify(statsReportJson)
Expand Down
5 changes: 2 additions & 3 deletions examples/sendrecv/main.mts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ document.addEventListener('DOMContentLoaded', async () => {
if (statsDiv && statsReportJsonDiv) {
let statsHtml = ''
const statsReportJson: Record<string, unknown>[] = []
// biome-ignore lint/complexity/noForEach: <explanation>
statsReport.forEach((report) => {
for (const report of statsReport.values()) {
statsHtml += `<h3>Type: ${report.type}</h3><ul>`
const reportJson: Record<string, unknown> = { id: report.id, type: report.type }
for (const [key, value] of Object.entries(report)) {
Expand All @@ -71,7 +70,7 @@ document.addEventListener('DOMContentLoaded', async () => {
}
statsHtml += '</ul>'
statsReportJson.push(reportJson)
})
}
statsDiv.innerHTML = statsHtml
// データ属性としても保存(オプション)
statsDiv.dataset.statsReportJson = JSON.stringify(statsReportJson)
Expand Down
5 changes: 2 additions & 3 deletions examples/simulcast/main.mts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (statsDiv && statsReportJsonDiv) {
let statsHtml = ''
const statsReportJson: Record<string, unknown>[] = []
// biome-ignore lint/complexity/noForEach: <explanation>
statsReport.forEach((report) => {
for (const report of statsReport.values()) {
statsHtml += `<h3>Type: ${report.type}</h3><ul>`
const reportJson: Record<string, unknown> = { id: report.id, type: report.type }
for (const [key, value] of Object.entries(report)) {
Expand All @@ -89,7 +88,7 @@ document.addEventListener('DOMContentLoaded', () => {
}
statsHtml += '</ul>'
statsReportJson.push(reportJson)
})
}
statsDiv.innerHTML = statsHtml
// データ属性としても保存(オプション)
statsDiv.dataset.statsReportJson = JSON.stringify(statsReportJson)
Expand Down

0 comments on commit eafe263

Please sign in to comment.