Package com.amazonaws.ivs.broadcast
Class AudioLocalStageStream
- java.lang.Object
-
- com.amazonaws.ivs.broadcast.StageStream
-
- com.amazonaws.ivs.broadcast.LocalStageStream
-
- com.amazonaws.ivs.broadcast.AudioLocalStageStream
-
@RequiresApi(api=28) public class AudioLocalStageStream extends LocalStageStream
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.amazonaws.ivs.broadcast.StageStream
StageStream.Listener, StageStream.Type
-
-
Constructor Summary
Constructors Constructor Description AudioLocalStageStream(Device device)
Note: Since VOICE_COMMUNICATION audio mode is used, audio may be routed from a different audio device than the oneAudioLocalStageStream
was created with.AudioLocalStageStream(Device device, StageAudioConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImagePreviewSurfaceTarget
getPreviewSurfaceTarget()
Create a preview for this stream, only works when Type = VideoImagePreviewSurfaceView
getPreviewSurfaceView()
Create a preview for this stream, only works when Type = VideoImagePreviewView
getPreviewTextureView()
Create a preview for this stream, only works when Type = Video Please useStageStream.getPreviewSurfaceView()
if you can, it has better performancevoid
setMuted(boolean muted)
setMuted mutes current LocalStageStream.void
setStatsCallback(AudioDevice.StatsCallback callback)
-
Methods inherited from class com.amazonaws.ivs.broadcast.LocalStageStream
getAudioConfiguration, getVideoConfiguration, setAudioConfiguration, setVideoConfiguration
-
Methods inherited from class com.amazonaws.ivs.broadcast.StageStream
getDevice, getMuted, getPreview, getStreamType, requestQualityStats, requestRTCStats, setListener
-
-
-
-
Constructor Detail
-
AudioLocalStageStream
public AudioLocalStageStream(@NonNull Device device)
Note: Since VOICE_COMMUNICATION audio mode is used, audio may be routed from a different audio device than the oneAudioLocalStageStream
was created with. Based on device vendor audio policy.
-
AudioLocalStageStream
public AudioLocalStageStream(@NonNull Device device, @Nullable StageAudioConfiguration configuration)
-
-
Method Detail
-
getPreviewTextureView
public ImagePreviewView getPreviewTextureView()
Description copied from class:StageStream
Create a preview for this stream, only works when Type = Video Please useStageStream.getPreviewSurfaceView()
if you can, it has better performance- Specified by:
getPreviewTextureView
in classStageStream
- Returns:
- A new preview for this image stream
-
getPreviewSurfaceTarget
public ImagePreviewSurfaceTarget getPreviewSurfaceTarget()
Description copied from class:StageStream
Create a preview for this stream, only works when Type = Video- Specified by:
getPreviewSurfaceTarget
in classStageStream
- Returns:
- A new preview for this image stream, don't forget to
call
ImagePreviewSurfaceTarget.release()
when done.
-
getPreviewSurfaceView
public ImagePreviewSurfaceView getPreviewSurfaceView()
Description copied from class:StageStream
Create a preview for this stream, only works when Type = Video- Specified by:
getPreviewSurfaceView
in classStageStream
- Returns:
- A new preview for this image stream
-
setStatsCallback
public void setStatsCallback(AudioDevice.StatsCallback callback)
-
setMuted
public void setMuted(boolean muted)
Description copied from class:LocalStageStream
setMuted mutes current LocalStageStream.- Specified by:
setMuted
in classLocalStageStream
- Parameters:
muted
- Mute the stream if it is true, and unmute the stream if it is false
-
-