Module webrtc.java

Class PeerConnectionFactory


  • public class PeerConnectionFactory
    extends dev.onvoid.webrtc.internal.DisposableNativeObject
    The PeerConnectionFactory is the main entry point for a WebRTC application. It provides factory methods for RTCPeerConnection and audio/video MediaStreamTracks.
    Author:
    Alex Andres
    • Constructor Detail

      • PeerConnectionFactory

        public PeerConnectionFactory()
        Creates an instance of PeerConnectionFactory.
      • PeerConnectionFactory

        public PeerConnectionFactory​(AudioDeviceModule audioModule)
        Creates an instance of PeerConnectionFactory with the provided audio module.
        Parameters:
        audioModule - The custom audio module.
    • Method Detail

      • createAudioSource

        public AudioSource createAudioSource​(AudioOptions options)
        Creates an AudioSource. The audio source may be used by one or more AudioTracks.
        Parameters:
        options - Audio options to control the audio processing.
        Returns:
        The created audio source.
      • getRtpReceiverCapabilities

        public RTCRtpCapabilities getRtpReceiverCapabilities​(MediaType type)
        Returns the capabilities of the system for receiving media of the given media type.
        Parameters:
        type - The type value must be either AUDIO or VIDEO.
        Returns:
        The supported capabilities for an RTCRtpReceiver.
      • getRtpSenderCapabilities

        public RTCRtpCapabilities getRtpSenderCapabilities​(MediaType type)
        Returns the capabilities of the system for sending media of the given media type.
        Parameters:
        type - The type value must be either AUDIO or VIDEO.
        Returns:
        The supported capabilities for an RTCRtpSender.
      • dispose

        public void dispose()
        Description copied from class: dev.onvoid.webrtc.internal.DisposableNativeObject
        Invoke native object destructors and free native resources.
        Specified by:
        dispose in class dev.onvoid.webrtc.internal.DisposableNativeObject