vimeo / player.js

Interact with and control an embedded Vimeo Player.
https://player.vimeo.com/api/demo
MIT License
1.44k stars 261 forks source link

Rejected promise on load player.js in Salesforce #585

Closed pserquiz closed 4 years ago

pserquiz commented 4 years ago

Hello!

right now I'm trying to use the player.js in a Lightning Web Component (Salesforce). I'm getting a REJECTED promise with an undefined error basically.

Steps to Reproduce

I downloaded the player.js from https://player.vimeo.com/api/player.js

1 - Add the player.js as a new static resource in the salesforce platform 2 - Try to load in a Lightning Web Component using loadScript(this, vimeoPath + '/player.js') 3 - I get back a promise status = rejected and value = undefined 4 - not sure if this is relevant but I also get a warning Cannot assign to read only property 'Promise' of object '[object Object]' [Cannot assign to read only property 'Promise' of object '[object Object]']

Appreciate any help!

fisherinnovation commented 4 years ago

Looking at https://developer.salesforce.com/docs/component-library/documentation/en/lwc/js_third_party_library you may need to follow Step 2 Upload the library to your Salesforce organization as a static resource, which is a Lightning Web Components content security policy requirement. to get this to work properly.

Closing as this doesn't look to be an issue with this project,

sunhao12 commented 1 year ago

I have the same problem. Have you solved it

sunhao12 commented 1 year ago

I have already resolved it