We\'re using a FileStreamResult to provide video data to a Silverlight MediaElement based video player:
public ActionResult Preview(Guid id) {
return new Fil
Then you need to reimplement throttling module :)
The idea is to calculate bitrate of your video stream and then send as much as required to client. So you need (very briefly) to read a block from your stream and send it to client and sleep for a second.
Thread.Sleep(1000) is not really a good idea for handling IIS resources so you need to do stuff in async way. IAsyncResult will be your friend.
There is much room for all kinds of optimisations.
And the last thing... I made it working as plain httphandler, not as MVC ActionResult. If it's possible in your webiste, I'm recommending to do it as a handler.