search

Home  >  Q&A  >  body text

php - Record video last viewed time

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

女神的闺蜜爱上我女神的闺蜜爱上我2744 days ago1226

reply all(3)I'll reply

  • 怪我咯

    怪我咯2017-06-23 09:14:05

    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

    reply
    0
  • 三叔

    三叔2017-06-23 09:14:05

    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

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-06-23 09:14:05

    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.

    reply
    0
  • Cancelreply