AxisCommunications / locomote-video-player

Media Player in Adobe Flash with RTSP support. (THIS PROJECT IS NO LONGER MAINTAINED)
BSD 3-Clause "New" or "Revised" License
133 stars 79 forks source link

Stream started event trigged multiple time #168

Closed gaetancollaud closed 4 years ago

gaetancollaud commented 8 years ago

Hi,

When I play a stream, I receive multiple streamStarted events. See log below:

16:52:28 INFO PlayerLocomote - Stream started {"streamURL":"http://mediadev.videoprotector.com/event.php?event_action=get_media&eventid…&offset=0&duration=-1&rate=1&api=JSON&sid=mytoken","bufferedTime":0,"duration":299.5407,"state":"playing","resolution":{"height":360,"width":640},"playbackSpeed":1,"fps":0,"protocol":"http","currentTime":27}
16:52:28 INFO PlayerLocomote - Stream started {"streamURL":"http://mediadev.videoprotector.com/event.php?event_action=get_media&eventid…&offset=0&duration=-1&rate=1&api=JSON&sid=mytoken","bufferedTime":0,"duration":299.5407,"state":"playing","resolution":{"height":360,"width":640},"playbackSpeed":1,"fps":0,"protocol":"http","currentTime":34}
16:52:29 INFO PlayerLocomote - Stream started {"streamURL":"http://mediadev.videoprotector.com/event.php?event_action=get_media&eventid…&offset=0&duration=-1&rate=1&api=JSON&sid=mytoken","bufferedTime":1482,"duration":299.5407,"state":"playing","resolution":{"height":360,"width":640},"playbackSpeed":1,"fps":0,"protocol":"http","currentTime":23923}

I used the streamStatus() method.

LOG.info("Stream started ", JSON.stringify(locomote.streamStatus()));

The third one is trigged when I seek (because when the stream started I directly seek to the time I want the video to play).

Do you have any clue why I receive so much time this event ?

This issue may be linked to #167

Best regards

drowzy commented 8 years ago

If its an an Edge event streamed through Evostream it is impossible to seek without restarting the stream. So that could be the explaination. Possible that there's 1 play & 2 seeks?

gaetancollaud commented 8 years ago

We use evostream indeed, but it was a cloud recording. And I seek only once. The first two events were trigged at the same time. The third event is after the seek. I you check the currentTime you will see that the first and second event are separate by less than 10ms. The third is after the seek and the currentTime is more than 23sec, which is correct.

drowzy commented 8 years ago

Scheduled recordings to cloud are chunked so it might be part of another chunk? Can this be reproduced with other events as well?

gaetancollaud commented 8 years ago

No it was not part of a new chunk. I checked again and the 3 events are trigged every time.

If you want I can grant you an access on one of your integration platform to see by yourself.

drowzy commented 8 years ago

Alright. I'll investigate.

gaetancollaud commented 8 years ago

Did you find something ?