Hello Team,
In my AEM component, Author can add 2 Video URL(DAM path) for desktop version, mobile version. Then I am displaying the video as mentioned below. Front end developer is hiding the video class based on some condition. Still, during the page load, 2 video's are loading in browser, resulting high page load time.
<video class="test-123">
<source src="${properties.videoURLForDesktop @ context='unsafe'}" type="video/mp4">
</video>
<video class="test-456">
<source src="${properties.videoURLForMobile @ context='unsafe'}" type="video/mp4">
</video>
How to restrict, not to load both video's. Instead, in Desktop version, load the Video for desktop only.
While googling, got to know about this link. But, dont want to use these JavaScript options.