A professional, feature-rich streaming application built with 100% Vanilla JavaScript, HTML5, and CSS3. No frameworks required!
- YouTube Support: Automatic detection and iframe embedding with autoplay
- IPTV Streams (M3U8): Full HLS.js integration for all browser compatibility
- Direct Video (MP4/WebM): Native HTML5 video player with controls
- Smart Auto-Detection: Regex-based URL parsing to determine playback mode
- Automatic video frame capture using Canvas API
- Store thumbnails as base64 data URLs
- Display thumbnail previews in history cards
- πΈ "Capture from Video" button to grab frames while playing
- Tag streams as: π¬ Movie, π΄ Live, or β½ Sport
- Color-coded category badges on each card
- Filter and organize your library visually
- β Star button on each history card
- Favorite items automatically pin to the top
- Persist across browser sessions
- β¬ Floating PiP button on video player
- Pop out videos to watch while browsing
- Works with MP4, WebM, and M3U8 streams
- Browser-native PiP API implementation
- Deep charcoal background (#0a0a0a) for eye comfort
- Glassmorphism Effects: Frosted glass backdrop filters throughout
- Smooth 0.3s CSS transitions on all interactive elements
- Gradient accents: Electric Blue (#00d4ff) & Neon Purple (#b64aff)
- All data stored in localStorage
- History with custom names, categories, thumbnails, and favorites
- Automatic data recovery on refresh
- 15-item history limit (configurable)
| Breakpoint | Layout |
|---|---|
| Desktop (>1200px) | 75% player (left) + 25% sidebar (right) - CSS Grid |
| Tablet (β€768px) | Sidebar moves to bottom (35vh) - Stacked vertically |
| Mobile (β€480px) | Full-width responsive with touch optimization |
- Open
index.htmlin any modern browser - Paste a URL:
- YouTube:
https://www.youtube.com/watch?v=dQw4w9WgXcQ - M3U8/IPTV:
https://example.com/stream.m3u8 - MP4/WebM:
https://example.com/video.mp4
- YouTube:
- Click "Play" or press Enter
- Stream appears in history sidebar
- Edit: Click βοΈ to rename, add category, capture thumbnail
- Favorite: Click β to pin to top
- Picture-in-Picture: Click β¬ to pop out video (when available)
- HLS.js CDN: IPTV/M3U8 stream support
- YouTube Embed API: iframe-based YouTube playback
- HTML5 Video: Native MP4/WebM playback
- localStorage API: Persistent data storage
- Base64 Encoding: Canvas thumbnail serialization
- CSS Grid & Flexbox: Modern responsive layout
- Canvas API: Video frame capture
- Picture-in-Picture API: Browser-native PiP
- CSS Transitions: Smooth 0.3s animations
webProject/
βββ index.html # Semantic HTML structure
βββ styles.css # Professional dark theme with glassmorphism
βββ script.js # Complete vanilla JS logic
βββ README.md # This file
playStream(url)- Main playback controllerdetectStreamMode(url)- URL type detectionplayYoutube()- YouTube iframe handlerplayHLS()- M3U8/IPTV with hls.jsplayHTML5Video()- MP4/WebM native playback
addToHistory(url)- Add with enhanced fieldstoggleFavorite(url)- Pin/unpin streamsrenderHistory()- Sort by favorites then timestampcaptureThumbnail()- Canvas frame extraction
togglePictureInPicture()- PiP controlopenEditModal()- Edit modal with full optionssaveEdit()- Persist name, category, thumbnail
| Element | Color | Usage |
|---|---|---|
| Background | #0a0a0a | Dark theater mode |
| Secondary | #151515 | UI elements |
| Primary Accent | #00d4ff | Electric Blue highlights |
| Secondary Accent | #b64aff | Neon Purple gradients |
| Text Primary | #ffffff | Main text |
| Text Secondary | #a0a0a0 | Muted text |
- Zero external dependencies (except HLS.js CDN)
- Lightweight CSS with efficient selectors
- Optimized JavaScript with lazy evaluation
- Canvas thumbnails compressed to 70% JPEG quality
- Smooth animations using hardware-accelerated transforms
β
Chrome/Edge 90+
β
Firefox 88+
β
Safari 14+
β
Mobile browsers with PiP support
Edit getCategoryEmoji() in script.js to add new categories:
function getCategoryEmoji(category) {
const emojis = {
movie: 'π¬',
live: 'π΄',
sport: 'β½',
news: 'π°', // Add new category
};
return emojis[category] || 'πΊ';
}Change MAX_HISTORY constant (default: 15):
const MAX_HISTORY = 30; // Store up to 30 itemsVideo won't play?
- Verify URL format (must start with http:// or https://)
- Check if stream is publicly accessible
- CORS may block some streams
Thumbnail not capturing?
- Wait for video to fully load
- Ensure video player is visible
- Cross-origin videos may prevent capture
PiP button missing?
- Browser must support Picture-in-Picture API
- Not all browsers have full PiP support
- Check browser compatibility
Free to use and modify for personal and commercial projects.
Built with β€οΈ using Vanilla JavaScript
No frameworks. No bloat. Pure performance.