Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Web Audio API | AudioContext outputLatency property

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The AudioContext interface has a outputLatency property which provides an approximation of the latency in output of the current audio context. This time is between the browser requesting to the host system to start a buffer and the time at which the first sample in the buffer is actually processed by the audio output device.

Syntax:

var latency = audioCtx.outputLatency;

Return Value:

A double value is returned in seconds

Example 1:




<!DOCTYPE html>
<html>
  
<head>
    <title>
        AudioContext outputLatency property
    </title>
</head>
  
<body>
    <center>
        <h1 style="color:green">
        GeeksforGeeks
        </h1>
        <h2>AudioContext outputLatency property</h2>
        <script>
            const audioCtx = new AudioContext();
            console.log(audioCtx.outputLatency);
        </script>
    </center>
</body>
  
</html>

Output:

undefined

Supported Browsers:

    None
My Personal Notes arrow_drop_up
Last Updated : 19 Jul, 2019
Like Article
Save Article
Similar Reads
Related Tutorials