AVTubeExpublic class AVTube extends Object
A media tube represents a media stream output, for example, a smartphone speaker or Bluetooth headset.
SystemCapability.Multimedia#MEDIA| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
AVTube.DeviceType |
Enumerates the device types available for
AVTube instances. |
static class |
AVTube.PlayMode |
Enumerates the playback modes available for
AVTube instances. |
static class |
AVTube.SetInfo |
Provides information about media tube types.
|
static class |
AVTube.UsageScene |
Defines the scenes supported by a media tube.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
cmdDecVolume(int decrement) |
Decreases the volume of this
AVTube instance. |
void |
cmdIncVolume(int increment) |
Increases the volume of this
AVTube instance. |
void |
cmdSetVolume(int volume) |
Sets the volume for this
AVTube instance. |
int |
curVolume() |
Obtains the current volume of this
AVTube instance. |
AVTube.DeviceType |
deviceType() |
Obtains the device type for which this
AVTube instance is used. |
boolean |
isConnecting() |
Checks whether this
AVTube instance is in the connecting process. |
boolean |
isReady() |
Checks whether this
AVTube instance is currently available. |
Object |
label() |
Obtains the label set for this
AVTube instance. |
int |
maxVolume() |
Obtains the maximum volume supported by this
AVTube instance. |
AVTube.PlayMode |
playMode() |
Obtains the playback mode of this
AVTube instance. |
void |
setLabel(Object label) |
Sets a label for this
AVTube instance. |
AudioStreamInfo.StreamType |
streamType() |
Obtains the type of audio streams using this
AVTube instance. |
String |
toString() |
Returns a string representation of this
AVTube instance. |
String |
tubeName() |
Obtains the name of this
AVTube instance. |
int |
usageScenes() |
Obtains the scenes supported by this
AVTube instance. |
public AVTube.DeviceType deviceType()
AVTube instance is used.AVTube.DeviceType#BLUETOOTH for BluetootH devices; returns
AVTube.DeviceType#UNKNOWN for other devices.public int usageScenes()
AVTube instance.AVTube.UsageScene#REAL_TIME_AUDIO, AVTube.UsageScene#REAL_TIME_VIDEO, and
AVTube.UsageScene#USER_EXTENDED.public String tubeName()
AVTube instance.AVTubeEx.setTubeName(String),
AVTubeEx.setTubeName(int)public boolean isReady()
AVTube instance is currently available.true if this AVTube is available; returns false otherwise.public boolean isConnecting()
AVTube instance is in the connecting process.true if this AVTube is in the connecting process; returns false
otherwise.public int maxVolume()
AVTube instance.AVTubeEx.setMaxVolume(int)public int curVolume()
AVTube instance.AVTubeEx.setCurVolume(int)public void setLabel(Object label)
AVTube instance.label - Indicates the label to set.label()public Object label()
AVTube instance.setLabel(Object)public AVTube.PlayMode playMode()
AVTube instance.AVTube.PlayMode#LOCAL for local playback or
AVTube.PlayMode#DISTRIBUTE for remote playback.AVTubeEx.setPlayMode(PlayMode)public AudioStreamInfo.StreamType streamType()
AVTube instance.AudioStreamInfo.StreamType.AVTubeEx.setStreamType(ohos.media.audio.AudioStreamInfo.StreamType)public void cmdIncVolume(int increment)
AVTube instance.increment - Indicates the volume increment.cmdDecVolume(int)public void cmdDecVolume(int decrement)
AVTube instance.decrement - Indicates the volume decrement.cmdIncVolume(int)public void cmdSetVolume(int volume)
AVTube instance.volume - Indicates the volume to set.AVTubeEx.setCurVolume(int)