mirror of
https://github.com/chenasraf/castroulette-receiver.git
synced 2026-05-17 17:58:05 +00:00
Sounds!
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -65,3 +65,4 @@ static/*
|
||||
!static/.keep
|
||||
!static/images
|
||||
!static/sounds
|
||||
.DS_Store
|
||||
|
||||
@@ -14,13 +14,17 @@ class StateHandler
|
||||
setState: (@current) ->
|
||||
|
||||
class StateDefinition
|
||||
constructor: ({@handler = window.stateHandler} = {}) ->
|
||||
constructor: ({@handler = window.stateHandler, @audio} = {}) ->
|
||||
console.debug 'statedef', arguments...
|
||||
if @audio?
|
||||
audio = new Audio("/static/sounds/#{@audio}")
|
||||
audio.play()
|
||||
|
||||
onMessage: (message) ->
|
||||
@handler.resetState()
|
||||
|
||||
class SplashState extends StateDefinition
|
||||
constructor: ({@handler = window.stateHandler} = {}) ->
|
||||
constructor: ->
|
||||
@splash = document.createElement('div')
|
||||
@splash.id = 'splash'
|
||||
@splash.innerHTML = '<img src="/static/images/logo.png" /><audio autoplay id="splash-sound" src="/static/sounds/wheel.mp3"></audio>'
|
||||
|
||||
@@ -34,6 +34,7 @@ segConfig = [
|
||||
winState: YouTubeState
|
||||
stateOptions:
|
||||
content: 'Whenever "Fuhrer" is said in the video, everyone drinks!'
|
||||
audio: 'fuhrer.m4a'
|
||||
data:
|
||||
videos: 'sfkDxF2kn1I ZrHmcpRAZNs pS8kgSLA500'.split ' '
|
||||
}
|
||||
@@ -41,6 +42,7 @@ segConfig = [
|
||||
text: 'Beer Match!'
|
||||
winState: TimeoutState
|
||||
stateOptions:
|
||||
audio: 'boxing.m4a'
|
||||
data:
|
||||
seconds: 20
|
||||
}
|
||||
@@ -49,6 +51,7 @@ segConfig = [
|
||||
winState: YouTubeState
|
||||
stateOptions:
|
||||
content: "Take a shot every fail until you can't!"
|
||||
audio: 'fail-mail.m4a'
|
||||
data:
|
||||
videos: 'Hcp_2HB5MCE 0ez-XM7eiiI t5oZ7fr3gsE'.split ' '
|
||||
}
|
||||
@@ -56,12 +59,14 @@ segConfig = [
|
||||
text: "Drinkin', Alexey Style"
|
||||
winState: DrinkState
|
||||
stateOptions:
|
||||
audio: 'alexey.m4a'
|
||||
content: 'The Alexey Challenge<br /><small>Drink one Arak or Vodka shot with a straw!</small>'
|
||||
}
|
||||
{
|
||||
text: 'Drink with Someone'
|
||||
winState: DrinkState
|
||||
stateOptions:
|
||||
audio: 'yeehaw.mp3'
|
||||
content: ->
|
||||
names = 'amit avihad chen dor eran lior michael tom zeevi'.split(' ')
|
||||
idx = Math.floor(Math.random() * names.length)
|
||||
@@ -71,18 +76,21 @@ segConfig = [
|
||||
text: 'No Mercy'
|
||||
winState: DrinkState
|
||||
stateOptions:
|
||||
audio: 'evil-laugh.mp3'
|
||||
content: 'Pick someone from your group to take one shot'
|
||||
}
|
||||
{
|
||||
text: 'The Spicy Round'
|
||||
winState: DrinkState
|
||||
stateOptions:
|
||||
audio: 'kill.wav'
|
||||
content: 'Pick one:<ul><li>Take 3 shots</li><li>Take 3 tabasco shots</li></ul>'
|
||||
}
|
||||
{
|
||||
text: 'Solo Round'
|
||||
winState: DrinkState
|
||||
stateOptions:
|
||||
audio: 'mr-lonely.mp3'
|
||||
content: 'Drink up!'
|
||||
}
|
||||
]
|
||||
|
||||
BIN
static/sounds/alexey.m4a
Normal file
BIN
static/sounds/alexey.m4a
Normal file
Binary file not shown.
BIN
static/sounds/boxing.m4a
Normal file
BIN
static/sounds/boxing.m4a
Normal file
Binary file not shown.
BIN
static/sounds/evil-laugh.mp3
Normal file
BIN
static/sounds/evil-laugh.mp3
Normal file
Binary file not shown.
BIN
static/sounds/fail-mail.m4a
Normal file
BIN
static/sounds/fail-mail.m4a
Normal file
Binary file not shown.
BIN
static/sounds/fuhrer.m4a
Normal file
BIN
static/sounds/fuhrer.m4a
Normal file
Binary file not shown.
BIN
static/sounds/kill.wav
Normal file
BIN
static/sounds/kill.wav
Normal file
Binary file not shown.
BIN
static/sounds/mr-lonely.mp3
Normal file
BIN
static/sounds/mr-lonely.mp3
Normal file
Binary file not shown.
BIN
static/sounds/yeehaw.mp3
Normal file
BIN
static/sounds/yeehaw.mp3
Normal file
Binary file not shown.
Reference in New Issue
Block a user