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.

    Example

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

    Parameters

    Returns void

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