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

Function updatePlayButton

assets/js/video.js:45–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43// updatePlayButton updates the playback icon and tooltip
44// depending on the playback state
45function updatePlayButton() {
46 playbackIcons.forEach((icon) => icon.classList.toggle('hidden'));
47
48 if (video.paused) {
49 playButton.setAttribute('data-title', 'Play (k)');
50 } else {
51 playButton.setAttribute('data-title', 'Pause (k)');
52 }
53}
54
55// formatTime takes a time length in seconds and returns the time in
56// minutes and seconds

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected