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

Idea : Event x sec before end of stream #103

Closed gaetancollaud closed 10 years ago

gaetancollaud commented 10 years ago

Hi,

For stream with metadata containing the end date. I would be great if we can have an event x (configurable, default 5) seconds before the end of stream. In case of a playlist we could load directly the next url or prepare something for the next stream.

In the case of AXIS AVHS, who split long record in chunks of 5 minutes, we could directly load the next chunk url.

What do you think ?

Gaétan

noseglid commented 10 years ago

This seems oddly specific to your use-case. Let me propose a counter-suggestion:

In the streamStatus the duration of the current clip (if it is known) should be shown, and the current playback location. It is then trivial to set a timeout which triggers 5 seconds before the end of the stream and perform whatever work needs to be done at this stage.

This would also be helpful if people for instance want to create Scrubber or do anything else which have stream timings as input.

Obviously this does not apply to live streams.

gaetancollaud commented 10 years ago

Yeah I know I can do it for myself in javascript directly. But it would be developer-friendly to have this event.

In my opinion, the more events you have the more you can do. Otherwise you have to find tricks and sometime code a huge number of lines to do something simple. I'm the first to request this but maybe when the project will grow, other people will have the same need as me.

Anyway this is a plus, it's not required to have a good player. ;) You can close the issue

noseglid commented 10 years ago

Thanks for the suggestion! I have created a new issue #104 for duration in streamStatus.