Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows phone 7 对WP7中的媒体元素使用memorystream_Windows Phone 7_Video_Stream - Fatal编程技术网

Windows phone 7 对WP7中的媒体元素使用memorystream

Windows phone 7 对WP7中的媒体元素使用memorystream,windows-phone-7,video,stream,Windows Phone 7,Video,Stream,我正在尝试将视频添加到WP7中的项目中。 我正在下载所需的数据,把它放在一个字节数组中,就像我处理图像一样。但是当我调用MediaElement.SetSource(newmemoryStream(result,0,result.Length))我得到一个NotSupportedException。流的类型必须为IsolatedStorageFileStream。是否有可能使用内存流播放该元素?因为它会更简单,因为我以后不会使用视频,也不想存储任何内容 如果您在Silverlight中查看Win

我正在尝试将视频添加到WP7中的项目中。 我正在下载所需的数据,把它放在一个字节数组中,就像我处理图像一样。但是当我调用
MediaElement.SetSource(newmemoryStream(result,0,result.Length))我得到一个NotSupportedException。流的类型必须为IsolatedStorageFileStream。是否有可能使用内存流播放该元素?因为它会更简单,因为我以后不会使用视频,也不想存储任何内容

如果您在Silverlight中查看Windows Phone的媒体,您可以阅读以下内容:

不支持将通用流传递给SetSource(流)。要在Windows Phone OS 7.0上使用SetSource(流):

  • 将IsolatedStorageFileStream类型的对象传递给该方法
  • 将通用流复制到隔离存储,然后将其作为 IsolatedStorageFileStream类型的对象

所以这是不可能的。您可以在使用该文件后将其从隔离存储中删除。

该死,太糟糕了。在下载和缓存图像时,我已经遇到一些性能问题=[