The MVC application displays the RealPlayer (rm) video.

Source: Internet
Author: User

This blog post demonstrates how the MVC application displays the RealPlayer video.

The client can watch the RealPlayer video only if you want to install the RealPlayer client. To view Falsh or WMV videos, you must install the client or related plug-ins.

The implementation method of Insus. NET is still the Render RealPlayer code in the controller.


The following shows the RealPlayer player in cshtml. Insus. NET can be implemented in two ways.

The first method is to use Ajax of jQuery to obtain the GetRm () method:



The above implementation method, it seems that some netizens have different ideas, can see the MVC application shows Flash (swf) Video http://www.cnblogs.com/insus/p/3604955.html comments.

Therefore, Insus. NET has the second method to implement it. Use pure MVC to discard jQuery:

 

When you browse the two methods, View Source can see their differences:

 

If you do not want to connect to the server multiple times, the second method is recommended.


The last is a real-time Demonstration:

Related Article

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.