如何使用sqlserver,c#在Web应用程序中显示视频 [英] how to display video in web app using sqlserver,c#
本文介绍了如何使用sqlserver,c#在Web应用程序中显示视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我将视频插入到sql server中,但是我想将视频检索到Web应用程序中,以字节格式存储的数据如何将y视频播放到Web应用程序中
发送任何代码段或过程< b></b>
hi to all ,
i inserted my video into sql server , but i want to retrive videos into web app the data stored in bytes format how can i play y videos into web app
send any snippet or procedure<b></b>
推荐答案
对于播放视频和显示图像画廊,我喜欢使用 multibox [ ^ ].作者主页位于此处 [ ^ ].
您也可以尝试 divbox [ ^ ].
还有一件事.如果我是你,我不会将视频文件保存在数据库中.在我的情况下,数据库将保存一些视频元数据(分辨率,类别,驱动器上视频文件的路径,名称,类型...).
Hi,
For playing videos and showing image galleries i like to use multibox[^]. Author home page is here[^].
You can also try divbox[^].
One more thing. If I were you I wouldn''t keep video files in database. Database in my case would hold some metadata for video (resolution, category, path to the video file on drive, name, type...).
唯一可行的方法是,将具有一个HTTP处理程序,该处理程序接受URL,从数据库中读取DB,然后将文件的字节返回给视频播放器.在数据库中存储文件路径,然后使用该路径从文件系统发送文件更为明智.
The only real way to do this, is to have a HTTP handler that accepts a URL, reads the DB from the database, and returns the bytes of the file to the video player. It''s far more sensible to store a file path in the DB and use that to send a file from the file system.
这篇关于如何使用sqlserver,c#在Web应用程序中显示视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文