Home > Web Front-end > HTML Tutorial > Load audioAudio_html/css_WEB-ITnose

Load audioAudio_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:42:25
Original
1061 people have browsed it

var cameraAudio = new Audio();
cameraAudio.src = 'camera.wav';

// Set the properties of the audio object and preload the video
var options_audio = {
preload : 'auto'
}
for(var key in options_audio){
if(options_audio.hasOwnProperty(key) && (key in cameraAudio)){
cameraAudio[key] = options_audio[key];
                                                                                                                                                                                                         . autoplay'

3. preload: 'auto' means preloading

Related operations:

1. Play xxx.play()

2. Pause xxx.pause()

File download: Click to download

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template