MediaStreamSource Custom Implementation
As you know, you can use MediaElement.SetSource(Stream)
to set the media source to a stream like a file on local hard drive, now assume that the video is consisted of multiple str开发者_StackOverfloweams. For instance, a video of about 1 hour is splitted into 6 ten-minute segments. Do I need to implement a custom MediaStreamSource?
Note: I'm developing a Silverlight OOB application.
Any help would be greatly appreciated.
You probably don't have the problem anymore, but anyways: I think you do need to implement the source if you want to glue the pieces together seamlessly. In practice, however, I successfully used two media elements quickly blending into each other to achieve a reasonable transition. It's not ideal, but implementing the source seemed a bit harder to me.
If you have a stub implementation for the source or come across a better solution, I'd still be interested myself.
Unless you don't want to pre buffer everything before playing then you definitely have to implement a mediastreamsource and continue to write bytes to a MediaStream
精彩评论