Larry Bouthillier's Streaming Media Event Stream Tutorial
The following code and examples accompany
Using RealSystems' Event Streams
that appeared on streamingmedia.com in May 2001. This example predates modern browsers like
Firefox, IE7, and Safari, so some of the browser behaviors may not work as they did when this was written.
Still, the basic method for embedding triggers in a streaming file still apply.
Did you know that you can embed events into your streaming video content
which will "throw" URLs into your viewers' browser? You can embed calls to
javascript functions, too. You can even pass arbitrary data strings from
the video stream to Java or Javaqscript code running in your browser page.
This (link) tutorial on streamingmedia.com explains how. I'll teach you how
to create an events description file, how to merge it with your streaming
video or use SMIL to sync it to your media, and how to use RealPlayer callback
events to do more complex interaction between your web application and your
streaming media.
-
Example 1
- This example uses events merged into the RealMedia stream to "throw" a
URL into another frame, use Javascript to open a new named window, and then
throws a URL into the new window.
-
Example 2
- This example performs the same actions as Example 1, but uses a standalone
events stream sync'd to the RealMedia stream using SMIL. The utility
that creates standalone event streams is available
here
.
-
Example 3
- This example uses RealPlayer callback handlers to pass arbitrary String
data from the event stream to the browser page. (has not been updated for modern browsers like Firefox -- this example may not work properly)
-
Full downloadable source and media
in a zip file. Unzip this into a clean directory, and open any of the example
files in your browser. All examples should run fine locally with no RealServer
needed.
©2001 Larry Bouthillier