在资源中播放视频 [英] play video in resource
问题描述
我想在资源文件中播放视频,但不想在硬盘上创建临时文件。
* .type资源中的返回文件视频是byte []。现在什么在媒体中播放字节?
File.WriteAllBytes(filePath,Properties.Resources.avifile);
----------样本----------------------
字符串filePath = Path.GetTempPath()+ @avifile.avi;
File.WriteAllBytes(filePath,Properties.Resources.avifile);
axmediaplayer.Movie = filePath;
axmediaplayer.Play();
坦克帮助。
i want play video in resource file but not want create temp file on hard.
*.type return file video in resource is byte[].what now play byte in media?
File.WriteAllBytes(filePath, Properties.Resources.avifile);
----------sample----------------------
string filePath = Path.GetTempPath() + @"avifile.avi";
File.WriteAllBytes(filePath, Properties.Resources.avifile);
axmediaplayer.Movie = filePath;
axmediaplayer.Play();
tanks of help.
推荐答案
媒体播放器不会这样做。它只会播放文件中的内容。您必须使用要从其他流中的内存缓冲区支付的第三方组件。我不知道是否因为我从未需要这些功能。
Media Player will not do that. It will only play content from a file. You'll have to use a third party component of you want to pay from a memory buffer out other stream. I don't know if any because I've never needed the functionality.
这篇关于在资源中播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!