MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / toggleMute

Function toggleMute

assets/js/video.js:150–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148// When the video is unmuted, the volume is returned to the value
149// it was set to before the video was muted
150function toggleMute() {
151 video.muted = !video.muted;
152
153 if (video.muted) {
154 volume.setAttribute('data-volume', volume.value);
155 volume.value = 0;
156 } else {
157 volume.value = volume.dataset.volume;
158 }
159}
160
161// animatePlayback displays an animation when
162// the video is played or paused

Callers 1

keyboardShortcutsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected