AudioContext.getOutputTimestamp()

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.

The getOutputTimestamp() property of the AudioContext interface returns a new AudioTimestamp containing two correlated context's audio stream position values:

  • The AudioTimestamp.contextTime member contains the time of the sample frame which is currently being rendered by the audio output device (i.e., output audio stream position), in the same units and origin as context's AudioContext.currentTime
  • The AudioTimestamp.performanceTime member contains the time, estimating the moment when the sample frame corresponding to the stored contextTime value was rendered by the audio output device, in the same units and origin as performance.now().

Syntax

var timestamp = AudioContext.getOutputTimestamp()

Parameters

None.

Returns

An AudioTimestamp, which has the following properties.

  • contextTime: A point in the time coordinate system of the currentTime for the BaseAudioContext.
  • performanceTime: A point in the time coordinate system of a Performance interface.

Specifications

Specification Status Comment
Web Audio API
The definition of 'getOutputTimestamp()' in that specification.
Working Draft Initial definition.

Browser Compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 57 ? ? 44 ?
Feature Android Webview Chrome for Android Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile
Basic support 57 57 ? ? ? 44 ?

Document Tags and Contributors

 Contributors to this page: bunnybooboo, jpmedley
 Last updated by: bunnybooboo,