Skip to content

Commit

Permalink
すまない、レースだった
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Feb 21, 2024
1 parent df74106 commit 284c099
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions examples/e2ee/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ sendrecv.on('notify', (event) => {
`connectionId: ${sendrecv.connectionId}`
document.querySelector('#local-fingerprint').textContent =
`fingerprint: ${sendrecv.e2eeSelfFingerprint}`

return
}

if (event.event_type === 'connection.created') {
Expand All @@ -79,7 +77,7 @@ sendrecv.on('notify', (event) => {
})

document.querySelector('#start-sendrecv').addEventListener('click', async () => {
const mediaStream = await navigator.mediaDevices.getUserMedia({ audio: true, video: true })
const mediaStream = await navigator.mediaDevices.getUserMedia({ audio: false, video: true })
await sendrecv.connect(mediaStream)
document.querySelector('#sendrecv-local-video').srcObject = mediaStream
})
Expand Down
6 changes: 1 addition & 5 deletions tests/e2ee.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@playwright/test'

test.skip('e2ee sendrecv x2', async ({ browser }) => {
test('e2ee sendrecv x2', async ({ browser }) => {
// 新しいページを2つ作成
const page1 = await browser.newPage()
const page2 = await browser.newPage()
Expand All @@ -14,23 +14,19 @@ test.skip('e2ee sendrecv x2', async ({ browser }) => {

// #local-connection-id 要素が存在し、その内容が空でないことを確認するまで待つ
await page1.waitForSelector('#local-connection-id:not(:empty)')

// #local-connection-id 要素の内容を取得
const page1ConnectionId = await page1.$eval('#local-connection-id', (el) => el.textContent)
console.log(`e2ee-page1: connectionId=${page1ConnectionId}`)

// #local-fingerprint 要素が存在し、その内容が空でないことを確認するまで待つ
await page1.waitForSelector('#local-fingerprint:not(:empty)')
const page1Fingerprint = await page1.$eval('#local-fingerprint', (el) => el.textContent)
console.log(`e2ee-page1: fingerprint=${page1Fingerprint}`)

// #sendrecv1-connection-id 要素が存在し、その内容が空でないことを確認するまで待つ
await page2.waitForSelector('#local-connection-id:not(:empty)')

// #sendrecv1-connection-id 要素の内容を取得
const page2ConnectionId = await page2.$eval('#local-connection-id', (el) => el.textContent)
console.log(`e2ee-page2: connectionId=${page2ConnectionId}`)

// #local-fingerprint 要素が存在し、その内容が空でないことを確認するまで待つ
await page2.waitForSelector('#local-fingerprint:not(:empty)')
const page2Fingerprint = await page2.$eval('#local-fingerprint', (el) => el.textContent)
Expand Down

0 comments on commit 284c099

Please sign in to comment.