๐ต YouTube Notification System
What Happens When You Get a Message
When a customer sends you a message in admin-chats.html:
- ๐ BEEP! - Loud alert sound plays (2 seconds)
- ๐ป Browser Notification - Desktop popup appears
- ๐ต NOISESTORM STARTS! - YouTube player appears and plays music
๐ต YouTube Music Details
Song: Noisestorm - Crab Rave
Start Time: 1 minute (60 seconds into the song)
Looping: YES - plays continuously until you stop it
Volume: Maximum (100%)
Auto-play: Starts 1 second after the beep sound
๐ฎ How to Control It
Stop the Music
Click the ๐ Stop Music button in the floating player
Player Location
- Top-right corner of the screen
- Floating above everything
- Shows video player (320x200)
- Has stop button
What Happens When You Stop
- Music pauses
- Player hides
- Can be triggered again by next notification
๐ When It Plays
Always Plays For:
- โ
New chats (first message from a user)
- โ
Existing chats after 2+ hours
Never Plays For:
- โ Messages within 2-hour cooldown
- โ When you manually stop it (until next notification)
๐จ Visual Design
The YouTube player appears as a floating box with:
- Dark theme matching your site
- Blue accent border
- Stop button at the top
- Video player showing Noisestorm
- Smooth animations
๐งช Testing
Test the Notification
- Click ๐ Test Sound button in admin-chats.html
- Youโll hear the beep
- YouTube player should appear after 1 second
- Noisestorm starts playing from 1:00
- Music loops continuously
- Wait for notification to trigger
- Click ๐ Stop Music button
- Music stops
- Player disappears
๐ง Technical Details
YouTube Video ID
LDU_Txk06tM (Noisestorm - Crab Rave)
Player Settings
{
autoplay: 1,
start: 60, // Start at 1 minute
loop: 1, // Enable looping
playlist: 'LDU_Txk06tM', // Required for loop
controls: 1, // Show controls
modestbranding: 1 // Minimal YouTube branding
}
Volume
- Set to 100% (maximum)
- Cannot be adjusted (intentionally loud)
Looping Logic
- When video ends, seeks back to 1:00
- Plays again automatically
- Continues until manually stopped
๐ฏ Why This Works
Impossible to Miss
- Loud beep gets your attention
- Music keeps playing until you acknowledge
- Visual player reminds you to check chats
Not Annoying
- Only plays for important notifications
- 2-hour cooldown prevents spam
- Easy to stop with one click
Professional
- Uses popular EDM track (Noisestorm)
- Clean player interface
- Matches your site design
๐ Troubleshooting
Music Doesnโt Play
Problem: YouTube player doesnโt appear
Solutions:
- Check browser allows autoplay
- Click anywhere on page first
- Check YouTube isnโt blocked
- Try the test button
Music Wonโt Stop
Problem: Stop button doesnโt work
Solutions:
- Refresh the page
- Click stop button again
- Pause video manually in player
- Close the browser tab
Wrong Song Playing
Problem: Different video plays
Solution:
- Video ID is hardcoded:
LDU_Txk06tM
- Should always be Noisestorm - Crab Rave
- If wrong, check code wasnโt modified
๐ต Change the Song (Optional)
Want a different song? Edit admin-chats.html:
- Find:
videoId: 'LDU_Txk06tM'
- Replace with your YouTube video ID
- Update
playlist: to match
- Adjust
start: time if needed
Example for different song:
videoId: 'YOUR_VIDEO_ID',
start: 30, // Start at 30 seconds
playlist: 'YOUR_VIDEO_ID'
โ
Summary
What You Get:
- ๐ Loud beep alert
- ๐ป Browser notification
- ๐ต Noisestorm playing on loop
- ๐ฎ Easy stop button
- โฐ Smart cooldown system
When It Plays:
- New chats (always)
- Existing chats (after 2 hours)
How to Stop:
- Click ๐ Stop Music button
- Player disappears
- Music stops
Youโll never miss a customer message with Noisestorm blasting! ๐๐ฆ