1. Video tag Supports automatic playback in Firefox, but not in Google and IE <video controls="controls" autoplay="autoplay" name="media"><source src="./img/music.mp3" type="audio/mpeg"></video> Google can enable autoplay by adding muted <video controls="controls" autoplay="autoplay" name="media" muted><source src="./img/music.mp3" type="audio/mpeg"></video> The principle is that most browsers support silent video playback. <video controls="controls" autoplay="autoplay" name="media" muted><source src="http://vjs.zencdn.net/v/oceans.mp4" type="audio/mpeg"></video> 2. Audio tag Note: The tag defines a sound, such as music or other audio stream. <audio controls="controls" ><source src="./img/music.mp3"></audio> Note: Only music can be loaded, not video 3.embed Supports multiple players Autoplay supports Android, but not iOS. It supports Google IE and Edge, but not Firefox. <embed src="./img/music.mp3" hidden="true" autostart="true" loop="true"> <embed src="http://vjs.zencdn.net/v/oceans.mp4" autostart="true" loop="true"> Additional notes: It has always been a common practice on iOS and Android that audio cannot be played automatically. The desktop version of Safari also announced in version 11 in 2017 that it would disable the automatic playback of multimedia with sound. Then, Chrome 66 released in April 2018 also officially turned off the automatic playback of sound, which means that <audio autopaly> <video autoplay> will also be invalid on the desktop version of the browser. Google explains: This is the end of this article about the implementation example of adding music videos to HTML web pages. For more relevant content about adding music videos to HTML, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope that everyone will support 123WORDPRESS.COM in the future! |
<<: Implementation of MySQL Multi-version Concurrency Control MVCC
>>: Rainbow button style made with CSS3
Recently, I want to build a hadoop test cluster i...
For example, he enters: XML/HTML Code div#page>...
Table of contents 1. Error phenomenon 2. Error An...
Basic Introduction to Floating In the standard do...
Using the knowledge of CSS variables, I will dire...
Project scenario: There is a <ul> tag on th...
Table of contents 1. Constructors and prototypes ...
1. What is In react applications, event names are...
Before further analyzing why MySQL database index...
This article takes the health reporting system of...
Question: After the computer restarts, the mysql ...
Remax is an open source framework developed by An...
<br />From the birth of my first personal pa...
The vue part is as follows: <template> <...
Whether MySQL needs to commit when performing ope...