php - Record video last viewed time
女神的闺蜜爱上我
女神的闺蜜爱上我 2017-06-23 09:12:05
0
3
1117

I would like to ask about the plan selection
1 Click on the video to pause the recording time, and then record the time.
2 Use websocket to record the viewing time every 10 seconds
Ask if it is necessary to use websocket. The first option is to prevent the customer from suddenly closing the browser and there will be no record. The second option is to occupy resources

女神的闺蜜爱上我
女神的闺蜜爱上我

reply all (3)
刘奇

1. Record once when closing the browser (there is a trigger time when closing the browser)
2. Record once every 10 seconds

There will be no problem of occupying resources, just set a timer and record a cookie

    三叔

    You can come up with plan 3, record the time every 1-2 minutes, and then combine it with plan 1, which can basically meet the requirements

      phpcn_u1582

      If you want to have both, combine the first and second solutions. But there is no need to update the viewing time every 10 seconds. You can set it to record 1/10 of the total video time. I personally don't think you need to choose the second option, just the first one.

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!