Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/web/api/audiodata/samplerate/index.md
6538 views
---
title: AudioData.sampleRate slug: Web/API/AudioData/sampleRate page-type: web-api-instance-property status: - experimental browser-compat: api.AudioData.sampleRate
---

{{APIRef("WebCodecs API")}}{{SeeCompatTable}}

The sampleRate read-only property of the {{domxref("AudioData")}} interface returns the sample rate in Hz.

Value

A decimal value.

Examples

The below example prints the value of sampleRate to the console.

console.log(audioData.sampleRate);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}