本文介绍了从服务器下载mp4视频到指定的本地客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将位于服务器下的视频下载到用户指定的本地路径。
我有一个Web服务器应用程序和客户端的嵌入式服务器应用程序。
不知何故,我需要从webmethod后面的代码获取字节缓冲区,然后我需要通过客户端的ajaxrequest将字节缓冲区发送到我的嵌入式服务器。
我怎么能这样做,还是有其他办法吗?
Hi,
I need to download videos which are located under server to user's specified local path.
I have a web server application and an embedded server application for client side.
Somehow I need to get byte buffer from code behind webmethod then I need to send the byte buffer to my embedded server via ajaxrequest from client side.
How can I do this way, or is there any other way to do it?
推荐答案
Response.ContentType = "video/mp4";
Response.Clear();
Response.BufferOutput = true;
// use a reader to load the video content
Response.BinaryWrite(reader.Value);
Response.Flush();
这篇关于从服务器下载mp4视频到指定的本地客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!