Function setupReceiverMetadata

  • Installs a metadata decoder in a WebRTC RTCRtpSender to extract position information from an incoming WebRTC audio stream.

    This will install a decoder using either WebRTC Insertable Streams (e.g., Chrome, Edge) or WebRTC Encoded Transform (e.g., Safari).

    When position information is extracted, the PositionUpdateCallback passed into setupHRTF will be called.


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


    Returns void

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