Skip to main content

javascript api - time difference

Planned

Comments

5 comments

  • Martyna Pawełczak

    Checking this I've also noticed that when dragging the part of the indicator with the time on it, the time differs between the timeline and the camera tile, but when I'm clicking on the timeline itself it is the same.

    0
  • Ichiro
    • Network Optix team

    Hi Martyna Pawełczak,

    Thanks for your question.
    If I understanding correctly, you were asking the question with the following operations: 

    1) If you use the desktop client, you select the timeline of a camera, you can see the same timestamp on the camera playback (bottom-corner).

    2) If you use the inClient JS API, you specify the timestamp of a camera, but you can't see the same timestamp on the camera playback (bottom-corner).

    In this case, if you did not use the calculation, let us say you try to specify the fixed timestamp, will it still have the same behavior? Thanks.

    ex: 

    media: {
    speed: playbackRate,

    //Just example, try a fixed value
      timestampMs: 1725256737,
      timelineSelection: { startTimeMs: 1725256737, durationMs: 10 },
    }
    0
  • Martyna Pawełczak

    Hi Ichiro,

    1 & 2 yes

    I did the test with fixed values (on button click for simplicity & removed tab.syncWith() from my method for the test). The end result is still same, but I've noticed that the indicator on the timeline shows correct timestamp for a brief moment and then jumps a few seconds back (a blue line shows on the timeline where the requested timestamp is).

    const itemParams = {
      focused: true,
      media: {
          speed: 0,
          timestampMs: 1721746535000,
          timelineSelection: { startTimeMs: 1721746535000, durationMs: 10 },
      }
    }
    After click:
    Requested time: 7/23/2024 4:55:35 PM
     
    Also with other fixed timestamp:
    Requested time: 7/23/2024 4:55:22 PM
    0
  • Martyna Pawełczak

    Actually not a blue line but a selection. With durationMs: 1000

    0
  • Ichiro
    • Network Optix team

    Hi Martyna Pawełczak,

    Thanks for the test. 

    The result looks like the time between your camera/server/client might not be synchronised.

    - Have you check if the client/server are both synchornized the time to any Internet time server?
    - Is your camera using the proper time? I mean the camera system time is correct if you can check again?

    There is one more test you can check - You can use the API to download the video with the same timestamp to see if that is the same video showing on the client. Ex: 

    https://<NxServerIp>:7001/media/{cameraId}.webm?pos=1725330609682&accurate_seek=true

    Will you see the same video on the desktop client via JSAPI and the stream via API?

     

    0

Please sign in to leave a comment.