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

Function initializeVideo

assets/js/video.js:68–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66// initializeVideo sets the video duration, and maximum value of the
67// progressBar
68function initializeVideo() {
69 const videoDuration = Math.round(video.duration);
70 seek.setAttribute('max', videoDuration);
71 progressBar.setAttribute('max', videoDuration);
72 const time = formatTime(videoDuration);
73 duration.innerText = `${time.minutes}:${time.seconds}`;
74 duration.setAttribute('datetime', `${time.minutes}m ${time.seconds}s`);
75}
76
77// updateTimeElapsed indicates how far through the video
78// the current playback is by updating the timeElapsed element

Callers

nothing calls this directly

Calls 1

formatTimeFunction · 0.85

Tested by

no test coverage detected