Various technologies and techniques are disclosed that relate to providing
interactive television by synchronizing content to live and/or recorded
television shows. Content is synchronized without the use of in-band
triggers. A broadcast stream is received, and search/action pairs are
received from a transmission path, such as from the Internet or user.
When the search criteria are found in the broadcast stream, the
associated action is performed and the content is synchronized with the
show. An application programming interface is used to facilitate
synchronization, and includes a set search method, a search function
template method, and a clear search method. The set search method
initiates searching of the broadcast stream and registers one or more
callback methods for performing the associated action when the match is
found. The search function template serves as the template for
registering the callback methods. The clear search method clears the
system resources from the search.