YouTip LogoYouTip

Prop Audio Buffered

HTML DOM Audio buffered Property

HTML DOM Audio buffered Property

-- Learning is not just about technology, but also about dreams!

JavaScript Reference

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

HTML DOM Area Object

HTML DOM Base Object

Audio buffered Property

Audio Object Reference Audio Object

Example

Get the buffered range of the first part of the audio:

var x = document.getElementById("myAudio");

document.getElementById("demo").innerHTML = "Start: " + x.buffered.start(0)
+ " End: " + x.buffered.end(0);

Try it yourself Β»


Definition and Usage

The buffered property returns a TimeRanges object.

The TimeRanges object represents the buffered ranges of the audio.

A buffered range is a time range of buffered audio/video. If the user jumps around in the audio/video, there will be multiple buffered ranges.

Note: This property is read-only.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the buffered object.

Note: Internet Explorer 8 or earlier versions do not support this property.


Syntax

audioObject.buffered

Return Value

Type Description
TimeRanges Object Represents the buffered parts of the audio/video. TimeRanges object properties:
* length - Get the number of buffered ranges in the audio/video
* start(index) - Get the start position of a buffered range
* end(index) - Get the end position of a buffered range
Note: The index of the first buffered range is 0.

Audio Object Reference Audio Object

HTML DOM Area Object

HTML DOM Base Object

iFlytek Xingchen Coding Plan includes free model call quota, DeepSeek, GLM, Kimi, MiniMax, one-stop experience and deployment platform. Configuration Guide Β₯3.9/month Subscribe Now

Click to Share Notes

Cancel

← Prop Audio ControllerProp Audio Autoplay β†’