How did I secure videos using Laravel and JavaScript?

I am gonna show you what I did to prevent videos link sharing, so they’re only available for subscribed users.

I was working on an e-learning website where users obviously gonna watch videos, but the problem was, how to prevent subscribed users from sharing a video source with other unsubscribed users?