prevent user to see video in url

I am working on a project for video tutorials like udemy. I encountered a problem that when the user clicks on the video link and copy in the URL field of browser, the video is shown to the browser even if he does not have a subscription. What is the way to prevent this issue?
for example if user has this link http://127.0.0.1:8000/storage/uploads/course_videos_2023-09/16950266052987331_first.mp4 and copy in URL field he can see the video

i try to make a middleware but it doesn’t fix my problem