Bug description
When you paste in a Vimeo file link the iFrame shows an error, this appears to be because the URL is altered.
How to reproduce
In a video fieldtype enter a direct Vimeo link, for example https://player.vimeo.com/progressive_redirect/playback/990017866/rendition/1080p/file.mp4?loc=external&log_user=0&signature=225090dffedcfd0f6a1adb15e8bf69092b8400c069f54e78fe48b44bddf37240
This will just show an error message (Sorry, we're having a little trouble).
The source of the iframe when inspecting is https://player.vimeo.com/progressive_redirect/playback/990017866/rendition/1080p?h=file.mp4&loc=external&log_user=0&signature=225090dffedcfd0f6a1adb15e8bf69092b8400c069f54e78fe48b44bddf37240
It appears the ...1080p/file.mp4?loc=... is changed to ...1080p?h=file.mp4&loc=... which doesn't work. Looks like it's the code in VideoFieldtype.vue that breaks this
if (embed_url.includes('vimeo')) {
embed_url = embed_url.replace('/vimeo.com', '/player.vimeo.com/video');
if (embed_url.split('/').length > 5) {
let hash = embed_url.substr(embed_url.lastIndexOf('/') + 1);
embed_url = embed_url.substr(0, embed_url.lastIndexOf('/')) + '?h=' + hash.replace('?', '&');
}
}
Not sure if this code just needs removing or updating.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
Bug description
When you paste in a Vimeo file link the iFrame shows an error, this appears to be because the URL is altered.
How to reproduce
In a video fieldtype enter a direct Vimeo link, for example
https://player.vimeo.com/progressive_redirect/playback/990017866/rendition/1080p/file.mp4?loc=external&log_user=0&signature=225090dffedcfd0f6a1adb15e8bf69092b8400c069f54e78fe48b44bddf37240This will just show an error message (Sorry, we're having a little trouble).
The source of the iframe when inspecting is
https://player.vimeo.com/progressive_redirect/playback/990017866/rendition/1080p?h=file.mp4&loc=external&log_user=0&signature=225090dffedcfd0f6a1adb15e8bf69092b8400c069f54e78fe48b44bddf37240It appears the
...1080p/file.mp4?loc=...is changed to...1080p?h=file.mp4&loc=...which doesn't work. Looks like it's the code in VideoFieldtype.vue that breaks thisNot sure if this code just needs removing or updating.
Logs
No response
Environment
Statamic 5.17.0Installation
Fresh statamic/statamic site via CLI
Additional details
No response