For videos, it calculates the current time location where the user left vs. the total current time. If current location equals current time then completion is detected. For docs., the system reads current page vs. total pages in the document. When a learner reaches the last page, a completion is recorded. I know you will probably worry about users who fast forward or just fast-scroll through the whole thing, but there is no easy way to track that. We will leave that to the knowledge checks, exams and assessments to catch.