Using Videos: Embed and Upload Video Content
Videos increase engagement and help explain complex topics. Learn how to embed YouTube/Vimeo videos, upload your own videos, and optimize for best performance.
Performance tip: Videos are large files. Always use lazy loading and consider hosting on YouTube/Vimeo rather than self-hosting for better performance.
3 Ways to Add Videos
1. Embed YouTube Videos (Recommended)
Easiest and most performant option. YouTube handles hosting, streaming, and player controls.
How to embed:
Upload your video to YouTube
Click 'Share' → 'Embed'
Copy the video ID or URL
Tell the AI to embed it
Example prompt:
"Embed this YouTube video on the /about page: https://youtube.com/watch?v=VIDEO_ID. Place it below the team section, make it responsive and centered."
Or use video ID:
"Add a YouTube video embed with ID 'dQw4w9WgXcQ' to the hero section. Make it 16:9 aspect ratio and responsive."
2. Embed Vimeo Videos
Great for professional videos with customizable player.
Example prompt:
"Embed this Vimeo video: https://vimeo.com/123456789 on the product demo page. Remove Vimeo logo and controls, autoplay on mute."
3. Upload Self-Hosted Videos
Upload your own video files directly. Use sparingly—videos are large files.
When to self-host:
Short videos (under 10MB)
Background videos
Animations and motion graphics
When you need complete control
Recommended specs for self-hosted:
Format: MP4 (H.264 codec)
Resolution: 1080p max for regular videos, 720p for background
File size: Under 10MB ideally, max 25MB
Length: Under 30 seconds for background, 2 minutes for content
Adding Videos with Prompts
Hero Section Video Backgrounds
Prompt:
"Add a video background to the hero section. Video should autoplay on mute, loop continuously, and have a dark overlay so text remains readable. Use this video URL: https://mysite.com/hero-video.mp4"
Best practices for background videos:
Keep under 10 seconds for looping
Compress heavily (under 5MB)
Mute autoplay (required by browsers)
Add fallback background image for mobile
Product Demo Videos
Prompt:
"Add a product demo section to /products page. Embed YouTube video 'ABC123' on the left (16:9, 560px wide), with product description text on the right. Make it responsive - stack vertically on mobile."
Video Galleries
Prompt:
"Create a video gallery on /tutorials page with 6 YouTube videos in a 3-column grid. Show video thumbnail, title, and duration. Videos should open in lightbox when clicked."
Testimonial Videos
Prompt:
"Add a testimonials section with 3 customer video testimonials. Use Vimeo embeds in cards, 3 columns on desktop, 1 column on mobile. Include customer name and company below each video."
Responsive Video Embeds
Make sure videos look good on all screen sizes.
Responsive YouTube embed:
"Make the YouTube embed responsive - maintain 16:9 aspect ratio, scale to fit container width, no scrollbars."
Different videos for mobile/desktop:
"Show the full product demo video (10 minutes) on desktop, but show the 90-second highlight version on mobile devices."
Video Player Customization
YouTube Player Options
Autoplay (muted):
"Make the YouTube video autoplay on mute. User can unmute if they want."
Hide controls:
"Hide YouTube player controls and branding. Video should look cleaner."
Start at specific time:
"Embed YouTube video but start at 1:30 (1 minute 30 seconds in)."
Loop video:
"Make the YouTube video loop continuously."
Custom HTML5 Video Player
Prompt:
"Add a custom video player with my branding. Include play/pause button, progress bar, volume control, and fullscreen option. Use this video: videos/demo.mp4"
Video Optimization
Lazy Loading Videos
Don't load videos until user scrolls to them.
Enable lazy loading:
"Add lazy loading to all videos on the page. Videos should only load when they come into view."
Benefits:
Faster initial page load
Saves bandwidth
Better mobile experience
Reduced server costs
Video Thumbnails
Show a thumbnail instead of loading the full video player.
Prompt:
"For the YouTube embed, show a custom thumbnail image first. When user clicks it, load and play the video. This saves bandwidth and loads faster."
Benefits:
Page loads 3-5x faster
No YouTube tracking until user clicks
Custom branding on thumbnail
Better control over user experience
Accessibility for Videos
Captions and Subtitles
Make videos accessible to deaf/hard-of-hearing users.
YouTube: Upload captions in YouTube Studio
Self-hosted: Add WebVTT caption files
Prompt for self-hosted captions:
"Add closed captions to the video player. Use this captions file: captions.vtt. Users should be able to toggle captions on/off."
Transcript Text
Add text transcript:
"Below the video, add a 'Show Transcript' button that expands to show the full text transcript of the video. Good for SEO and accessibility."
Video SEO
Help search engines understand your videos.
Video Schema Markup
Prompt:
"Add video schema markup to the product demo video. Include title, description, thumbnail URL, upload date, and duration. This helps Google show the video in search results."
Video Sitemap
Prompt:
"Generate a video sitemap that lists all videos on the site with metadata (title, description, thumbnail, URL). This helps Google index our videos."
Common Video Scenarios
Scenario 1: About Page with Team Video
Prompt:
"Add a 'Meet the Team' section to /about page. Embed YouTube video 'XYZ789' at the top, centered, 720px wide. Below the video, show team member photos in a grid. Make video responsive."
Scenario 2: Video Tutorial Library
Prompt:
"Create a tutorials page at /tutorials with a grid of YouTube videos. Each video card shows thumbnail, title (from YouTube), view count, and duration. Filter buttons at top: 'All', 'Beginner', 'Advanced'. Videos load with lazy loading."
Scenario 3: Landing Page with Hero Video
Prompt:
"Create a landing page with full-screen video hero section. Video backgrounds should autoplay on mute, loop, have dark overlay (40% opacity). Headline and CTA button should be centered over the video. On mobile, show a static background image instead of video."
Video Hosting Comparison
YouTube:
✅ Free unlimited hosting
✅ Automatic quality adjustment
✅ CDN delivery worldwide
✅ Mobile apps integration
❌ YouTube branding/ads (unless Premium)
❌ Public videos (can be unlisted)
Vimeo:
✅ Professional player
✅ No ads
✅ Privacy controls
✅ Customizable player
❌ Storage limits on free plan
❌ Paid plans for serious use
Self-Hosted:
✅ Complete control
✅ No third-party branding
✅ Privacy
❌ Large file sizes
❌ Bandwidth costs
❌ No automatic quality adjustment
❌ You manage encoding
Troubleshooting Video Issues
Video won't autoplay—why?
Browsers block autoplay with sound. Solution: Autoplay with mute. Tell the AI: 'Make video autoplay on mute. User can unmute if they want.' Sound autoplaying is blocked for good reason (user experience).
Video loads slowly and page feels sluggish
Use lazy loading! Also consider using YouTube/Vimeo instead of self-hosting. If you must self-host, compress the video heavily. Try to keep videos under 5MB. Use poster images (thumbnails) that load first.
Can I upload a 100MB video file?
Not recommended. Large videos hurt performance. Either: 1) Upload to YouTube/Vimeo, then embed. 2) Compress the video (use Handbrake, aim for under 10MB). 3) Split into shorter segments. Remember—users on mobile data!
Video doesn't work on iPhone/Safari
Check video format. Safari needs MP4 with H.264 codec. Also, autoplay only works if muted. Test on actual device, not just browser dev tools.
How do I add multiple videos without slowing down my page?
Use lazy loading! Videos outside viewport shouldn't load. Also use thumbnail images that load the video player onclick. For many videos, definitely use YouTube/Vimeo embeds—they're optimized for this.
Can I password-protect videos?
If using Vimeo Pro, yes. For YouTube, make video 'Unlisted' (not in search, only those with link can view). For self-hosted, you'd need authentication on your site—tell AI: 'Only show video if user is logged in.'
Best Practices Summary
✅ Do:
Use YouTube/Vimeo for long videos (>1 minute)
Enable lazy loading for all videos
Add captions for accessibility
Compress self-hosted videos heavily
Test on mobile devices
Use thumbnails that load on click
Provide text transcript for SEO
Make videos responsive
❌ Don't:
Autoplay with sound (browsers block it anyway)
Upload huge uncompressed video files
Forget mobile users on data plans
Use video as the only way to convey critical info
Load all videos immediately on page load
Forget about accessibility (captions)
Assume everyone has fast internet
See also: Using Images | Performance Optimization
Need help? Contact Support
