Results 1 to 4 of 4

Thread: time watching video - vod app

  1. #1

    Default time watching video - vod app

    I'm doing a module on the server side

    and I want that when the user clicks stop or pause the player I can know the time in seconds he watched the video

    I am using this method, but the counter shows the total time of session and not only saw how much the user

    public void onStop(IMediaStream stream)
    Long outBytes = stream.getClient().getTotalIOPerformanceCounter().getMessagesOutBytes();
    double outSeconds = stream.getElapsedTime().getTimeSeconds();
    getLogger().info("bytes: " + outBytes);
    getLogger().info("seconds: " + outSeconds);

  2. #2
    Join Date
    Dec 2007


    Use onPauseRaw instead of onPause in that part of what you are doing.

    This data is server-side, and might not always exactly match client-side user experience, especially if you are looking for exacting results, because of network latency and client-side buffering.

    Logs are the best way to do accounting. Take a look at this technique:


  3. #3


    I'm doing this server-side

    I understand that there may be differences in terms of latency

    but I would get just two things: time watching video and bytes

    I could not see in the logs, even after this new post, the time watching video in any column of the log


  4. #4
    Join Date
    Dec 2007


    Look at x-duration in rows with x-event "destroy" and x-category "stream".


Similar Threads

  1. How many seconds user was watching video?
    By summer_soon in forum General Forum
    Replies: 5
    Last Post: 07-08-2014, 01:48 AM
  2. [VOD Streaming] Create a time frame for VOD stream
    By anhdung in forum Live Streaming and Encoders
    Replies: 2
    Last Post: 05-27-2014, 04:33 AM
  3. vod: video stops at same spot every time
    By bobmane in forum General Forum
    Replies: 5
    Last Post: 05-22-2014, 09:30 AM
  4. Replies: 0
    Last Post: 01-24-2013, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts