About playback of timed metadata
In the following code example, we use the onMetadata method to attach an event listener that’s called when metadata is available in the stream. The event listener determines whether the metadata is in the AMF or ID3 format, sets a payload value according to the metadata type, and sets up a function that executes with the payload value.
In this example, we are using Wowza Streaming Engine™ or Wowza Streaming Cloud™ to broadcast a live stream of a marathon. When a runner crosses the finish line, his or her name, the time that they cross, and their place in the race will print to the console. You can insert your own code into this example to make the resulting string appear as an overlay during playback instead. This example covers both HLS streams and ultra low latency streams.
Although the scenario focuses on the live streaming workflow, you can use the same code example for playback of a VOD stream broadcast using Wowza Streaming Engine.