- 浏览: 306780 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
开发小菜:
支持IE9以下的吗?
HTML5+CSS3+JQuery打造自定义视频播放器 -
攻城使:
开发Html5必须得下载么,我用dw编写,把文件复制到myec ...
html5开发 myeclipse安装aptana插件 -
疾风鹰狼:
...
根据判断浏览器类型屏幕分辨率自动调用不同CSS的代码 -
sardodo:
你好,我想问下,导入例子中的.dae格式模型是可以看到旋转的小 ...
c3dl 初步认识 -
BIOHAZARDX:
下载学习,初学者膜拜一下。
html5 实现动画(三)
One of the neatest things about HTML5 is support for the new <audio> tag. Like <video> it allows you to natively support media in good browsers like Chrome, FireFox, Opera and Safari. Add a touch of JavaScript and a new era of media applications become possible. Synthesizers, music trackers and games require seamless audio loops though so we need something a bit simpler for our first foray into HTML5 audio. Oooh, how about a retro beatbox with individual track adjustments (start/stop/loop/volume) that could be used to build a unique soundscape from many separate instruments. Perfect! Fantasy can only become reality through hard work so let’s get started with some tests first. Uses the ‘loop’ property. Uses a JavaScript function to loop when an ‘ended’ event is called. Uses two JavaScript functions and two audio elements with the same source to alternate playback duties. Tests were done on Windows 7 with Chrome 5.0.342.9 beta, FireFox 3.6.3, Internet Explorer 9.0 Preview, Opera 10.51 and Safari 4.0.5. Chrome seems to trigger loops before the current sound is completely finished leading to some odd jumpiness. All loop methods are affected. FireFox doesn’t seem to like the ‘loop’ property of method 1, odd. Method 2 has the slightest of delays between loops and method 3 was actually perfect! I didn’t believe it until verification at the millisecond level with Audacity. Hooray Mozilla! Internet Explorer 9 doesn’t support the audio tag yet. Hopefully it will before an official release. Opera performs almost as well as FireFox although there is still a small delay even when using method 3. Safari seems slow to start playback which is very easy to detect once you hear a loop. All loop methods affected. Feedback on other browsers/OS compatibility would be very interesting so please feel free to discuss any findings in the comments below. As of right now (April 11, 2010) only FireFox can do a perfect loop by cheating a bit and using two <audio> elements with JavaScript. So yeah, it’s a bit too early for HTML5 audio loops but don’t let that stop you from creating sound boards, media players and other fun things. Hopefully with some more optimizations audio support will continue to improve and a HTML5 beatbox fantasy can become reality. Until then there are plenty of other fun things to play with. Cheers!Loop Method 1
<audio id="audio_1" controls preload loop>
<source src="/wp-content/uploads/2010/04/html5-audio-loop.ogg">
<source src="/wp-content/uploads/2010/04/html5-audio-loop.wav">
<source src="/wp-content/uploads/2010/04/html5-audio-loop.mp3">
</audio>
Loop Method 2
<audio id="audio_2" controls preload>
<source src="/wp-content/uploads/2010/04/html5-audio-loop.ogg">
<source src="/wp-content/uploads/2010/04/html5-audio-loop.wav">
<source src="/wp-content/uploads/2010/04/html5-audio-loop.mp3">
</audio>
document.getElementById('audio_2').addEventListener('ended', function(){
this.currentTime = 0;
}, false);
Loop Method 3
<audio id="audio_3" controls preload>
<source src="/wp-content/uploads/2010/04/html5-audio-loop.ogg">
<source src="/wp-content/uploads/2010/04/html5-audio-loop.wav">
<source src="/wp-content/uploads/2010/04/html5-audio-loop.mp3">
</audio>
<audio id="audio_4" controls preload>
<source src="/wp-content/uploads/2010/04/html5-audio-loop.ogg">
<source src="/wp-content/uploads/2010/04/html5-audio-loop.wav">
<source src="/wp-content/uploads/2010/04/html5-audio-loop.mp3">
</audio>
document.getElementById('audio_3').addEventListener('ended', function(){
this.currentTime = 0;
this.pause();
document.getElementById('audio_4').play();
}, false);
document.getElementById('audio_4').addEventListener('ended', function(){
this.currentTime = 0;
this.pause();
document.getElementById('audio_3').play();
}, false);
Browser Support
Final Thoughts
发表评论
-
iframe 高度自适应
2011-11-03 17:07 1359转自:http://apps.hi.baidu.com/sha ... -
WordPress 博客添加新浪微博挂件:
2011-06-22 14:07 14701.点击链接http://t.sina ... -
HTML5 影音 ( Video ) 概論
2011-05-25 16:25 10471 Video介紹 引用我翻譯文檔《在HTML5頁面 ... -
处理火狐自动播放视频
2011-05-18 17:54 1440版权声明:转载时请 ... -
教你用HTML5开发iPhone应用程序
2011-05-13 17:38 1179你一整年都像现在一样沮丧,这我知道。所有铁杆Objecti ... -
很给力,20个HTML5视频播放器及代码
2011-05-09 14:45 1963本文来源: http://www.uleadesi ... -
HTML 5 Video概述
2011-05-09 13:32 1003本文来自:http://www.xlnv.ne ... -
支持移动平台的Html5播放器
2011-05-09 13:25 2900本文转自:http://www.riameeting ... -
HTML5 API简介一(Canvas,Audio/Video,Geolocation)
2011-05-09 13:22 1553本文来自:http://www.myext.cn/web ... -
HTML5资源
2011-05-09 11:56 1200JS APIs: 选择器 W3C草案:Selecto ... -
HTML5 Audio/Video 标签,属性,方法,事件
2011-05-09 11:53 1414本文转自:http://directguo.com/blo ... -
DIV实现隐藏与显示
2011-05-06 15:23 741css中display属性的参考值: display:n ... -
HTML5+CSS3+JQuery打造自定义视频播放器
2011-05-06 12:57 6720简介HTML5的<video> ... -
HTML 5 <video> preload 属性
2011-05-06 12:54 1118设置为预加载的 video 元素: <vide ... -
HTML5 – Video
2011-05-06 12:51 1040在HTML5以前若我們要在網頁中播放影片時,需要使用Act ... -
超過 23 個開源的 HTML5 影音播放器與框架
2011-05-06 12:03 7519超過 23 個開源的 HTML5 影音播放器與框架 - ... -
Building a better HTML5 video player with Glow
2011-05-06 11:51 1065Last year I wrote a post (Bu ... -
Ambilight для тэга video
2011-05-06 11:49 769В некоторых топовых моделях т ... -
怎样用js+html5实现视频的播放控制
2011-05-06 11:46 1394html5 代码: <video width ... -
22个HTML5的初级技巧
2011-05-06 11:45 718Web技术的发展速度太快了,如果你不与时俱进,就会被淘汰。 ...
相关推荐
在Apple Loops Audio中,每个循环都包含了特定的节奏、音调和时长信息,这些信息被嵌入到文件的元数据中。当你将一个Apple Loop导入到支持此格式的软件中时,无论你如何改变播放速度或音高,该循环都能保持其原始的...
5. 尝试使用滤波器,如电源线滤波器或音频信号线滤波器,以去除电源或信号线中的噪声。 6. 如果条件允许,可以进行接地隔离测试,比如断开某些设备的地线连接,观察是否能改善音频质量。 解决音频地环回问题可能...
Christophe Basso先生的《Designing Control Loops For Linear and Switching Power Supplies》 关电源 环路控制 零点 极点 在开关模式的功率转换器中,功率开关的导通时间是根据输入和输出电压来调节的。因而,功率...
Readers also find coverage of the underpinnings and principles of control loops so they can gain a more complete understanding of the material. This authoritative volume explains how to conduct ...
Loops,Kknots, Gauge Theories and Quantum Gravity Loops,Kknots, Gauge Theories and Quantum Gravity Loops,Kknots, Gauge Theories and Quantum Gravity
相位锁定环(Phase-Locked Loops, PLLs)设计与仿真 #### 定义与原理 相位锁定环(PLL)是一种用于控制两个信号之间的相位差的技术。在射频(RF)系统中,PLL被广泛应用于频率合成、时钟恢复以及其他需要精确控制频率...
For Loops.ipynb
Razavi_Monolithic_Phase-Locked_Loops_and_Clock_Recovery_Circuits 第二部分
CD-Rom for the book "Phase-Locked Loops Design,Simulation and Applications by R.E.Best. A design program for Phase-locked loops circuits
Analog Phase-Locked Loops: A Tutorial.** 对PLL的基本原理和设计方法进行了深入浅出的讲解。 通过上述内容的综述,我们可以看出,CMOS PLL设计是一项复杂的工程任务,需要综合考虑多个方面的因素才能实现高性能...
模拟集成电路的分析与设计:Chapter 15-Phase-Locked Loops.ppt
Razavi_Monolithic_Phase-Locked_Loops_and_Clock_Recovery_Circuits 第三部分
### 锁象环与频率合成 #### 一、锁象环(PLL)基础概念 锁象环(Phase-Locked Loop,简称PLL)是一种用于稳定、调整信号相位和频率的电子电路。它由三个主要部分组成:鉴相器(Phase Detector)、压控振荡器...
* for gaps, edits & repairs < 1000ms eac3to now loops audio by default * option "-silence" forces eac3to to insert silence instead of looping audio * option "-loop" forces eac3to to loop audio instead...
### 锁相环(PLL)的设计、仿真及应用概述 #### 一、锁相环(PLL)简介 锁相环(Phase-Locked Loop,PLL)是现代电子技术中不可或缺的一部分,广泛应用于通信系统、计算机系统、音频/视频处理等多个领域。...
锁相环(PLL: Phase-locked loops)是电子工程领域中一种重要的同步系统,它主要用于在通信、计测和数字信号处理等应用中实现精确的频率和相位控制。其核心理念是通过反馈机制使系统输出信号的相位与外部参考信号保持...
nice fx fruity loops music house music eric pridz
iOS Runloop官方文档翻译.Run loops 是线程相关的的基础框架的一部分。一个 run loop 就是一个事件处理 的循环,用来不停的调度工作以及处理输入事件。使用 run loop 的目的是让你的线 程在有工作的时候忙于工作,...