(context?: any)
| 9 | static override id = 'Play'; |
| 10 | |
| 11 | static override async shouldProceed(context?: any): Promise<void> { |
| 12 | if (typeof context !== 'object' || context === null) { |
| 13 | return; |
| 14 | } |
| 15 | |
| 16 | const { userInitiated, skip } = context; |
| 17 | |
| 18 | if (userInitiated === false && skip === false) { |
| 19 | const voicePlayers = this.engine.mediaPlayers('voice') as (HTMLAudioElement | HTMLVideoElement | AudioPlayer)[]; |
| 20 | |
| 21 | for (const player of voicePlayers) { |
| 22 | if (!player.ended) { |
| 23 | throw new Error('Voice player still playing.'); |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | static override async willProceed(): Promise<void> { |
| 30 | Play.shutUp(); |
nothing calls this directly
no test coverage detected