Embed player in web page embed element autostart false invalid

Embed player in web page embed element autostart false invalid
Recently, I encountered the need to embed a player in a web page to play sound files at work. Finally, I used the embed element code as follows:

Copy code
The code is as follows:

<embed src='1093.swf' autostart='false' hidden='true' loop='false' ></embed>

To prevent it from making a sound when the page is first loaded, set the autostart attribute to false. If you want to play the sound, call the play method of the embed element to play the sound.

It worked at first, but after a while, I found that the autostart attribute of the embed element was invalid. Even if it was set to false, it would still play automatically once when the page was loaded. I searched for a long time and finally found the answer through Google. Adding the following code can solve the problem

Copy code
The code is as follows:

<embed id="emswf" src="1093.swf" play="false" flashvars="autoplay=false&play=false" menu="false" hidden="true" loop="false"></embed>

<<:  Website Standard Development Flowchart

>>:  Detailed explanation of the 4 codes that turn the website black, white and gray

Recommend

How to install MySQL 8.0 in Docker

Environment: MacOS_Cetalina_10.15.1, Mysql8.0.18,...

How to move a red rectangle with the mouse in Linux character terminal

Everything is a file! UNIX has already said it. E...

Use thead, tfoot, and tbody to create a table

Some people use these three tags in a perverted wa...

Example of how to mosaic an image using js

This article mainly introduces an example of how ...

Create a virtual environment using venv in python3 in Ubuntu

1. Virtual environment follows the project, creat...

Detailed explanation of JQuery selector

Table of contents Basic selectors: Level selector...

Some questions about hyperlinks

<br />I am very happy to participate in this...

More than 100 lines of code to implement react drag hooks

Preface The source code is only more than 100 lin...

Analysis of the method of setting up scheduled tasks in mysql

This article uses an example to describe how to s...

How to modify the root password of mysql in docker

The first step is to create a mysql container doc...

React Native JSI implements sample code for RN and native communication

Table of contents What is JSI What is different a...

How to upload and download files between Linux server and Windows system

Background: Linux server file upload and download...

Examples of two ways to implement a horizontal scroll bar

Preface: During the project development, we encou...

Docker removes abnormal container operations

This rookie encountered such a problem when he ju...