loadVideo providing vimeo url in options object doesn't work
See original GitHub issueExpected Behavior
I should be able to load a video on a player’s instance by calling loadVideo passing in an options object with the vimeo url.
Actual Behavior
Player’s loadVideo doesn’t work if you provide an options object with the url property as parameter, it only works with the vimeo id.
Steps to Reproduce
Here’s a code example: https://jsbin.com/sumajacefo/edit?html,console,output
When loading the page I instantiate the player using an options object with the url. If I then try to load a different video using loadVideo with an options object as well, it doesn’t work. According to the repo’s README loadVideo should accept both an options object or a number, but I can only get it to work with the vimeo id.
Parsing the vimeo url in order to obtain the id is not an option for me, because I need to load unlisted and/or private vimeos.
Any workarounds? Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (3 by maintainers)

Top Related StackOverflow Question
I think the bug is back or similar. My video is private, this is the link:
https://vimeo.com/616885681/79bcd7654fCan be embedded “anywhere”.
This:
player.loadVideo('https://player.vimeo.com/video/616885681?autoplay=1')or:
loadVideo('https://vimeo.com/616885681/79bcd7654f?autoplay=1')or
loadVideo('https://vimeo.com/616885681?autoplay=1')creates request:
https://player.vimeo.com/video/616885681/config?h=1b82718d37&title=0&byline=0&portrait=0&autoplay=1&app_id=122963&referrer=https%3A%2F%2Fwww.piecsmakow.pl%2Fwith the response 404 and body:
{"message": "This video does not exist.", "title": "Sorry", "view": 7}sorry about that @davekiss, I didn’t add the domain player.vimeo.com to the whitelist of that video yet. not it works again.
I’m closing this issue as it’s resolved. It’s possible now to load the next video with
or
The unlisted hash is indeed not required for the loadVideo call.
At the moment it is required in the Vimeo.Player constructor because we retrieve the embed code via our oEmbed api. If you prefer not to publish your private link with the unlisted hash in your source code, it’s recommended to embed the Vimeo player directly with an iframe instead. This will just work granted the referrer matches the whitelisted domain.