Class WebRTCMediaProvider

java.lang.Object
com.flashphoner.fpwcsapi.webrtc.WebRTCMediaProvider

public class WebRTCMediaProvider extends Object
WebRTCMediaProvider
  • Field Details

  • Method Details

    • getInstance

      public static WebRTCMediaProvider getInstance()
    • setPeerConnectionFactoryOptions

      public void setPeerConnectionFactoryOptions(org.webrtc.PeerConnectionFactory.Options options)
    • init

      public void init(android.content.Context context)
    • createMediaConnection

      public MediaConnection createMediaConnection(String id, String videoCodec, org.webrtc.PeerConnection.RTCConfiguration mediaOptions)
      Create a new media connection with specified codec
      Parameters:
      id -
      videoCodec -
      Returns:
    • createMediaConnection

      public MediaConnection createMediaConnection(String id, org.webrtc.SurfaceViewRenderer remoteRender, org.webrtc.PeerConnection.RTCConfiguration mediaOptions)
      Create a new media connection with specified renderer and default codecs
      Parameters:
      id -
      remoteRender -
      Returns:
    • createMediaConnection

      public MediaConnection createMediaConnection(String id, String videoCodec, org.webrtc.SurfaceViewRenderer remoteRender, org.webrtc.PeerConnection.RTCConfiguration mediaOptions)
      Create a new media connection with specified renderer and video codec
      Parameters:
      id -
      videoCodec -
      remoteRender -
      Returns:
    • destroyMediaConnection

      public void destroyMediaConnection(String id)
      Remove media connection by id
      Parameters:
      id -
    • getMediaConnection

      public MediaConnection getMediaConnection(String id)
      Get media connection by id
      Parameters:
      id -
      Returns:
    • releaseLocalMediaAccess

      public void releaseLocalMediaAccess(MediaConnectionOptions mediaConnectionOptions)
    • stopCapturer

      public void stopCapturer(org.webrtc.VideoCapturer capturer)
    • close

      public void close()
      Close media connection
    • createLocalMediaStreams

      public MediaConnectionOptions createLocalMediaStreams(Constraints constraints, boolean muteAudio, boolean muteVideo, android.content.Context context, org.webrtc.SurfaceViewRenderer renderer)
      Create local media streams corresponding specified media constrains for the specified renderer
      Parameters:
      constraints -
      renderer -
      Returns:
      MediaConnectionOptions which contains list of MediaStream objects
    • switchCamera

      public void switchCamera(CameraSwitchHandler cameraSwitchHandler)
    • size

      public int size()
      Returns:
      Number of media connections
    • getFactory

      public org.webrtc.PeerConnectionFactory getFactory()
    • setMediaProjection

      public void setMediaProjection(android.media.projection.MediaProjection mediaProjection)
    • setCustomVideoCapturer

      public void setCustomVideoCapturer(org.webrtc.VideoCapturer currentVideoCapturer)
    • resetCustomVideoCapturer

      public void resetCustomVideoCapturer()
    • getAudioManager

      public WCSAudioManager getAudioManager()
    • turnOnFlashlight

      public boolean turnOnFlashlight()
    • turnOffFlashlight

      public boolean turnOffFlashlight()
    • isFlashlightSupport

      public boolean isFlashlightSupport()