Skip to content

Adds AV Tests and Caption Functionality#1796

Open
K8Sewell wants to merge 3 commits into
devfrom
issue-1750-add-av-tests
Open

Adds AV Tests and Caption Functionality#1796
K8Sewell wants to merge 3 commits into
devfrom
issue-1750-add-av-tests

Conversation

@K8Sewell

@K8Sewell K8Sewell commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description of what you did:

  • Added tests for AV media
  • Added functionality to read transcripts from cookbook examples

Related Issue

#1750

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
universalviewer Ready Ready Preview, Comment Jul 2, 2026 9:11pm
universalviewer.dev Ready Ready Preview, Comment Jul 2, 2026 9:11pm

Request Review

return typeGroup === "audio" || typeGroup === "video";
}

// vtt, srt, csv

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was unable to find support for csv.

return false;
}

const captionTypes = new Set<String>(["text/vtt", "text/srt"]);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@K8Sewell K8Sewell marked this pull request as ready for review July 2, 2026 21:53
@demiankatz

Copy link
Copy Markdown
Contributor

Thanks, @K8Sewell, this is great! I haven't had a chance to look closely since I'm preparing to leave for my trip and need to choose my battles -- but I'll be happy to look closer when I get back if you want me to. In the meantime, I imagine that @LanieOkorodudu might be a good candidate for reviewing, since she's been more heavily involved in test code lately and probably has some good insights!

Comment thread __tests__/av_tests.js
});
}, 60000);

it("loads the AV manifest into the mediaelement player", async () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@K8Sewell, Thanks for putting this together, Do you think it's worth adding the canvas title displays "Video Example 3", and that the video can actually play, continue for around 10 seconds, and then pause successfully.

Comment thread __tests__/av_tests.js
});

// Play/pause button.
const playButton = await avPage.$(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, like play for 10 seconds and and pause to confirm the video is actually play for seconds.

Comment thread __tests__/av_tests.js
});
}, 60000);

it("loads the AV manifest into the AV center panel", async () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also confirmed that the title has "Preludio e Coro d'introduzione – Bel conforto al mietitore" as it loaded.

@LanieOkorodudu

Copy link
Copy Markdown
Contributor

I really like the approach of creating a separate folder for each component to test. It makes everything much easier to maintain. Thanks! @K8Sewell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants