<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>audio元素和video元素的常用属性</title> </head> <body> <h1>audio元素和video元素的常用属性</h1> <!--<audio src="video/MP3.mp3" controls="controls" loop="loop"></audio> <video src="video/video.mp4" controls="controls" width="600" height="250" poster="tu.jpg" loop="loop"></video>--> <video id="video" src="video/video.mp4"></video> <script type="text/javascript"> var video = document.getElementById('video'); video.addEventListener("error",function(){ var error = video.error; switch (error.code){ case 1: alert('取回过程被用户中止。'); break; case 2: alert('当下载时发生错误。'); break; case 3: alert('当解码时发生错误。'); break; case 4: alert('媒体不可用或者不支持音频/视频。'); break; } },false); </script> </body> </html>
效果图:
相关推荐
NULL 博文链接:https://onestopweb.iteye.com/blog/2262307
Digital Video and Audio Broadcasting Technology
HTML5 AudioVideo 标签,属性,方法,事件
Digital Video and Audio Broadcasting Technology A Practical Engineering Guide” deals with all the most important digital television, sound radio and multimedia standards such as MPEG, DVB, DVD, DAB, ...
Easy Video to Audio Converter 2.0.6 汉化版 ========================================= Easy Video to Audio Converter 能够从所有的视频、音频文件中将音频提取成 MP3、WAV、WMA 和 OGG 格式, 支持 AVI (DivX,...
The Real-time Transport Protocol (RTP) provides a framework for delivery of audio and video across IP networks and unprecedented quality and reliability.
使谷歌 正常使用video和audio标签的插件,cefsharp插件解决嵌入式谷歌内核应用不能播放视频和音频问题。
音视频进阶,AVFoundation音视频采集,GPUImage美颜,苹果自带美颜工具, OpenGL ES使用基本方法
Video and Audio Coding in DVB services delivered directly over IP protocols
RTP: Audio and Video for the Internet By Colin Perkins Publisher : Addison Wesley Pub Date : June 12, 2003 ISBN : 0-672-32249-8 Pages : 432 The Real-time Transport Protocol (RTP) provides ...
This profile defines the requirements for Bluetooth™ devices necessary for the support of the Audio/Video Remote Control usage case. The requirements are expressed in terms of end-user services, and ...
RTP Audio and Video for the Internet
VB环境下Video Audio压缩数据流播放技术
AudioVideo_To_Exe(English) 1.5.2,欢迎大家下载
Machine Learning for Audio, Image and Video Analysis(2nd) 英文无水印pdf 第2版 pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本...
Raspberry Pi GPU Audio Video Programming 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,...
浏览器HTML5标签video和audio支持 包含其相应支持的格式
Web-前端html+css从入门到精通 119. video标签与audio标签.zip