The embedded element autostart false of player embedded in web page is invalid

Time:2020-7-28

Recently, I met the requirement of embedding player to play sound file in web page. Finally, embedded element code is used as follows:

Copy code

The code is as follows:

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

When the page is loaded for the first time, it is not allowed to make sound, so set the autostart property to false. If you want to play, call the play method of embedded element to play the sound

At first, it was ok, but after a while, I found that the autostart attribute of the embed element was invalid, and it was set to false. After a long time of searching, it still played automatically once when the page was loaded. Finally, the answer was found by using Google. The following code can solve the problem

Copy code

The code is as follows:

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