I am using ASP.NET's "handler" to show images in an application. I need to play files of audio and video like I do with the image: I recover it from database and show it on an aspx page. Can I create a "handler" for the video and the audio? I don't want that a dialog box is opened asking to the user if he wants to play or save the video file.
我正在使用ASP.NET的“处理程序”在应用程序中显示图像。我需要播放音频和视频文件,就像我对图像一样:我从数据库中恢复并在aspx页面上显示它。我可以为视频和音频创建“处理程序”吗?我不希望打开一个对话框,询问用户是否要播放或保存视频文件。
I want to play it like YouTube does.
我想像YouTube那样播放它。
Maybe I can use silverlight for that.
也许我可以使用silverlight。
Thank you!
2 个解决方案
#1
It consists of two parts.
它由两部分组成。
- A handler or something that streams the video under the hood.
- A client (can be implemented in Silverlight or Flash) that's on an standard HTML page that fetches the video from the handler and displays it.
处理引擎盖下的视频的处理程序或其他东西。
一个客户端(可以在Silverlight或Flash中实现),它位于标准HTML页面上,该页面从处理程序中提取视频并显示它。
#2
It's certainly possible to write a handler that pulls video/audio content out of a database and streams it to the client. That would work much the same was as your existing image one.
当然可以编写一个处理程序,将视频/音频内容从数据库中提取出来并将其流式传输到客户端。这与现有的图像效果大致相同。
The way to stop the dialog is to present your video within a video viewing control on the web page. For example, a silverlight control with a MediaElement in it.
停止对话框的方法是在网页上的视频查看控件中显示您的视频。例如,一个带有MediaElement的silverlight控件。
Check out this guide to writing a silverlight media player: http://www.learn-silverlight-tutorial.com/StreamingMediaUsingSilverlight.cfm
查看本指南以编写silverlight媒体播放器:http://www.learn-silverlight-tutorial.com/StreamingMediaUsingSilverlight.cfm
This won't necessarily be the most performant way of serving video content, if you want lots of performance, look into buying commercial media streaming solution that can be integrated with your site.
这不一定是提供视频内容的最佳方式,如果您想要大量的性能,请考虑购买可与您的网站集成的商业媒体流解决方案。
#1
It consists of two parts.
它由两部分组成。
- A handler or something that streams the video under the hood.
- A client (can be implemented in Silverlight or Flash) that's on an standard HTML page that fetches the video from the handler and displays it.
处理引擎盖下的视频的处理程序或其他东西。
一个客户端(可以在Silverlight或Flash中实现),它位于标准HTML页面上,该页面从处理程序中提取视频并显示它。
#2
It's certainly possible to write a handler that pulls video/audio content out of a database and streams it to the client. That would work much the same was as your existing image one.
当然可以编写一个处理程序,将视频/音频内容从数据库中提取出来并将其流式传输到客户端。这与现有的图像效果大致相同。
The way to stop the dialog is to present your video within a video viewing control on the web page. For example, a silverlight control with a MediaElement in it.
停止对话框的方法是在网页上的视频查看控件中显示您的视频。例如,一个带有MediaElement的silverlight控件。
Check out this guide to writing a silverlight media player: http://www.learn-silverlight-tutorial.com/StreamingMediaUsingSilverlight.cfm
查看本指南以编写silverlight媒体播放器:http://www.learn-silverlight-tutorial.com/StreamingMediaUsingSilverlight.cfm
This won't necessarily be the most performant way of serving video content, if you want lots of performance, look into buying commercial media streaming solution that can be integrated with your site.
这不一定是提供视频内容的最佳方式,如果您想要大量的性能,请考虑购买可与您的网站集成的商业媒体流解决方案。