diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 023e6f2..905f515 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -32,7 +32,6 @@ jobs: with: node-version: ${{ matrix.node }} - uses: pnpm/action-setup@v4 - - run: pnpm --version - run: pnpm install - run: pnpm exec playwright install ${{ matrix.browser }} --with-deps - run: pnpm exec playwright test --project=${{ matrix.browser }} diff --git a/replace_track/index.html b/replace_track/index.html index b9dee40..3303f44 100644 --- a/replace_track/index.html +++ b/replace_track/index.html @@ -8,20 +8,12 @@
-

replaceTrack サンプル

- -
- - - -
+

replaceTrack サンプル

+

+ + + +

@@ -32,6 +24,7 @@

replaceTrack サンプル


     

+
diff --git a/sendrecv/main.ts b/sendrecv/main.ts index a6e82fc..bdce4b1 100644 --- a/sendrecv/main.ts +++ b/sendrecv/main.ts @@ -7,16 +7,6 @@ import Sora, { } from "sora-js-sdk"; import { generateJwt } from "../src/misc"; -const getVideoCodecType = (): VideoCodecType | undefined => { - const videoCodecTypeElement = - document.querySelector("#video-codec-type"); - const videoCodecType = videoCodecTypeElement?.value; - if (videoCodecType === "") { - return undefined; - } - return videoCodecType as VideoCodecType; -}; - document.addEventListener("DOMContentLoaded", async () => { const signalingUrl = import.meta.env.VITE_SORA_SIGNALING_URL; const channelIdPrefix = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || ""; @@ -37,6 +27,7 @@ document.addEventListener("DOMContentLoaded", async () => { }); await client.connect(stream); }); + document.querySelector("#disconnect")?.addEventListener("click", async () => { await client.disconnect(); }); @@ -123,15 +114,15 @@ class SoraClient { return this.connection.pc.getStats(); } - setOptions(options: ConnectionOptions) { - this.options = { ...this.options, ...options }; - } - private onnotify(event: SignalingNotifyMessage): void { if ( 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/tests/sendrecv.test.ts b/tests/sendrecv.test.ts index 0ad07d8..e0b5760 100644 --- a/tests/sendrecv.test.ts +++ b/tests/sendrecv.test.ts @@ -16,20 +16,20 @@ test("sendrecv x2", async ({ browser }) => { await sendrecv1.click("#connect"); await sendrecv2.click("#connect"); - // data-testid="connection-id" 要素が存在し、その内容が空でないことを確認するまで待つ + // "connection-id" 要素が存在し、その内容が空でないことを確認するまで待つ await sendrecv1.waitForSelector("#connection-id:not(:empty)"); - // data-testid="connection-id" 要素の内容を取得 + // "connection-id" 要素の内容を取得 const sendrecv1ConnectionId = await sendrecv1.$eval( "#connection-id", (el) => el.textContent, ); console.log(`sendrecv1 connectionId=${sendrecv1ConnectionId}`); - // data-testid="connection-id" 要素が存在し、その内容が空でないことを確認するまで待つ + // "connection-id" 要素が存在し、その内容が空でないことを確認するまで待つ await sendrecv2.waitForSelector("#connection-id:not(:empty)"); - // data-testid="connection-id" 要素の内容を取得 + // "connection-id" 要素の内容を取得 const sendrecv2ConnectionId = await sendrecv2.$eval( "#connection-id", (el) => el.textContent,