-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a74b49
commit bb38880
Showing
15 changed files
with
88 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import MATCH_START from './match_start.wav'; | ||
import MATCH_AUTO from './match_auto_end_warning.wav'; | ||
import MATCH_TRANSITION from './match_auto_end.wav'; | ||
import MATCH_TELE from './match_tele_start.wav'; | ||
import MATCH_PRE_TELE from './match_tele_pre_start.wav'; | ||
import MATCH_ENDGAME from './match_end_start.wav'; | ||
import MATCH_END from './match_end.wav'; | ||
import MATCH_ABORT from './match_estop.wav'; | ||
|
||
export { | ||
MATCH_ABORT, | ||
MATCH_AUTO, | ||
MATCH_TRANSITION, | ||
MATCH_END, | ||
MATCH_ENDGAME, | ||
MATCH_PRE_TELE, | ||
MATCH_START, | ||
MATCH_TELE | ||
}; | ||
|
||
export function initAudio(url: any): any { | ||
const audio = new Audio(url); | ||
audio.volume = 0.5; | ||
return audio; | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { FC } from 'react'; | ||
import { DisplayProps } from 'src/apps/audience-display/displays'; | ||
|
||
/** | ||
* Classic audience display that handles all scenarios. | ||
*/ | ||
export const AudDisplayDefault: FC<DisplayProps> = () => { | ||
return null; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { FC } from 'react'; | ||
import { DisplayProps } from 'src/apps/audience-display/displays'; | ||
|
||
/** | ||
* Timer audience display that displays only the match timer and nothing else. | ||
*/ | ||
export const AudDisplayStream: FC<DisplayProps> = () => { | ||
return null; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { FC } from 'react'; | ||
import { DisplayProps } from 'src/apps/audience-display/displays'; | ||
|
||
/** | ||
* Timer audience display that displays only the match timer and nothing else. | ||
*/ | ||
export const AudDisplayTimer: FC<DisplayProps> = () => { | ||
return null; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { DisplayModes } from '@toa-lib/models'; | ||
import { FC } from 'react'; | ||
import { AudDisplayDefault } from './ad-default'; | ||
import { AudDisplayTimer } from './ad-timer'; | ||
import { AudDisplayStream } from './ad-stream'; | ||
|
||
export interface DisplayProps { | ||
id: number; | ||
} | ||
|
||
interface Props { | ||
id: number; | ||
eventKey: string | null | undefined; | ||
mode?: DisplayModes; | ||
} | ||
|
||
const Displays: FC<Props> = ({ id, mode = DisplayModes.DEFAULT }) => { | ||
switch (mode) { | ||
case DisplayModes.DEFAULT: | ||
return <AudDisplayDefault id={id} />; | ||
case DisplayModes.TIMER_ONLY: | ||
return <AudDisplayTimer id={id} />; | ||
case DisplayModes.STREAM: | ||
return <AudDisplayStream id={id} />; | ||
default: | ||
return <AudDisplayDefault id={id} />; | ||
} | ||
}; | ||
|
||
export default Displays; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters