Package tvi.webrtc

Class RtpSender

java.lang.Object
tvi.webrtc.RtpSender

public class RtpSender extends Object
Java wrapper for a C++ RtpSenderInterface.
  • Constructor Details

    • RtpSender

      public RtpSender(long nativeRtpSender)
  • Method Details

    • setTrack

      public boolean setTrack(@Nullable MediaStreamTrack track, boolean takeOwnership)
      Starts sending a new track, without requiring additional SDP negotiation.

      Note: This is equivalent to replaceTrack in the official WebRTC API. It was just implemented before the standards group settled on a name.

      Parameters:
      takeOwnership - If true, the RtpSender takes ownership of the track from the caller, and will auto-dispose of it when no longer needed. `takeOwnership` should only be used if the caller owns the track; it is not appropriate when the track is owned by, for example, another RtpSender or a MediaStream.
      Returns:
      true on success and false on failure.
    • track

      @Nullable public MediaStreamTrack track()
    • setStreams

      public void setStreams(List<String> streamIds)
    • getStreams

      public List<String> getStreams()
    • setParameters

      public boolean setParameters(RtpParameters parameters)
    • getParameters

      public RtpParameters getParameters()
    • id

      public String id()
    • dtmf

      @Nullable public DtmfSender dtmf()
    • setFrameEncryptor

      public void setFrameEncryptor(FrameEncryptor frameEncryptor)
    • dispose

      public void dispose()