HTML embedded in WMP compatible with Chrome and IE detailed introduction

HTML embedded in WMP compatible with Chrome and IE detailed introduction

In fact, there are many corresponding writing methods, the most common one is object + embed.
But when I used it, under XP sp3, the embed tag was marked as x-mplayer2, but strechToFit was invalid. Very depressed~
In Windows 7, the embed tag is x-mplayer2. It is useless to write it directly in the embed. You need to use js to set it again, strechToFit and uiMode.
Later I found that the wmp plug-in for chrome under xp sp3 is different from the wmp plug-in under win7 - -.
In fact, a very magical reason is that the officially released Chrome WMP plug-in API does not include XP SP3 as the supported platform.
In short, a lot of weird bugs.
In summary, the solutions to the corresponding problems are as follows:
First of all, your computer must have Windows Media Player
1. Enter chrome://plugins/ in the Chrome browser to see what version of the WMP plug-in is.

If that's it, then that's right.
If not, disable it first, then you can download the np-mswmp.dll from http://ishare.iask.sina.com.cn/f/33394163.html?retcode=0
Then put this dll into the plugins folder under your chrome (if there is no plugins folder, just create one yourself).
It is usually in C:\Program Files\Google\Chrome\Application\plugins~~
Then restart your browser. Check to see if it loaded correctly.
2. The writing method of html is very simple. Just load different html according to different browsers.

Copy code
The code is as follows:

<!--[if !IE]> <-->
<object id="mediaplayer" type="application/x-ms-wmp" data="path" width="100%" height="100%">
<param name="src" value="path" valuetype="ref" type="video/x-ms-wmp">
<param name="animationatStart" value="1">
<param name="transparentatStart" value="1">
<param name="autoStart" value="1">
<param name="ShowControls" value="0">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="0">
<param name="playcount" value="8640000">
<param name="autoRewind" value="1">
<param name="displaysize" value="0">
<param name="stretchtofit" value="1">
<param name="enableContextMenu" value="0">
<param name="uiMode" value="none">
<strong>Error:</strong>You need <a href="http://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx">Windows Media Player Plugin</a>.
</object>
<!--> <![endif]-->
<!--[if IE]>
<object id="mediaplayer" type="video/x-ms-wmv" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" width="100%" height="100%">
<param name="url" value="path" valuetype="ref" type="video/x-ms-wmv">
<param name="animationatStart" value="1">
<param name="transparentatStart" value="1">
<param name="autoStart" value="1">
<param name="ShowControls" value="0">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="0">
<param name="playcount" value="8640000">
<param name="clickToPlay" value="1">
<param name="autoRewind" value="1">
<param name="displaysize" value="0">
<param name="stretchtofit" value="1">
<param name="enableContextMenu" value="0">
<param name="uiMode" value="none">
<strong>Error:</strong>You need <a href="http://www.microsoft.com/windows/windowsmedia/download/plugin.aspx">Windows Media Player Plugin</a>.
</object>
<![endif]-->

<<:  Experience of redesigning the homepage of TOM.COM

>>:  vue+tp5 realizes simple login function

Recommend

CSS3 creates web animation to achieve bouncing ball effect

Basic preparation For this implementation, we nee...

Vue realizes the progress bar change effect

This article uses Vue to simply implement the cha...

Vue implements DingTalk's attendance calendar

This article shares the specific code of Vue to i...

Vertical and horizontal splitting of MySQL tables

Vertical Split Vertical splitting refers to the s...

How to use Volume to transfer files between host and Docker container

I have previously written an article about file t...

Let's learn about MySQL database

Table of contents 1. What is a database? 2. Class...

MySQL DATE_ADD and ADDDATE functions add a specified time interval to a date

MySQL DATE_ADD(date,INTERVAL expr type) and ADDDA...

UDP DUP timeout UPD port status detection code example

I have written an example before, a simple UDP se...

Pure CSS custom multi-line ellipsis problem (from principle to implementation)

How to display text overflow? What are your needs...

How to implement Docker volume mounting

The creation of the simplest hello world output i...

Ideas and codes for implementing waterfall flow layout in uniapp applet

1. Introduction Is it considered rehashing old st...

Example analysis of mysql stored procedure usage

This article describes the usage of MySQL stored ...