Interface IWebRTCClient


public interface IWebRTCClient
  • Method Details

    • setWebRTCAdaptor

      void setWebRTCAdaptor(IWebRTCAdaptor webRTCAdaptor)
    • sendVideoPacket

      void sendVideoPacket(ByteBuffer videoPacket, boolean isKeyFrame, long timestamp, int frameRotation, List<NaluIndex> naluIndices, String trackId)
      Send video packet to connected client
      Parameters:
      videoPacket -
      isKeyFrame -
      naluIndices -
      trackIndex -
    • sendAudioPacket

      void sendAudioPacket(ByteBuffer audioPacket, long timestamp, String trackId)
      Send audio packet to connected client
      Parameters:
      audioPacket -
      audioLevel -
    • getTargetBitrate

      int getTargetBitrate()
    • start

      void start()
    • setRemoteDescription

      void setRemoteDescription(SessionDescription sdp)
    • addIceCandidate

      void addIceCandidate(IceCandidate iceCandidate)
    • setVideoResolution

      void setVideoResolution(int width, int height)
    • addWebRTCMuxer

      void addWebRTCMuxer(IWebRTCMuxer webRTCMuxer)
    • removeWebRTCMuxer

      void removeWebRTCMuxer(IWebRTCMuxer webRTCMuxer)
    • stop

      void stop()
    • getTimeToStartStreaming

      long getTimeToStartStreaming()
      Returns the time in milliseconds between the time when start function is called and the time when streaming is started
      Returns:
      the time in milliseconds or -1 if timing is not available yet
    • getTimeToStop

      long getTimeToStop()
      Returns the time in milliseconds between the time when stop function is called and the time when streaming is fully stopped
      Returns:
      the time in milliseconds or -1 if timing is not available yet
    • getVideoFrameSentPeriod

      float getVideoFrameSentPeriod()
      Return the period of send video period in milliseconds
      Returns:
    • getAudioFrameSentPeriod

      float getAudioFrameSentPeriod()
      Return the period of send audio period in milliseconds
      Returns:
    • getSendVideoPacketCallCount

      long getSendVideoPacketCallCount()
      Returns:
      the number of times video packet send called
    • getSendAudioPacketCallCount

      long getSendAudioPacketCallCount()
      Returns:
      number of times audio packet send called
    • getVideoStats

      WebRTCVideoSendStats getVideoStats()
      Returns:
      low level video stats
    • getAudioStats

      WebRTCAudioSendStats getAudioStats()
      Returns:
      low level audio stats
    • increaseExcessiveBandwidthCount

      void increaseExcessiveBandwidthCount()
      It's called when there is excessive bandwidth than the current one
    • getExcessiveBandwidthCount

      int getExcessiveBandwidthCount()
      Number of consecutive calls of increaseExcessiveBandwidthCount
      Returns:
    • resetExcessiveBandwidthCount

      void resetExcessiveBandwidthCount()
      Reset the excessive bandwidth count
    • getRttMeasurement

      int getRttMeasurement()
      Return the round trip time measurement
      Returns:
    • getPacketLoss

      int getPacketLoss()
      Returns the packetloss rate
      Returns:
    • setTryCountBeforeSwitchBack

      void setTryCountBeforeSwitchBack(int tryCountBeforeSwitchback)
      Parameters:
      tryCountBeforeSwitchback -
    • getTryCountBeforeSwitchBack

      int getTryCountBeforeSwitchBack()
      Returns:
      decrease
    • cacheChannelParameters

      void cacheChannelParameters()
      Cache current channel parameters like round trip time and packet loss
    • getCachedPacketLoss

      int getCachedPacketLoss()
      Returns:
      cached packet loss
    • getCachedRttMeasurement

      int getCachedRttMeasurement()
      Returns:
      cache rtt measurement
    • getForceStreamHeight

      int getForceStreamHeight(String streamId)
      Returns:
      stream resolution forced value If it's automatic, it returns 0
    • forceStreamQuality

      boolean forceStreamQuality(int streamHeight, String subtrackId)
      Parameters:
      streamHeight - the resolution height to be forced to send
      subtrackId - the subtrack id to be forced to send. If it's null or empty, it just replaces main streamId
      Returns:
      true if it's successful, false if it's not changed
    • getClientInfo

      String getClientInfo()
      Returns:
      free text client info
    • removeTracksOnTheFly

      void removeTracksOnTheFly(String trackId)
      Remove a track
      Parameters:
      trackId -
    • getWebRTCMuxer

      IWebRTCMuxer getWebRTCMuxer(String trackId)
      Get the muxer
      Parameters:
      trackId -
      Returns:
      the muxer belongs to the trackId
    • notifyWebRTCClientAboutChangeInResolution

      void notifyWebRTCClientAboutChangeInResolution(int streamHeight, String streamId)
      Client stream resolution change notification
      Parameters:
      streamHeight -
      streamId - is may be the main streamId or subtrackId
    • getStreamId

      String getStreamId()
      Getter for stream Id
      Returns:
    • getRemoteIpAddress

      String getRemoteIpAddress()
      Getter for remote ip address
      Returns: