question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Player from Vimeo does not work on any version. TypeError: Cannot read property 'Player' of undefined at Vimeo.js

See original GitHub issue

When I try to import the React-player component with a Vimeo video I get the following error:

Uncaught (in promise) TypeError: Cannot read property 'Player' of undefined
    at Vimeo.js:102

I verified that one of the possible causes of the error is to pass the parameter controls as true in case Vimeo videos do not have this feature enabled. I checked here: https://github.com/CookPete/react-player/issues/690

So, my component looks like this:

<ReactPlayer
     className='react-player-div'
     url={`https://vimeo.com/243556536`} 
    controls={false}
    config={{vimeo:{ playerOptions: { controls: false }}}}
    playing
    style={{width:'100%',height:'100%'}}
/>   

But I still get this error.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
danihazlercommented, May 9, 2020

I’ve tried that @CookPete , before the .trim() solution, but it did not work for me.

Now I have this error for Youtube videos

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://localhost:3000').

even if the link is https://

0reactions
cookpetecommented, May 23, 2020

Unless someone can prove with a rock solid example that this is a problem with ReactPlayer and not just a weird quirk with the Vimeo player API, I’m not sure what I can do here.

Now I have this error for Youtube videos

@danihazler This has been covered many times before: https://github.com/CookPete/react-player/issues/875 https://github.com/CookPete/react-player/issues/508 https://github.com/CookPete/react-player/issues/96

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'ready' of undefined Vimeo - Stack ...
Hi, I have Implemented Vimeo Video and it works fine, but the Issue iam facing is when ever the Video ends (Add Listener)...
Read more >
Troubleshoot player error messages – Help Center - Vimeo
The following is a list of common player error messages. ... this error for all videos, your system or browser may not support...
Read more >
Player SDK: Reference - Vimeo Developer
Reference. This reference guide provides comprehensive details about the methods and events for controlling an embedded Vimeo player through the player SDK.
Read more >
vimeo/player/README.md - UNPKG
327, if the set fails. For example: ; 328 ; 329, ```js ; 330, player.setColor('#00adef').then(function(color) { ; 331, // the color that was...
Read more >
Vimeo video not showing - only link - Support - Kriesi.at
but if you look at the page below you will see the top button with this url is displaying wrong (it should say...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found