-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/target av duration #1113
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/content-handlers/iiif/modules/uv-mediaelementcenterpanel-module/MediaElementCenterPanel.ts
Outdated
Show resolved
Hide resolved
that.player.setCurrentTime(t); | ||
that.player.play(); | ||
this.player.setCurrentTime(t); | ||
this.player.play(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you also need to account for this.config.options.autoPlayOnSetTarget
here, or is there a reason this case is different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have pushed a fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @edsilv. I'm not in a position to actually test this hands-on, but it looks good to me in theory now at least. :-)
@edsilv @demiankatz I attempted to test this configuration on the Vercel app using the available Video and Audio elements. Based on my understanding, this setup should allow users to specify a playback duration (e.g., 20 seconds), after which the media should automatically pause. Could you provide a sample manifest or configuration that I can use to validate if this functionality is working as expected? Please let me know if my interpretation of the feature is incorrect. |
@LanieOkorodudu, I'm not really familiar with how the target functionality works in AV; I assume you can test this by putting something in the target box in the example page, but I'm not sure what syntax to use. Perhaps @stephenwf can suggest something if @edsilv is unavailable. |
@LanieOkorodudu Here's the preview with an AV manifest loaded: https://universalviewer-git-feature-target-av-duration-bl-uv-team.vercel.app/#?xywh=&iiifManifestId=https%3A%2F%2Fbiiif-template-example-3kntb3jpl-mnemoscene.vercel.app%2Fvideo%2Findex.json In the target field under the UV, try setting: https://biiif-template-example-3kntb3jpl-mnemoscene.vercel.app/video/index.json/canvas/0#t=2 Which should play through to the end starting from 2 seconds. Then try setting: https://biiif-template-example-3kntb3jpl-mnemoscene.vercel.app/video/index.json/canvas/0#t=2,4 Which should start playing at 2 seconds then stop at 4 seconds. |
Thank you, @edsilv . I have tested the implementation, initially setting the start point at 2 seconds as suggested, and also evaluated the second proposed approach. Additionally, I verified the functionality with an audio file to ensure compatibility. I tested it using the following link: [https://biiif-template-example-3kntb3jpl-mnemoscene.vercel.app/audio/index.json](One Small Step for Man - Audio), and confirmed that it works as expected. Thanks again, Eds. I’m confident that users will find this feature valuable. |
@demiankatz Thanks Demian, I have tested the feature in video as suggested by Eds and additionally verified it with audio to ensure functionality across both formats. I can confirm that it works as expected. |
Thanks, everyone, I'll go ahead and merge this! |
Add a second param to set target for MediaElement in order to pause after a given duration.