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.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3baad-2b615.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3baad-2b615.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?