HLS VOD streams not throwing stop events when the steam is over?

I’m playing a 5 second video clip through the “vod” application like so:

http://[wowza]:1935/vod/mp4:small.mp4/playlist.m3u8

Then I wait for the “onStreamDestroy” event, but it doesn’t come ~5 seconds later when the video finishes playing on my client, like I expect. It happens 25 seconds after the end of the video.

In contrast, when I stream from vod over RTMP, the “destroy” and “disconnect” events are thrown right when I expect them to be thrown.

Is there anything I can do to listen for an event that says “the video has played to completion” when accessing a VOD HLS stream?

Perhaps as a work-around, I could read the duration of the video, start a timer, and then manually throw events when this timer is finished.

I guess that HLS streams are fundamentally different, where you can’t listen for these events since there is no two-way communication. This two-way communication exists with rtmp, but not with hls.

Hi,

For your workaround, there is another post that discusses obtaining the duration for a given VOD asset. The two protocols are fundamentally different, as RTMP is an inherent streaming protocol, while HLS is an HTTP protocol. You can look into using ID3 tags in an HLS stream, although you will need client-side code to detect when these tags are encountered, and to then send back a notification to your Wowza server.

Michelle