This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The getOutputTimestamp()
property of the AudioContext
interface returns a new AudioTimestamp
object containing two correlated context's audio stream position values.
The two values are as follows:
- 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'sAudioContext.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 asperformance.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 thecurrentTime
for theBaseAudioContext
.performanceTime
: A point in the time coordinate system of aPerformance
interface.
Specifications
Specification | Status | Comment |
---|---|---|
Web Audio API The definition of 'getOutputTimestamp()' in that specification. |
Working Draft | Initial definition. |
Browser Compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 57 | ? | No | No | 44 | No |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic support | 57 | 57 | ? | No | No | 44 | No |