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

JavaScript BOM Explained

Table of contents 1. BOM Introduction 1. JavaScri...

Detailed explanation of the difference between run/cmd/entrypoint in docker

In Dockerfile, run, cmd, and entrypoint can all b...

How to use DCL to manage users and control permissions in MySQL

DCL (Data Control Language): Data control languag...

Detailed explanation of Nodejs array queue and forEach application

This article mainly records the problems and solu...

Website redesign is a difficult task for every family

<br />Every family has its own problems, and...

Simple web design concept color matching

(I) Basic concepts of web page color matching (1) ...

Can asynchrony in JavaScript save await?

I knew before that to synchronously obtain the re...

HTML Basics_General Tags, Common Tags and Tables

Part 1 HTML <html> -- start tag <head>...

A brief talk about JavaScript variable promotion

Table of contents Preface 1. What variables are p...

MySQL 8.0.17 installation graphic tutorial

This article shares with you the MySQL 8.0.17 ins...

Solution to elementui's el-popover style modification not taking effect

When using element-ui, there is a commonly used c...

VMware vsphere 6.5 installation tutorial (picture and text)

vmware vsphere 6.5 is the classic version of vsph...

Design perspective technology is an important capital of design ability

A design soldier asked: "Can I just do pure ...