Skip to content

JCode-gh/stream-countdown-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Stream Countdown Timer

A professional Vue3 countdown timer application designed specifically for streamers to use as a browser source in OBS Studio. Features customizable appearance, URL parameters for quick setup, and optimized performance for live streaming.

โœจ Features

Core Timer Functionality

  • โฑ๏ธ Customizable countdown duration (1-120 minutes)
  • ๐ŸŽจ Multiple preset durations (1, 5, 10, 15, 30 minutes)
  • โ–ถ๏ธ Start, pause, resume, and reset controls
  • ๐Ÿ”„ Auto-loop option for continuous countdowns
  • ๐Ÿ”” Audio notification when timer reaches zero

Appearance Customization

  • ๐ŸŽญ Multiple background themes and gradients
  • ๐ŸŒˆ Custom background colors and images
  • ๐Ÿ”ค Customizable text and colors
  • ๐Ÿ“ Adjustable font sizes (24-144px)
  • ๐Ÿ“Š Optional progress bar with animations
  • ๐Ÿ” Transparent background support for overlays

OBS Browser Source Optimization

  • ๐Ÿ–ฅ๏ธ Full-screen display optimized for streaming
  • ๐Ÿ“ฑ Responsive design (1920x1080, 1280x720, etc.)
  • ๐Ÿ”— URL parameters for instant setup
  • ๐ŸŽฏ No scrollbars or browser chrome
  • โšก Lightweight and performance optimized
  • ๐Ÿ–ฑ๏ธ Auto-hide cursor after inactivity

Advanced Features

  • ๐Ÿ’พ Local storage for settings persistence
  • ๐ŸŽš๏ธ Custom preset management
  • โŒจ๏ธ Keyboard shortcuts for control
  • ๐ŸŽ† Particle effects on timer completion
  • ๐Ÿ”ง Debug mode for troubleshooting
  • ๐Ÿ“‹ One-click URL generation for OBS

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn package manager

Installation

  1. Clone or download the project
git clone <repository-url>
cd countdowntimer-app
  1. Install dependencies
npm install
  1. Start development server
npm run dev
  1. Open in browser
http://localhost:5173

Building for Production

npm run build

The built files will be in the dist folder, ready for deployment.

๐ŸŽฅ OBS Studio Setup

Method 1: Using the Setup Page (Recommended)

  1. Open the timer application in your browser
  2. Configure your desired settings on the setup page
  3. Click "Copy" next to the generated browser source URL
  4. In OBS Studio:
    • Add a new Browser Source
    • Paste the copied URL
    • Set Width: 1920, Height: 1080 (or your stream resolution)
    • Enable Shutdown source when not visible
    • Enable Refresh browser when scene becomes active

Method 2: Direct URL Parameters

You can create a browser source URL directly with parameters:

http://localhost:5173/#/display?minutes=10&text=STARTING%20SOON&backgroundColor=%23667eea&textColor=%23ffffff&fontSize=72&autoStart=true&transparent=false

URL Parameters

Parameter Description Example
minutes Timer duration in minutes 10
text Display text STARTING%20SOON
backgroundColor Background color (hex) %23667eea
textColor Text color (hex) %23ffffff
fontSize Font size in pixels 72
autoStart Auto-start timer true
transparent Transparent background false

