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
Table of contents Introduction and Demo API: Cont...
I have just started using react to do projects, a...
vmware vsphere 6.5 is the classic version of vsph...
1. Install JDK Check the computer's operating...
IFNULL(expr1,expr2) If expr1 is not NULL, IFNULL(...
Table of contents Installing the SDK Managing loc...
Set the table's style="table-layout:fixed...
Table of contents Preface The role of key The rol...
the term: 1. VM: Virtual Machine step: 1. Downloa...
For Centos installation of MySQL, please refer to...
One environment Alibaba Cloud Server: CentOS 7.4 ...
MySQL database basic syntax DDL Operations Create...
Note: This table is quoted from the W3School tuto...
Recent product testing found a problem that when ...
Code <div class="test"> <div&g...