/src/serenity/Userland/Libraries/LibWeb/HTML/AudioPlayState.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <AK/Assertions.h> |
10 | | |
11 | | namespace Web::HTML { |
12 | | |
13 | | enum class AudioPlayState { |
14 | | Paused, |
15 | | Playing, |
16 | | }; |
17 | | |
18 | | enum class MuteState { |
19 | | Muted, |
20 | | Unmuted, |
21 | | }; |
22 | | |
23 | | constexpr MuteState invert_mute_state(MuteState mute_state) |
24 | 0 | { |
25 | 0 | switch (mute_state) { |
26 | 0 | case MuteState::Muted: |
27 | 0 | return MuteState::Unmuted; |
28 | 0 | case MuteState::Unmuted: |
29 | 0 | return MuteState::Muted; |
30 | 0 | } |
31 | | |
32 | 0 | VERIFY_NOT_REACHED(); |
33 | 0 | } |
34 | | |
35 | | } |