Note: URL encode special characters (# becomes %23, spaces become %20)

Recommended OBS Settings

  • Width: 1920px (or your stream width)
  • Height: 1080px (or your stream height)
  • FPS: 30 (sufficient for smooth countdown)
  • CSS: Leave empty
  • Shutdown source when not visible: โœ… Enabled
  • Refresh browser when scene becomes active: โœ… Enabled

๐ŸŽฎ Controls

Setup Page Controls

  • Duration slider/input: Set timer length
  • Preset buttons: Quick duration selection
  • Text input: Customize display message
  • Color pickers: Choose colors and backgrounds
  • Start/Pause/Reset: Control timer state
  • Save Preset: Save current settings as custom preset

Display Page Controls

Mouse Controls

  • Click: Toggle control panel visibility
  • Mouse movement: Show controls temporarily

Keyboard Shortcuts

  • Spacebar: Start/Pause timer
  • R: Reset timer
  • S: Go to settings
  • F: Toggle fullscreen
  • C: Toggle controls visibility
  • D: Toggle debug mode

๐ŸŽจ Customization

Background Options

  1. Preset Gradients: Choose from 6 built-in gradient themes
  2. Custom Colors: Use color picker for solid backgrounds
  3. Transparent: Enable for overlay on stream content
  4. Custom Images: Upload your own background image (future feature)

Text Styling

  • Font Size: 24px to 144px range
  • Colors: Full color picker support
  • Custom Text: Personalize your countdown message
  • Font Weight: Bold, modern typography

Animation Effects

  • Smooth Transitions: Timer changes with scale animation
  • Progress Bar: Animated shimmer effect
  • Particle Effects: Celebration particles when timer ends
  • Fade Animations: Smooth element transitions

๐Ÿ”ง Development

Project Structure

src/
โ”œโ”€โ”€ components/          # Reusable Vue components
โ”‚   โ”œโ”€โ”€ SetupView.vue   # Timer configuration page
โ”‚   โ””โ”€โ”€ DisplayView.vue # Full-screen countdown display
โ”œโ”€โ”€ stores/
โ”‚   โ””โ”€โ”€ timerStore.ts   # Pinia store for state management
โ”œโ”€โ”€ router/
โ”‚   โ””โ”€โ”€ index.ts        # Vue Router configuration
โ””โ”€โ”€ assets/             # Static assets

Technology Stack

  • Vue 3: Modern reactive framework with Composition API
  • TypeScript: Type-safe development
  • Pinia: State management
  • Vue Router: Navigation and routing
  • Vite: Fast build tool and dev server
  • CSS3: Modern styling with animations

Available Scripts

# Development
npm run dev          # Start dev server
npm run build        # Build for production
npm run preview      # Preview production build

# Code Quality
npm run lint         # Run ESLint
npm run format       # Format code with Prettier

# Testing
npm run test         # Run unit tests
npm run test:e2e     # Run end-to-end tests

๐Ÿ› Troubleshooting

Common Issues

Timer not starting:

  • Check browser console for errors
  • Ensure JavaScript is enabled
  • Try refreshing the browser source in OBS

Audio not playing:

  • Browser might require user interaction first
  • Check browser audio permissions
  • Ensure volume is not muted

Display cut off:

  • Verify OBS browser source dimensions
  • Check CSS zoom level in OBS
  • Ensure responsive scaling is working

Performance issues:

  • Reduce font size and effects
  • Disable progress bar animations
  • Check CPU usage in OBS

Debug Mode

Press D in display view to enable debug mode, which shows:

  • Current timer state
  • Settings configuration
  • Performance metrics
  • Error messages

Browser Compatibility

  • Chrome/Edge: Full support โœ…
  • Firefox: Full support โœ…
  • Safari: Full support โœ…
  • OBS Browser: Optimized โœ…

๐ŸŽฏ Usage Tips

For Streamers

  1. Test before going live: Always test your timer setup before streaming
  2. Use presets: Create presets for different stream segments
  3. Transparent backgrounds: Great for overlaying on gameplay
  4. Auto-start: Use URL parameters for instant timer start
  5. Multiple scenes: Create different OBS scenes with different timer configs

For Stream Moderators

  • Bookmark setup page for quick timer management
  • Use keyboard shortcuts for fast control
  • Monitor debug info if issues arise

Performance Optimization

  • Use lower font sizes for better performance
  • Disable particle effects for minimal CPU usage
  • Consider transparent backgrounds for better stream integration

๐Ÿ“ License

This project is open source and available under the MIT License.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

๐Ÿ“ž Support

If you encounter any issues or need help setting up the timer for your stream, please:

  1. Check this README for solutions
  2. Enable debug mode to diagnose issues
  3. Create an issue with detailed information about your setup

Happy Streaming! ๐ŸŽฅโœจ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published