1

Is it possible to display external videos in lightning component using iframe container?

I have got cross-frame error if i try with iframe tag.Is there any way to display videos in lightning component

2

Yes. Something like this should work. I was able to do with youtube video.

    <iframe width="640" height="415" src="{!v.youtubeid}"> </iframe>

Pass the video id in "src" attribute and you should be able to access it.

Please check this blog for more details.

  • Now it displays the video, but player option is disabled. I am not able to click on it. Any idea on this? – Chaithra K N Nov 2 '17 at 16:49
  • Can you check the documentation of iframe. and verify the controls. – brahmaji tammana Nov 2 '17 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.