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.
Do you also need to account for this.config.options.autoPlayOnSetTarget here, or is there a reason this case is different?
demiankatz
left a comment
There was a problem hiding this comment.
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.