How to realize the function that free users can only watch video for 5 seconds?

similar to the function of non-members of major video websites to watch for 6 minutes for free, how to implement the code at the front end?


it is not good to rely solely on the front end, because those who know a little about the front end can bypass this limitation. It is best for the back end to decide whether the video returned is a complete video based on whether the current user is a member, which is more secure.

Menu