chromium/third_party/blink/renderer/modules/webcodecs/encoded_audio_chunk.idl

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

enum EncodedAudioChunkType {
    "key",
    "delta",
};

[
    Exposed=(Window,DedicatedWorker)
] interface EncodedAudioChunk {
  [CallWith=ScriptState, RaisesException]
  constructor(EncodedAudioChunkInit init);
  readonly attribute EncodedAudioChunkType type;
  readonly attribute long long timestamp;  // microseconds
  readonly attribute unsigned long byteLength;
  readonly attribute unsigned long long? duration;
  [RaisesException]
  void copyTo(AllowSharedBufferSource destination);
};