Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Updated 18-Jun-17 21:44pm

1 solution

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,
HTML
<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,
Quote:
if i click one button open one folder for our local folder to show that folder all files in listview or gridview
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,
Razor
@{
   var path = "/path/to";
}

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

Quote:
play default video player in asp.net.
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[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900