Support WMV, MPG, MOV, AVI format of web video playback code

Source: Internet
Author: User

This 2 days has been in the whole gold NET awards related projects, compared to the big head is the web video playback, need to consider a variety of different formats of video, and then find the corresponding video player.

There are 2 ways to handle these videos in this case:

1. Using Ckplayer web video player

Ckplayer can be said to be very useful web video player, code deployment is simple, configuration is easy, but unfortunately the supported video format is not many, only support FLV, F4V, MP4 and other formats.

2. Using window Media play Web player

For this video player, we should not be unfamiliar, is the window system comes with the player, the individual very annoying this thing, although the system comes with, but the basic not how to use.

Here is the code for playing WMV, MPG, MOV, AVI and other video formats using widow Media play Web player:

<object id= "MediaPlayer" classid= "Clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" width= "All" height= "standby=" Loading Windows Media Player components ... "type=" Application/x-oleobject "codebase=" http://activex.microsoft.com/ activex/controls/mplayer/en/nsmp2inf.cab#version=6,4,7,1112 "><param name=" FileName "value=" video Address ">< param name= "AutoStart" value= "true" ><param name= "Showcontrols" value= "true" ><param name= "Bufferingtime" Value= "2" ><param name= "ShowStatusBar" value= "true" ><param name= "AutoSize" value= "true" ><param Name= "Invokeurls" value= "false" ><param name= "Animationatstart" value= "1" ><param name= " Transparentatstart "value=" 1 "><param name=" Loop "value=" 1 "><embed type=" Application/x-mplayer2 "src=" Video address "name=" MediaPlayer "autostart=" 1 "showstatusbar=" 1 "showdisplay=" 1 "showcontrols=" 1 "loop=" 0 "videoborder3d=" 0 " Pluginspage= "http://www.microsoft.com/Windows/MediaPlayer/" width= "height=" ></embed></Object> 


In order to be able to play WMV, MPG, AVI format video, can I toss the bad, in Google search a pass, find the code can not use, finally can only go to those English site, a bit to find this can be used. From this can be seen in many domestic sites, many people are only simple copy, paste, do not check whether it can be used, if through the degree of Niang search will definitely find more spam information.

For the above code, I have been tested and used in the project, as for the parameter settings here not too much, see the parameter name should know what meaning.

Support WMV, MPG, MOV, AVI format of web video playback code

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.