Android SDK API Reference

Public Member Functions | List of all members
io.skyway.Peer.Browser.MediaStream Class Reference

MediaStream. More...

Public Member Functions

 MediaStream (Peer provider, long nativeMediaStream, MediaConstraints constraints, SurfaceTextureHelper textureHelper, VideoCapturer videoCapturer)
 
void finalize ()
 
void close ()
 Close all tracks.
 
String getLabel ()
 Get media stream label. More...
 
String getPeerId ()
 Get remote media stream peer id. More...
 
int getVideoTracks ()
 Get vide track count. More...
 
void setEnableVideoTrack (int trackNo, boolean enable)
 Get video track enabling state. More...
 
boolean getEnableVideoTrack (int trackNo)
 Set Video track enabling state. More...
 
int getAudioTracks ()
 Get video track enabling state. More...
 
void setEnableAudioTrack (int trackNo, boolean enable)
 Set Audio track enabling state. More...
 
boolean getEnableAudioTrack (int trackNo)
 Get audio track enabling state. More...
 
boolean switchCamera ()
 Switch camera. More...
 
void addVideoRenderer (Canvas canvas, int videoTrackNumber)
 Add video renderer. More...
 
void removeVideoRenderer (Canvas canvas, int videoTrackNumber)
 Remove video renderer. More...
 
boolean setVideoCapture (Object capturer)
 
boolean setVideoSource (org.webrtc.VideoSource source)
 
boolean setAudioSource (org.webrtc.AudioSource source)
 
boolean addVideoTrack (org.webrtc.VideoTrack track)
 
boolean removeVideoTrack (org.webrtc.VideoTrack track)
 
boolean addAudioTrack (org.webrtc.AudioTrack track)
 
boolean removeAudioTrack (org.webrtc.AudioTrack track)
 

Detailed Description

MediaStream.

Member Function Documentation

◆ addAudioTrack()

boolean io.skyway.Peer.Browser.MediaStream.addAudioTrack ( org.webrtc.AudioTrack  track)

◆ addVideoRenderer()

void io.skyway.Peer.Browser.MediaStream.addVideoRenderer ( Canvas  canvas,
int  videoTrackNumber 
)

Add video renderer.

Parameters
canvasCanvas to render a video track in this stream.
videoTrackNumberVideo track number

◆ addVideoTrack()

boolean io.skyway.Peer.Browser.MediaStream.addVideoTrack ( org.webrtc.VideoTrack  track)

◆ getAudioTracks()

int io.skyway.Peer.Browser.MediaStream.getAudioTracks ( )

Get video track enabling state.

Returns
Video track number.

◆ getEnableAudioTrack()

boolean io.skyway.Peer.Browser.MediaStream.getEnableAudioTrack ( int  trackNo)

Get audio track enabling state.

Parameters
trackNoAudio track number.
Returns
Enabling state

◆ getEnableVideoTrack()

boolean io.skyway.Peer.Browser.MediaStream.getEnableVideoTrack ( int  trackNo)

Set Video track enabling state.

Parameters
trackNoVideo track number.
Returns
Enabling state.

◆ getLabel()

String io.skyway.Peer.Browser.MediaStream.getLabel ( )

Get media stream label.

Returns
Label

◆ getPeerId()

String io.skyway.Peer.Browser.MediaStream.getPeerId ( )

Get remote media stream peer id.

Returns
Peer id

◆ getVideoTracks()

int io.skyway.Peer.Browser.MediaStream.getVideoTracks ( )

Get vide track count.

Returns
Count of video track.

◆ removeAudioTrack()

boolean io.skyway.Peer.Browser.MediaStream.removeAudioTrack ( org.webrtc.AudioTrack  track)

◆ removeVideoRenderer()

void io.skyway.Peer.Browser.MediaStream.removeVideoRenderer ( Canvas  canvas,
int  videoTrackNumber 
)

Remove video renderer.

Parameters
canvasCanvas to render a video track in this stream.
videoTrackNumberVideo track number

◆ removeVideoTrack()

boolean io.skyway.Peer.Browser.MediaStream.removeVideoTrack ( org.webrtc.VideoTrack  track)

◆ setAudioSource()

boolean io.skyway.Peer.Browser.MediaStream.setAudioSource ( org.webrtc.AudioSource  source)

◆ setEnableAudioTrack()

void io.skyway.Peer.Browser.MediaStream.setEnableAudioTrack ( int  trackNo,
boolean  enable 
)

Set Audio track enabling state.

Parameters
trackNoAudio track number.
enableEnabling state

◆ setEnableVideoTrack()

void io.skyway.Peer.Browser.MediaStream.setEnableVideoTrack ( int  trackNo,
boolean  enable 
)

Get video track enabling state.

Parameters
trackNoVideo track number.
enableEnabling state.

◆ setVideoCapture()

boolean io.skyway.Peer.Browser.MediaStream.setVideoCapture ( Object  capturer)

◆ setVideoSource()

boolean io.skyway.Peer.Browser.MediaStream.setVideoSource ( org.webrtc.VideoSource  source)

◆ switchCamera()

boolean io.skyway.Peer.Browser.MediaStream.switchCamera ( )

Switch camera.

Returns
Method result.