Skip to content

Present captions on audio media#1047

Merged
demiankatz merged 1 commit intoUniversalViewer:devfrom
DanOlson:captions
Aug 22, 2024
Merged

Present captions on audio media#1047
demiankatz merged 1 commit intoUniversalViewer:devfrom
DanOlson:captions

Conversation

@DanOlson
Copy link
Copy Markdown
Contributor

@DanOlson DanOlson commented Jun 5, 2024

Description of what you did:

Caption support was already there, but was only wired up for video. This adds the existing text track support for audio media as well.

Addresses part of #747

If approved, this is ready to be merged

Caption support was already there, but was only wired up for video.
This adds the existing text track support for audio media as well.
@codesandbox
Copy link
Copy Markdown

codesandbox bot commented Jun 5, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel
Copy link
Copy Markdown

vercel bot commented Jun 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
universalviewer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 1:27am

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Jun 5, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@demiankatz
Copy link
Copy Markdown
Contributor

@DanOlson, do you have any example manifests we can use to test/demonstrate this new functionality?

@DanOlson
Copy link
Copy Markdown
Contributor Author

DanOlson commented Jun 8, 2024

@demiankatz yes, here's one for an audio media item:

https://gist.githubusercontent.com/DanOlson/945c901a49ade5524bd1fb7fa920ceef/raw/e770069a5a77db5b20b0e7cc3326b1722e3b6f1f/interview-with-h-wyman-malmsten.json

and here's one for a video media item, for regression testing

https://gist.githubusercontent.com/DanOlson/e22318c3e6ea843784d5bc23d2f9b1ae/raw/c27df9dc0839ce0b071f80715928e1ed19da9064/assignment-for-tomorrow.json

The changes here assume the same structure for both audio and video manifests, where the canvas item's rendering property contains a Text object of format "text/vtt". No changes were made with regard to the expected structure of the manifest within MediaElementCenterPanel; I was just expanding on what existed previously for videos.

Please let me know if you need anything else. Thanks!

@LanieOkorodudu
Copy link
Copy Markdown
Collaborator

@DanOlson @demiankatz
Test the caption functionality in both video and audio media using the provided manifests in PR #1047 across the universalviewer.dev and the Vercel preview environments.

Tested Environments:

  • universalviewer.dev
  • Vercel Preview (linked in the PR)

Results:
Video Manifest Testing:
Outcome: The video manifest was tested successfully in both environments.
Observation: Captions were present as expected. The CC (Caption/Subtitles) icon functioned correctly, allowing the user to toggle subtitles on and off.
Evidence: [Screenshot showing captions in the video media].
Screenshot 2024-08-22 090818

Audio Manifest Testing:
Outcome: The audio manifest was also tested in both environments.
Observation: The CC icon was not present while playing the audio media, meaning there was no option to toggle captions.
Evidence: [Screenshot while playing the audio media].
Screenshot 2024-08-22 100648

Conclusion:
Caption functionality appears to be correctly implemented for video media, but the CC icon is absent in audio media when using the provided manifest.
@DanOlson If you have already tested the audio manifest on your end and the captions appear as expected, please let me know. This could help determine whether the issue is environment-specific or related to the manifest provided

@demiankatz
Copy link
Copy Markdown
Contributor

@LanieOkorodudu, did you test using the Vercel preview in this PR? When I load the manifest into that version, I do see captions on the audio-only example.

@LanieOkorodudu
Copy link
Copy Markdown
Collaborator

@LanieOkorodudu, did you test using the Vercel preview in this PR? When I load the manifest into that version, I do see captions on the audio-only example.

Yes I did. I will have to try it again. I tested in chrome and Firefox. could it be a caching problem.

@LanieOkorodudu
Copy link
Copy Markdown
Collaborator

@demiankatz I tried it again, and yes, it does have captions in the Vercel PR but not in universalviewer.dev. I assume this is because the PR has not yet been merged into dev? Once merged I will check and test it again.

@demiankatz
Copy link
Copy Markdown
Contributor

@LanieOkorodudu, that is correct: this PR is designed to correct the missing captions in dev, so your finding that captions work here and do not work in dev is what we would expect. I think this can likely be approved and merged. However, I see that the PR currently targets the main branch; I will adjust it to point to dev and make sure that doesn't break anything.

@demiankatz demiankatz changed the base branch from main to dev August 22, 2024 11:45
Copy link
Copy Markdown
Contributor

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

This seems ready -- merging now!

@demiankatz demiankatz merged commit c0f2b10 into UniversalViewer:dev Aug 22, 2024
@demiankatz
Copy link
Copy Markdown
Contributor

Thanks, @DanOlson!

@LanieOkorodudu
Copy link
Copy Markdown
Collaborator

Thanks @DanOlson and @demiankatz 👍

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

Labels

None yet

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

3 participants