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

Function togglePlay

assets/js/video.js:35–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33// If the video playback is paused or ended, the video is played
34// otherwise, the video is paused
35function togglePlay() {
36 if (video.paused || video.ended) {
37 video.play();
38 } else {
39 video.pause();
40 }
41}
42
43// updatePlayButton updates the playback icon and tooltip
44// depending on the playback state

Callers 1

keyboardShortcutsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected