Function setupReceiverMetadata

  • When metadata is enabled, call setupReceiverMetadata to install decoders in RTCRtpReceivers. This will install either a RTCRtpScriptTransform (Safari) or use Insertable Streams (Chrome) to extract position information from transmitted audio data. When position information is extracted, the RemoteSourcePositionUpdate callback passed to setupHRTF will be called.


    let trackId = ...;
    let receivers = peerConnection.getReceivers();
    let receiver = receivers.find(e => e.track?.id === trackId && e.track?.kind === 'audio');
    setupReceiverMetadata(receiver, uid);


    • receiver: RTCRtpReceiverIS

      an RTCRtpReceiver in which to install a position decoder.

    • uid: string

      a string used to identify this particular RTCRtpReceiver. When calling the RemoteSourcePositionUpdate callback, this string will be passed as the first parameter.

    Returns void

© 2023 High Fidelity, Inc. | All rights reserved Terms of Service | Privacy Policy