Closed yuriykuzin closed 6 years ago
I'd say that's probably a bug with Vimeo's API, player.js?
It could be. But there is no such error when I turn Plyr off and use only player.js, as I mentioned above.
@sampotts Can you please do a hotfix?
File:
src/js/plugins/vimeo.js
Change this:
player.embed.getVideoUrl().then(value => {
currentSrc = value;
});
To this:
player.embed.getVideoUrl()
.then(value => {
currentSrc = value;
})
.catch(() => {
// Do nothing
});
Explanation:
On a private video vimeo throws an error on calling getVideoUrl
. And even with this catch, you will be still able to catch an error using .on('error'...
, so it is quite safe
Sure - will do this shortly
Thanks! I appreciate your fast responses! :)
Fixed in v3.0.8
👍
Please check this codepen: https://codepen.io/yuriyku/pen/ZxaNPa
An error is thrown to console, but the video is still playing:
If I switch off Plyr (comment line
const player = new Plyr('#player');
), vimeo native player works properly.Expected behaviour
No error in console.
Environment
Steps to reproduce
Open the codepen and console