0

I am currently migrating a vf page into Lightning web component, the vf page used to show the youtube video tiles on the page. But when I am converting it into a LWC component then it is throwing error related to Content Security Policy . I don't know about any other way to implement the same feature into LWC.

This is the error I am facing.

Refused to load plugin data from 'httpss://www.youtube.com/v/hJMszNULHJc' because it violates the following Content Security Policy directive: "object-src 'self'

2
0

You just need to modify the link from 'https://www.youtube.com/{videoId}' to "'https://www.youtube.com/{videoId}'" -- so all you need to add is the (" ") in the link.

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.