Here's a simplified explanation:

For this example, let's use Video.js.