Closed romainpoirier closed 6 years ago
Example url?
You can try this one: https://vimeo.com/218439987
Embed works by pulling the meta data from the url you enter. Given the page has no meta data (password protected) there's nothing to find. In this case I would recommend a different plugin.
Even if there's no meta data to find it doesn't mean the link can't be embed. It would be great if it may return at least the HTML iframe tag.
For your information, I finally found a quick and dirty solution using Twig:
{% set videoData = item.videoEmbed.embedData %}
{% set videoId = videoData.url | replace({ 'https': '', 'http': '', '://vimeo.com/': '' }) %}
{% set embedCode = '<iframe src=\"https://player.vimeo.com/video/' ~ videoId ~ '\" width=\"640\" height=\"360\" frameborder=\"0\" title=\"' ~ (videoData.title | raw) | e('html')) ~ '\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>' %}
Using a Vimeo video protected with password, and even if Vimeo video embed is enabled in the vimeo.com settings, the embed object has no 'code' data (whereas it has when the video is not protected).