MVC application plays FLV video, some views can be repeatedly referenced in multiple places

Source: Internet
Author: User

In addition to playing Falsh on the Web page, there is also a format that is FLV video, which is also the most common. Insus.net again wants to implement this functionality in an MVC application.

To implement this feature, you need to download a call vcastr22.swf from the Internet. If you can't find it on the Internet, you can download it from the following link: http://download.cnblogs.com/insus//MVC/vcastr22.swf is then placed under the Scripts directory under the application.



Create a model, because the MVC application play RealPlayer (RMVB) video http://www.cnblogs.com/insus/p/3611497.html has been created in the previous exercise, it is used directly, If it is not in your application, it is created.

Considering a site where there is more than one place to play the FLV video, Insus.net decides to create a partialview, with an FLV playback location, using this partialview, and the main benefit of the partial view is that multiple places can be repeatedly referenced. Maybe it's just some of the parameters are on the game.

Part of the view is written, creating an action on the associated controller to create a new view.

Create a Flvdemo view:


#1Flv视频播放的位置.

#2引用jQuery JS Library.

#3执行控制器方法.

#4 incoming parameters.

#5为第一步的Div加载视频.

Here's a live demo:

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.