Wowza Player is sunset and should only be used with existing Ultra-Low Latency (ULL) streams until that technology is also sunset.
About time to first frame
Time to first frame is the period of time between when a viewer initiates playback and when a video begins playing. For ultra low latency live streams from Wowza Streaming Cloud, the time to first frame may range from a few seconds to tens of seconds. This range depends on a number of factors, including the quality of the network between the edge server and the viewer. It also depends on whether a playback request is the first request to the CDN edge server or whether it is a subsequent request. The following example code presents a solution for alerting users that the ultra low latency live stream is being processed and will appear in the player soon.
This code example shows a Wowza Streaming Cloud ultra low latency stream using Wowza Player for Ultra Low Latency for playback.
We use the onPlay method to attach an event listener that’s called when playback is requested. If the player asset has started requesting the stream, a startBeachBall function executes and the onPlayheadTime method is called every 500 milliseconds. A callback function, onPlayheadTimeCallback, determines if the live stream has started playback. If it has, the stopBeachBall function executes and the onPlayHeadTime event listener is removed.
In this code example, the startBeachBall function prints a message to the console and provides a Loading live stream message to the viewer. The stopBeachBall function prints a message to the console and removes the Loading live stream message. You can substitute code in these functions to show and then remove a process indicator like a spinning disc beachball element.