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

camera component: improve recording time accuracy

XMLWordPrintable

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

      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

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

              Created:
              Updated:
              Resolved:

                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