()
| 128 | // updateVolumeIcon updates the volume icon so that it correctly reflects |
| 129 | // the volume of the video |
| 130 | function updateVolumeIcon() { |
| 131 | volumeIcons.forEach((icon) => { |
| 132 | icon.classList.add('hidden'); |
| 133 | }); |
| 134 | |
| 135 | volumeButton.setAttribute('data-title', 'Mute (m)'); |
| 136 | |
| 137 | if (video.muted || video.volume === 0) { |
| 138 | volumeMute.classList.remove('hidden'); |
| 139 | volumeButton.setAttribute('data-title', 'Unmute (m)'); |
| 140 | } else if (video.volume > 0 && video.volume <= 0.5) { |
| 141 | volumeLow.classList.remove('hidden'); |
| 142 | } else { |
| 143 | volumeHigh.classList.remove('hidden'); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | // toggleMute mutes or unmutes the video when executed |
| 148 | // When the video is unmuted, the volume is returned to the value |
nothing calls this directly
no outgoing calls
no test coverage detected