MCPcopy
hub / github.com/ampproject/amphtml / onProgressClick

Function onProgressClick

ads/google/ima/ima-video.js:1038–1048  ·  view source on GitHub ↗

* Detects clicks on the progress bar. * @param {!Event} event

(event)

Source from the content-addressed store, hash-verified

1036 * @param {!Event} event
1037 */
1038function onProgressClick(event) {
1039 // Call this logic once to make sure we still seek if the user just clicks
1040 // instead of clicking and dragging.
1041 clearTimeout(hideControlsTimeout);
1042 onProgressMove(event);
1043 event.preventDefault();
1044 event.stopPropagation();
1045 clearInterval(uiTicker);
1046 document.addEventListener(mouseMoveEvent, onProgressMove);
1047 document.addEventListener(mouseUpEvent, onProgressClickEnd);
1048}
1049
1050/**
1051 * Detects the end of interaction on the progress bar.

Callers

nothing calls this directly

Calls 3

onProgressMoveFunction · 0.85
clearIntervalFunction · 0.50
addEventListenerMethod · 0.45

Tested by

no test coverage detected