| Ryerson Home > Ryerson Flash Communication Development Server > Stream Proxy Test |
The server-side Stream object can be used to proxy streams. This is an important feature that enables:
One advantage of creating a stream with the server-side Stream object that plays another stream is that it can provide a very fine-grained-programtic control of what streams a client can see. A server-side script can decide on a stream-by-stream basis what client (and therefore what user) can subscribe to a given stream. For example a professor can publish and record a stream into a directory that normally has restricted access. During a certain time period, and only for certain users, the professor could grant access to the stream without giving every client that connects read access to the directory the stream is in.
This would normally be done by modifying an access control list (ACL) of some type. User's whose user names were in the access control list (or who were in a group in the ACL) would be able to read the stream because a server-side script would look them up in the ACL and proxy the stream for them. Each user would have their own private read-only folder and the stream would be played in it. The simple test application provided here was designed as a proof of concept for this idea and does not implement an access control list. It was designed to test/demonstrate how the server-side Stream object can be used to make available an otherwise read protected stream. In the test scenario:
lowbandcampus.flvRyerson_High_Speed.flvprivate/lowbandcampusprivate/Ryerson_High_Speedrestrict is provided to toggle the
client's read access between global read access:
client.readAccess = "/"client.readAccess = "/temp" + client.id;startProxiedStream can be called
to create a new stream in the client's temporary directory and return the
correct path to the client. Pressing the "Proxy Play" button will
call this method and begin playing the proxied stream.The test client is below followed by links to all the test files. To run the
test press the Connect button. When the client connects it will have global
read access. Try using the "Direct Play" and "Proxy Play"
buttons to play a stream directly or via the server-side Stream object. Stop
any stream that is playing and press the "Restrict Access" button
so the client no longer has read access to the private directory.
Pressing the "Direct Play" button will now fail to play the stream
while pressing "Proxy Play" will continue to work.
Source files:
The code in the example above starts the stream playing on the server after which the client subscribes to it and plays it. The result is that that you can often hear the audio immediately while it takes a while for the video to start playing. The client below works a little differently. It:
getProxiedStreamPath;startProxiedStream so the
server will start publishing the proxied stream.
This document was written by Brian Lesser and last updated: . If you find any problems with it or the application please let me know.