MVC application Play RealPlayer (RMVB) video

Source: Internet
Author: User

Previously insus.net was developing ASP. RealPlayer's RMVB format video was not played and displayed on the ASPX page. Now that you have learned ASP. NET MVC, try this again, and look at the MVC application that it can run.

Here are the methods and steps to implement:
One, to establish a model, is to solve the long parameters.

Second, customize a result, create a directory results under the MVC application, and then build a new class Videomedia.

This custom class inherits Contentresult and the override Executeresult () method.



Three, create the action in the controller:

Four, in the Views/exercise directory, create a rmvbdemo.cshtml view:

Five, Live Demo:


Wow, wrong, can't play, what happens? In the previous demo, the "MVC Application Display RealPlayer (RM) Video" Http://www.cnblogs.com/insus/p/3607808.html,Realplayer RM was able to play normally, Because the client has already installed the RealPlayer. Why not RMVB format?

Workaround, add the MIME Type to IIS:


Furthermore, if you are developing with Visual Studio, it is typically IIS Express, how do you add this MIME type? It's OK, you can add it directly in Web. config.

Browse again, OK:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.