如何在默认文件夹中的ASP.NET程序中播放视频。 [英] How to play video in ASP.NET program in default folder.?

查看:160
本文介绍了如何在默认文件夹中的ASP.NET程序中播放视频。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1.如何设置默认文件夹路径?(如果我单击一个按钮为我们的本地文件夹打开一个文件夹,以便在列表视图或网格视图中显示该文件夹的所有文件)。

2.play asp.net中的默认视频播放器。



我尝试过:



我正在使用visual studio 2015,如何运行项目的顶部?

我尝试设计按钮点击播放视频

1.how to set default folder path?( if i click one button open one folder for our local folder to show that folder all files in list view or grid view).
2.play default video player in asp.net.

What I have tried:

I am using visual studio 2015, how to run top of the project?
I try to design the button click to play the video

推荐答案

ASP.NET并不是非常关心,您加载了什么视频,从哪里加载或在浏览器中显示它。在ASP.NET中,您需要做的就是,

ASP.NET doesn't really very much care, what video you load, where you load it from or how it is displayed in the browser. In ASP.NET, all that you need to do is,
<video src="/path/to/video.mp4">
   Browser does not support HTML5 video tag.
</video>



这是您需要的最大值,然后视频将来自后台,无论您将它存储在哪里......都没关系。



现在两个查询,


This is the maximum you need, then the video would come from the background, wherever you have stored it... Doesn't matter at all.

Now as for your two queries,

引用:

如果我点击一个按钮打开我们本地文件夹的一个文件夹,以显示该文件夹listview或gridview中的所有文件

if i click one button open one folder for our local folder to show that folder all files in listview or gridview

这是你的职责,在加载视频之前,你可以追加视频的路径,本地或基于服务器的虚拟路径等。这一切都是由您控制和定义的,您可以在路径中设置变量,ASP.NET将在加载视频之前自动使用该路径,例如,

That is your duty, before loading the video, you can append the path of the video, local or server based virtual path etc. That is all to be controlled and defined by you, you can set a variable in the path and ASP.NET will automatically use that path before loading the video, such as,

@{
   var path = "/path/to";
}

<video src="@path/video.mp4">
   Browser does not support HTML5 video tag.
</video>




Quote:

在asp.net中播放默认视频播放器。

play default video player in asp.net.

ASP.NET没有媒体播放器(忘记旧的Silverlight控件等,没有人想再使用它了!)您可以轻松地依赖HTML5对视频元素的支持,并加载浏览器默认值。这是可用的最佳UX。



看看这里,在ASP.NET网页(Razor)网站中显示视频Microsoft Docs [ ^ ]

ASP.NET does not have a media player (forget about that old Silverlight control etc, no one wants to use that anymore!) You can easily rely on the HTML5 support for video element, and it loads the browser default. That is the best possible UX available.

Have a look here, Displaying Video in an ASP.NET Web Pages (Razor) Site | Microsoft Docs[^]


这篇关于如何在默认文件夹中的ASP.NET程序中播放视频。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