The ultimate solution for playing background music in Firefox browser (Chrome multi-browser compatible)

The ultimate solution for playing background music in Firefox browser (Chrome multi-browser compatible)
The recommended code for playing background music in Firefox has passed the test

Open a blank control panel and paste the following code, search the song you want on the Internet, copy the address and save it
<embed src=music link address width=200 height=50 type=audio/mpeg loop="true" autostart="true">
Width and height are the width and height of the player, which can be set flexibly.
autostart="true" means automatic playback, autostart="false" means no automatic playback.
loop="true" means continuous loop playback, loop="false" means no loop playback.
loop can be equal to an integer, for example loop="3" means the music will be played 3 times

If firefox cannot play, it will prompt you to install quicktime. After testing (IE6+ firefox chrome test passed)


The necessary plug-in installation allows Firefox to listen to background music.

The tags for background music in HTML syntax are <bgsound> and <embed>. No matter which one you use, Firefox cannot hear it. The solution is:
1. Install iTunes+Quick
Download: http://www.apple.com/quicktime/download/
Or: Download iTunes from http://www.apple.com/itunes/
During installation: just keep pressing "Next", especially when establishing the "associative connection" of multimedia files, do not uncheck it, and let it establish a connection with QuickTime.

2. Install the bgsound to embed extension for Firefox.
Download: https://addons.update.mozilla.org/extensions/moreinfo.php?id=146&vid=237

3. Check whether it is installed correctly. Restart Firefox and enter "about:plugins" in the address bar to see if there is a QuickTime Plugin.


The following are supplementary methods: The first method is recommended:

<embed src="py.mp3" height="45" width="250">

Where src is followed by the name of the music file to be inserted, and height and width are the height and width of the play frame.

If you want to play music automatically after the web page is opened, you can use the following code:

<DIV align=center><embed src="py.mp3" height="45" width="250" autostart="true" ></DIV>

If you want the play box to be displayed in the center, you can use the following code:

<DIV align=center><embed src="py.mp3" height="45" width="250"></DIV>

To enable your web page to play background music in Firefox browser, use the object tag.
The following is a standard, cross-browser code example: (the search came from the Mozilla community)

Copy code
The code is as follows:

<object data="music.mp3" type="application/x-mplayer2" width="0" height="0">
<param name="src" value="music.mp3">
<param name="autostart" value="1">
<param name="playcount" value="infinite">
</object>

<<:  Summary of changes in the use of axios in vue3 study notes

>>:  MySql sharing of null function usage

Recommend

Summary of common operation skills of MySQL database

This article summarizes common operating techniqu...

Create a code example of zabbix monitoring system based on Dockerfile

Use the for loop to import the zabbix image into ...

Detailed explanation of this reference in React

Table of contents cause: go through: 1. Construct...

Detailed explanation of docker's high availability configuration

Docker Compose Docker Compose divides the managed...

MYSQL performance analyzer EXPLAIN usage example analysis

This article uses an example to illustrate the us...

MySQL 8.0.18 installation tutorial under Windows (illustration)

Download Download address: https://dev.mysql.com/...

Unbind SSH key pairs from one or more Linux instances

DetachKeyPair Unbind SSH key pairs from one or mo...

Summary of using MySQL online DDL gh-ost

background: As a DBA, most of the DDL changes of ...

Summary of MySQL data migration

Table of contents Preface: 1. About data migratio...

MySQL database table partitioning considerations [recommended]

Table partitioning is different from database par...

Basic knowledge of MySQL database

Table of contents 1. Understanding Databases 1.1 ...

JS implements city list effect based on VUE component

This article example shares the specific code for...

Installation tutorial of MySQL 5.7 green version under windows2008 64-bit system

Preface This article introduces the installation ...

Detailed explanation of VUE responsiveness principle

Table of contents 1. Responsive principle foundat...