Skip to main content
May 15, 2012
Answered

Get time when play a stream

  • May 15, 2012
  • 1 reply
  • 1047 views

Hi

I'm using method play() of Stream to play list file. How do I get current time of video playing ? I try Stream.time but it return total time of Stream.

    This topic has been closed for replies.
    Correct answer NpComplete

    I think you can process the approx time using watch on

    Stream.onPlayStatus (http://help.adobe.com/en_US/flashmediaserver/ssaslr/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7e42SSASLR.html#WSba58fdee7d6ee05f-3e4c639a126965313a2-8000) which will trigger with NetStream.Play.Switch when stream switches. Find Stream.time at that time ( say startTime of current video).

    Find Stream.time of playlist (say total time).

    Current video play time = total stream time - start time of current video.

    1 reply

    NpCompleteCorrect answer
    Adobe Employee
    May 15, 2012

    I think you can process the approx time using watch on

    Stream.onPlayStatus (http://help.adobe.com/en_US/flashmediaserver/ssaslr/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7e42SSASLR.html#WSba58fdee7d6ee05f-3e4c639a126965313a2-8000) which will trigger with NetStream.Play.Switch when stream switches. Find Stream.time at that time ( say startTime of current video).

    Find Stream.time of playlist (say total time).

    Current video play time = total stream time - start time of current video.

    May 16, 2012

    Yes, I do it success. thanks you