1
0

Implement proper mute/unmute button functionality for 2D controls

- Add CSS classes (.muted/.unmuted) for mute button state management
- Fix button logic to show action that will be taken (standard UI pattern):
  - When audio playing (unmuted): shows mute icon (click to mute)
  - When audio muted: shows unmute icon (click to unmute)
- Add proper hover states for both mute and unmute icons
- Initialize button state correctly on video load
- Smooth 0.15s transitions between all states
- Follows standard media player UI conventions
This commit is contained in:
Michael Verdi
2025-07-31 22:01:20 -05:00
parent da4ca420f6
commit 83489ea969
2 changed files with 84 additions and 7 deletions

View File

@@ -162,6 +162,22 @@
background-image: url(mute-hover.png);
}
#mute.muted {
background-image: url(mute.png);
}
#mute.muted:hover {
background-image: url(mute-hover.png);
}
#mute.unmuted {
background-image: url(unmute.png);
}
#mute.unmuted:hover {
background-image: url(unmute-hover.png);
}
#nav {
grid-area: nav;
display: grid;