Get Video Asset URL Programmatically | Community
Skip to main content
Level 2
May 3, 2022
Solved

Get Video Asset URL Programmatically

  • May 3, 2022
  • 1 reply
  • 678 views

Hey guys,

 

I am attempting to programmatically retrieve the URL of a Video Asset that is stored in the DAM... currently I've gotten as far as retrieving the Video as a Resource & pulling off its ValueMap, but I'm wondering which tools I should use to get the URL? Don't think it is stored in the ValueMap, so I'm thinking I might need to use something like AssetManager. Current approach to get valuemap below

 

ValueMap imageResourceValueMap = videoResource.getValueMap();

 

Thanks,

 

-Joey

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Hi,

YOu can get the video metada data from 

https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/dam/api/Asset.html#getMetadata--

 

and the location of the video is the page/url.

videoResource.getPath();

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
May 3, 2022

Hi,

YOu can get the video metada data from 

https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/dam/api/Asset.html#getMetadata--

 

and the location of the video is the page/url.

videoResource.getPath();
Arun Patidar