I have to embed an external video and play the video in LWC. I only have data-account="1752604059001" and data-video-id="4029697544001". I have tried with iframe but it's not working.

Below is the code:

<video-js data-account="1752604059001" 
  width="640" height="360"></video-js>
<script src="https://players.brightcove.net/1752604059001/default_default/index.min.js"></script> 

NB: Script Tag is not working in lwc.
Reference link: https://player.support.brightcove.com/styling/customizing-player-appearance.html

  • 2
    You shouldn't be using random tags. Tags have a specific meaning and help people understand what a question is about. The "community" tag is meant for community sites (experience sites), which is a specific Salesforce feature.
    – Derek F
    Jul 15, 2022 at 16:40
  • I need to play different videos in Experience Cloud based on the data-account="1752604059001" and data-video-id="4029697544001" <values will be different> using LWC. Jul 15, 2022 at 18:32

1 Answer 1


There's no way to do this directly in LWC (or, strictly speaking, in a Salesforce Lightning Component). This has to do with the CSP (Content Security Policy) of Lightning. You could choose to embed a Visualforce page in an iframe or use a lightning:container to host the relevant markup and then expose it in an Aura component (this container isn't available for LWC).

  • 1
    Also If wanted download the file and store it as a Static Resource and then you can directly access the static resource file from LWC. Jul 16, 2022 at 7:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .