---
title: "Add Videos Player in ASP.NET MVC 4"  
description: "In this article I have described how to play video or embedded player in your web application. For playing video, player’s plugin are required."  
author: "AVADHESH PATEL"  
published: 2013-05-06  
updated: 2017-11-30  
canonical: https://www.mindstick.com/articles/1283/add-videos-player-in-asp-dot-net-mvc-4  
category: "asp.net mvc"  
tags: ["asp.net mvc"]  
reading_time: 3 minutes  

---

# Add Videos Player in ASP.NET MVC 4

In this article I have described how to play video or embedded player in your [web application](https://www.mindstick.com/articles/13069/progressive-web-application-pwas-all-you-need-to-know-about). For playing video, player’s plugin are required. Plugin install in your browser before video play if plugin not installed. For embedded player Microsoft.Web.Helpers package are required. If Microsoft.Web.Helpers’s references not added in your application then first add Microsoft.Web.Helpers package. Get the help for adding references of Microsoft.Web.Helpers, follow below url\

https://www.mindstick.com/Articles/1264/add-reference-of-microsoft-web-helpers-in-mvc-4

##### Flash Videos

To play flash videos, use the Video.Flash web helper. The path parameter is mandatory and all other parameters are optional. Video can be a local file, or a link to a Youtube video.

```
@Video.Flash(path: "http://www.youtube.com/embed/pIv6yR9Q1IA", width: "100", height: "200", play: true, loop: true, menu: true, bgColor: "red", quality: "medium", scale: "exactfit", windowMode: "transparent")
```

##### Flash Video Parameter Description

| path | the path to the [video file](https://answers.mindstick.com/qa/94846/why-can-t-i-open-my-video-file-on-android) |
| --- | --- |
| width | the width of the video rendered in the [web page](https://answers.mindstick.com/qa/92898/how-to-create-a-web-page-using-bootstrap-4) |
| height | the height of the video rendered in the web page |
| play | value that determines if the video will play automatically |
| loop | value that determines if the video automatically starts upon ending |
| menu | value that determines if the context menu is visible |
| bgColor | the background colour of the helper |
| quality | the output [video quality](https://answers.mindstick.com/qa/94708/how-do-i-fix-netflix-video-quality-in-google-chrome). Values include low, autolow, autohigh, medium, high, and best |
| scale | sets the size of the video. Values include exactfit, showall and noorder |
| windowMode | sets the placement of the video. Values include transparent, window and opaque |

Windows Media Videos

To play WMV videos, use the Video.MediaPlayer web helper. The path parameter is mandatory and all other parameters are optional. Vedio can be a local file or a remote file.

```
@Video.MediaPlayer(path: "../Videos/tutorial.wmv", width: "400", height: "200", autoStart: true, playCount: 2, uiMode: "full", stretchToFit: true, enableContextMenu: false, mute: false, volume: 75)
```

Windows Media Videos Parameter Description

| path | the path to the video file |
| --- | --- |
| width | the width of the video rendered in the web page |
| height | the height of the video rendered in the web page |
| autoStart | value that determines how many times the video will play automatically |
| uiMode | Value that determines which controls show up in the [user interface](https://www.mindstick.com/blog/302016/what-is-user-interface-and-what-are-its-benefits). Values include invisible, none, mini, or full |
| stretchToFit | value that determines if video will stretch to fit the width and height settings |
| enableContextMenu | value that determines if a context menu appears when right-clicking on the video |
| mute | self-explanatory |
| volume | self-explanatory |

##### Silverlight Videos

To play Silverlight videos, use the Video.Silverlight web helper. The path parameter is mandatory and all other parameters are optional.

```
@Video.Silverlight(path:"../Vedio/tutorial.xap",width:"400",height:"200", bgColor:"red",autoUpgrade:true) 
```

Windows Media Videos Parameter Description

| path | the path to the video file |
| --- | --- |
| width | the width of the video rendered in the web page |
| height | the height of the video rendered in the web page |
| bgColor | the background colour of the video |
| autoUpgrade | value that determines whether or not the control will upgrade to a newer version of Silverlight if available |

---

Original Source: https://www.mindstick.com/articles/1283/add-videos-player-in-asp-dot-net-mvc-4

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
