Package com.flashphoner.fpwcsapi.session
Class Stream
java.lang.Object
com.flashphoner.fpwcsapi.session.Stream
Create stream for publishing of playing
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
enableConnectionQualityCalculation
(boolean enableConnectionQualityCalculation) Disable or enable calculating connection qualityint
int
getId()
getInfo()
getName()
int
void
getStats
(StreamStatsCallback streamStatsCallback) int
getWidth()
boolean
Check if audio mutedboolean
boolean
boolean
boolean
isRecord()
boolean
Check if video mutedvoid
Mute audio on the streamvoid
Check if video muted Mute video in the streamvoid
on
(StreamEventHandler streamEventHandler) Handle changes in the stream status or eventvoid
on
(StreamStatusEvent streamStatusEvent) Handle changes in the stream statusvoid
onStreamEvent
(StreamEvent streamEvent) void
play()
Play stream from servervoid
publish()
Publish stream to servervoid
void
void
setAvailableStreamCallback
(AvailableStreamCallback availableStreamCallback) void
setConnectionQualityCallback
(ConnectionQualityCallback connectionQualityCallback) Set callback for connection qualityvoid
stop()
Stop stream publishing or playback and close associated mediaConnectionvoid
switchCamera
(CameraSwitchHandler cameraSwitchHandler) Switch camera if existvoid
switchRenderer
(org.webrtc.SurfaceViewRenderer newSurfaceRender) Switch the stream to a new renderervoid
Unmute audio on the streamvoid
Unmute video on the stream
-
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
Switch camera if exist- Parameters:
cameraSwitchHandler
-
-
on
Handle changes in the stream status- Parameters:
streamStatusEvent
-
-
on
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
-
getStats
-
setConnectionQualityCallback
Set callback for connection quality- Parameters:
connectionQualityCallback
-
-
enableConnectionQualityCalculation
public void enableConnectionQualityCalculation(boolean enableConnectionQualityCalculation) Disable or enable calculating connection quality- Parameters:
enableConnectionQualityCalculation
-
-
onStreamEvent
-
isEnableConnectionQualityCalculation
public boolean isEnableConnectionQualityCalculation() -
getId
-
getName
-
isPublished
public boolean isPublished() -
isHasAudio
-
isHasVideo
public boolean isHasVideo() -
getStatus
-
getInfo
-
isRecord
-
getRecordName
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getBitrate
public int getBitrate() -
getQuality
public int getQuality() -
getRemoteBitrate
-
getNetworkBandwidth
-
getConstraints
-
getAudioState
-
getVideoState
-
sendData
-
sendMediaStates
public void sendMediaStates()
-