diff --git a/lang/en/messages.php b/lang/en/messages.php index 0e97bc7c730..3cea1839cb4 100644 --- a/lang/en/messages.php +++ b/lang/en/messages.php @@ -305,5 +305,6 @@ 'user_wizard_invitation_subject' => 'Activate your new Statamic account on :site', 'user_wizard_roles_groups_intro' => 'Users can be assigned to roles that customize their permissions, access, and abilities throughout the Control Panel.', 'user_wizard_super_admin_instructions' => 'Super admins have complete control and access to everything in the control panel. Grant this role wisely.', + 'video_fieldtype_cloudflare_manifest' => 'Cloudflare Stream manifest URLs can\'t be embedded. Use the URL from the "Video Link" button in Cloudflare instead.', 'width_x_height' => ':width × :height', ]; diff --git a/resources/js/components/fieldtypes/VideoFieldtype.vue b/resources/js/components/fieldtypes/VideoFieldtype.vue index 5282a8b1a3a..baf12b31e30 100644 --- a/resources/js/components/fieldtypes/VideoFieldtype.vue +++ b/resources/js/components/fieldtypes/VideoFieldtype.vue @@ -14,6 +14,7 @@ /> {{ __('statamic::validation.url') }} + {{ __('statamic::messages.video_fieldtype_cloudflare_manifest') }} ', 'unsupported', null], + 'cloudflare with a path traversal id' => ['https://customer-wve7oze7jjxdb0j6.cloudflarestream.com/../../evil', 'unsupported', null], + 'cloudflare with a trailing newline' => ["https://customer-wve7oze7jjxdb0j6.cloudflarestream.com/b209b1484821fff0ed2e5535fbb4ff7b\n", 'unsupported', null], + 'cloudflare without a customer subdomain' => ['https://iframe.cloudflarestream.com/b209b1484821fff0ed2e5535fbb4ff7b', 'unsupported', null], + 'cloudflare download' => ['https://customer-wve7oze7jjxdb0j6.cloudflarestream.com/b209b1484821fff0ed2e5535fbb4ff7b/downloads/default.mp4', 'file', 'https://customer-wve7oze7jjxdb0j6.cloudflarestream.com/b209b1484821fff0ed2e5535fbb4ff7b/downloads/default.mp4'], + 'cloudflare thumbnail' => ['https://customer-wve7oze7jjxdb0j6.cloudflarestream.com/b209b1484821fff0ed2e5535fbb4ff7b/thumbnails/thumbnail.jpg', 'unsupported', null], + 'cloudflare hls manifest' => ['https://customer-wve7oze7jjxdb0j6.cloudflarestream.com/b209b1484821fff0ed2e5535fbb4ff7b/manifest/video.m3u8', 'unsupported', null], + 'cloudflare dash manifest' => ['https://customer-wve7oze7jjxdb0j6.cloudflarestream.com/b209b1484821fff0ed2e5535fbb4ff7b/manifest/video.mpd', 'unsupported', null], 'mp4 file' => ['https://example.com/clip.mp4', 'file', 'https://example.com/clip.mp4'], 'uppercase file extension' => ['https://example.com/clip.MOV', 'file', 'https://example.com/clip.MOV'], 'file with a query string' => ['https://example.com/clip.webm?t=1', 'file', 'https://example.com/clip.webm?t=1'], @@ -78,6 +95,7 @@ public static function idsProvider() 'vimeo progressive file with the api format' => ['https://player.vimeo.com/progressive_redirect/playback/286898202/container/d8f1d190-1e26-407e-90a4-45991fe334f0/7bfe0e56?expires=1686246201', '286898202', null], 'vimeo without an id' => ['https://vimeo.com/statamic', null, null], 'vimeo with a malformed hash' => ['https://player.vimeo.com/video/735352648?h=x">