Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4192

camera component: improve recording time accuracy

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Done
    • Normal
    • 8.6.1
    • 8.6.0.1
    • Components
    • Security Level: Jimmy
    • None
    • ZK 8.6.1 S1

    Description

      the recording length is currently measured using setInterval(..., 1000) & incrementing a counter of seconds which is not guaranteed to be accurate.

      https://github.com/zkoss/zkcml/blob/v8.6.0.1/zkmax/src/archive/web/js/zkmax/med/Camera.js#L252-L259

      Using absolutes timestamps - Date.now() - at various lifecycle events will improve the results.
      MediaRecorder provides events onstart, onpause, onresume, onstop for that.
      https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/MediaRecorder

      Attachments

        Activity

          People

            CharlesQiu CharlesQiu
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 5 hours Remaining Estimate - 3 hours
                3h
                Logged:
                Time Spent - 5 hours Remaining Estimate - 3 hours
                5h