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

Steps to use ORM to add data in MySQL

【Foreword】 If you want to use ORM to operate data...

Detailed explanation of client configuration for vue3+electron12+dll development

Table of contents Modify the repository source st...

How to install Django in a virtual environment under Ubuntu

Perform the following operations in the Ubuntu co...

Detailed explanation of Vue data proxy

Table of contents 1. What I am going to talk abou...

About the location of the H1 tag in XHTML

There has been a lot of discussion about H1 recent...

Example of MySQL auto-increment ID exhaustion

Display Definition ID When the auto-increment ID ...

Why Google and Facebook don't use Docker

The reason for writing this article is that I wan...

HTML left, center, right adaptive layout (using calc css expression)

In the latest HTML standard, there is a calc CSS e...

Sublime Text - Recommended method for setting browser shortcut keys

It is common to view code effects in different br...

Ubuntu 20.04 firewall settings simple tutorial (novice)

Preface In today's increasingly convenient In...

Sending emails in html is easy with Mailto

Recently, I added a click-to-send email function t...

Causes and solutions for cross-domain issues in Ajax requests

Table of contents 1. How is cross-domain formed? ...

Nginx domain forwarding usage scenario code example

Scenario 1: Due to server restrictions, only one ...

Quick understanding of Vue routing navigation guard

Table of contents 1. Global Guard 1. Global front...

Detailed explanation of basic syntax and data types of JavaScript

Table of contents Importing JavaScript 1. Interna...