Class Stream

java.lang.Object
com.flashphoner.fpwcsapi.session.Stream

public class Stream extends Object
Create stream for publishing of playing
  • Method Details

    • publish

      public void publish()
      Publish stream to server
    • play

      public void play()
      Play stream from server
    • availableStream

      public void availableStream()
    • switchRenderer

      public void switchRenderer(org.webrtc.SurfaceViewRenderer newSurfaceRender)
      Switch the stream to a new renderer
      Parameters:
      newSurfaceRender -
    • switchCamera

      public void switchCamera(CameraSwitchHandler cameraSwitchHandler)
      Switch camera if exist
      Parameters:
      cameraSwitchHandler -
    • on

      public void on(StreamStatusEvent streamStatusEvent)
      Handle changes in the stream status
      Parameters:
      streamStatusEvent -
    • on

      public void on(StreamEventHandler streamEventHandler)
      Handle changes in the stream status or event
      Parameters:
      streamEventHandler -
    • stop

      public void stop()
      Stop stream publishing or playback and close associated mediaConnection
    • muteAudio

      public void muteAudio()
      Mute audio on the stream
    • isPublishingStatus

      public boolean isPublishingStatus()
    • unmuteAudio

      public void unmuteAudio()
      Unmute audio on the stream
    • isAudioMuted

      public boolean isAudioMuted()
      Check if audio muted
      Returns:
      true if audio is muted
    • muteVideo

      public void muteVideo()
      Check if video muted Mute video in the stream
    • unmuteVideo

      public void unmuteVideo()
      Unmute video on the stream
    • isVideoMuted

      public boolean isVideoMuted()
      Check if video muted
      Returns:
      true if video is muted
    • setAvailableStreamCallback

      public void setAvailableStreamCallback(AvailableStreamCallback availableStreamCallback)
    • getStats

      public void getStats(StreamStatsCallback streamStatsCallback)
    • setConnectionQualityCallback

      public void setConnectionQualityCallback(ConnectionQualityCallback connectionQualityCallback)
      Set callback for connection quality
      Parameters:
      connectionQualityCallback -
    • enableConnectionQualityCalculation

      public void enableConnectionQualityCalculation(boolean enableConnectionQualityCalculation)
      Disable or enable calculating connection quality
      Parameters:
      enableConnectionQualityCalculation -
    • onStreamEvent

      public void onStreamEvent(StreamEvent streamEvent)
    • isEnableConnectionQualityCalculation

      public boolean isEnableConnectionQualityCalculation()
    • getId

      public String getId()
    • getName

      public String getName()
    • isPublished

      public boolean isPublished()
    • isHasAudio

      public Boolean isHasAudio()
    • isHasVideo

      public boolean isHasVideo()
    • getStatus

      public StreamStatus getStatus()
    • getInfo

      public String getInfo()
    • isRecord

      public Boolean isRecord()
    • getRecordName

      public String getRecordName()
    • getWidth

      public int getWidth()
    • getHeight

      public int getHeight()
    • getBitrate

      public int getBitrate()
    • getQuality

      public int getQuality()
    • getRemoteBitrate

      public Long getRemoteBitrate()
    • getNetworkBandwidth

      public Long getNetworkBandwidth()
    • getConstraints

      public Constraints getConstraints()
    • getAudioState

      public MediaState getAudioState()
    • getVideoState

      public MediaState getVideoState()
    • sendData

      public void sendData(Map<String,Object> payload)
    • sendMediaStates

      public void sendMediaStates()