Skip to content

Commit d06a6a5

Browse files
committed
chore: use toggleAttribute
1 parent 4759ef4 commit d06a6a5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

apps/website/src/sections/Spotlight.astro

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,7 @@ import PlayButtonSymbol from "../assets/videos/play-button-symbol.svg";
103103
const togglePlayButton = () => {
104104
if (!video.seeking && !wasSeeking) {
105105
playButton.classList.toggle("hidden");
106-
if (video.getAttribute("controls")) {
107-
video.removeAttribute("controls");
108-
} else {
109-
video.setAttribute("controls", "true");
110-
}
106+
video.toggleAttribute("controls");
111107
} else {
112108
wasSeeking = !wasSeeking;
113109
}

0 commit comments

Comments
 (0)