音频视频
- 视频
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> 1.controls控件 2.autoplay自动播放谷歌静音下自动播放 3.muted静音 4.loop循环播放 5.poster封面图 6.preload{ auto页面加载,开始加载音频视频 metadata页面加载后仅加载音频视频的元数据 node页面加载后不加载音频视频 } 7.video支持MP4,webm,ogg <video poster="./img/logo.jpg" width="500" preload="node" loop height="400px" muted controls autoplay> <source src="./img/231.mp4" type="video/ogg"></source> <source src="./img/231.mp4" type="video/mp4"></source> <source src="./img/231.mp4" type="video/webm"></source> </video> </body> </html>
2.音频
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> 1.controls控件 2.muted静音 3.loop循环播放 4.preload{ auto页面加载,开始加载音频视频 metadata页面加载后仅加载音频视频的元数据 node页面加载后不加载音频视频 } <audio controls> <source src="./img/231.mp4" type="video/ogg"></source> <source src="./img/231.mp4" type="video/mp3"></source> <source src="./img/231.mp4" type="video/wav"></source> </audio> </body> </html>
本文来自博客园,作者:zjxgdq,转载请注明原文链接:https://www.cnblogs.com/zjxzhj/p/15117023.html