Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Adding a video in aem page.

Avatar

Level 2

I wanted to add a video component to my page in AEM. How can I achieve the same? What are the various options available to do so?

 

 

 

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 1
Level 1
3 Replies

Avatar

Level 3

Hi @Dvaraka ,

If it's a video hosted on third-party hosting services such as youtube or Brightcove you can use the embed core component.

https://github.com/adobe/aem-core-wcm-components/tree/main/content/src/content/jcr_root/apps/core/wc...

 

Let me know if it works.

 

Avatar

Correct answer by
Level 1
Level 1

Avatar

Level 1

Hi ish,

when i am working on redquark video component, Pause and Play button is not working i gone through the another js script but its not working. I am pasting the js and html can you check once

 

 

 

 

<!--
<div class="buttons">
<button class="button" onclick="playVideo()" >PLAY</button>
<button class="button" id="pause-button">PAUSE</button>
<button class="button" id="stop-button">STOP</button>
</div>

<iframe id="video" src="${properties.link}" frameborder="0" allowfullscreen></iframe>

<script>
function playVideo(){
var my=document.getElementById("video");

my.playVideo();
}
</script> -->

 


<a id="play-video" href="#">Play Video</a><br />

<iframe id="video" width="420" height="315" src="${properties.link}" frameborder="0" allowfullscreen></iframe>

<script>
$(document).ready(function() {
$('#play-video').on('click', function(ev) {

$("#video")[0].src += "&autoplay=1";
ev.preventDefault();

});
});</script>