Skip to content

Commit

Permalink
fixup! added capture record type from recorder feature
Browse files Browse the repository at this point in the history
  • Loading branch information
eric2788 committed Apr 10, 2024
1 parent c6deb19 commit fc39d12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/features/recorder/recorders/capture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CaptureRecorder extends Recorder {
if (videos.length === 0) {
throw new Error('No video element found')
}
console.debug('videos availables: ', videos)
console.info('videos availables: ', videos)
this.video = videos[0]
}

Expand Down
9 changes: 4 additions & 5 deletions tests/features/recorder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,9 @@ test('測試錄製 HLS', async ({ content, page }) => {
expect(info.relativeDuration()).toBeGreaterThanOrEqual(30)
})

test('測試錄製 WEBM -> MP4', { tag: "@scoped" }, async ({ content, page, context, optionPageUrl }) => {
test('測試錄製 WEBM -> MP4', { tag: "@scoped" }, async ({ room, page, context, optionPageUrl }) => {

test.slow()
const button = content.getByTestId('record-button')
const timer = content.getByTestId('record-timer')

logger.info('正在修改設定...')
const settingsPage = await context.newPage()
Expand All @@ -204,9 +202,11 @@ test('測試錄製 WEBM -> MP4', { tag: "@scoped" }, async ({ content, page, con
await settingsPage.getByText('保存设定').click()
await settingsPage.close()

const content = await room.reloadAndGetLocator()
const button = content.getByTestId('record-button')
const timer = content.getByTestId('record-timer')
await timer.waitFor({ state: 'visible' })
logger.info('正在錄製...')
//await content.waitForTimeout(30000)
await sleepAndCheckBuffer(content, 30)

const download = page.waitForEvent('download')
Expand Down Expand Up @@ -325,7 +325,6 @@ test('測試錄製時長', { tag: "@scoped" }, async ({ content, page }) => {
// default using 5 mins duration, so use 6 mins here
await timer.waitFor({ state: 'visible' })
logger.info('正在錄製...')
//await page.waitForTimeout(360000)
await sleepAndCheckBuffer(content, 360)

// timer should be fixed on 5 mins
Expand Down

0 comments on commit fc39d12

Please sign in to comment.