Package com.mux.sdk.webrtc.spaces
Class Track<T extends MediaStreamTrackHolder>
- java.lang.Object
-
- com.mux.sdk.webrtc.spaces.Track<T>
-
- Direct Known Subclasses:
LocalTrack
,RemoteTrack
public abstract class Track<T extends MediaStreamTrackHolder> extends java.lang.Object
A Track is used to interact with participant tracks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Track.TrackType
-
Field Summary
Fields Modifier and Type Field Description boolean
active
java.lang.String
id
java.lang.String
mid
java.lang.String
name
protected java.util.ArrayList<VideoTrackSink>
sinks
java.lang.String
source
static java.lang.String
SOURCE_CAMERA
static java.lang.String
SOURCE_MICROPHONE
static java.lang.String
SOURCE_SCREENSHARE
java.lang.String
spaceId
Track.TrackType
trackType
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addSink(VideoTrackSink sink)
boolean
equals(java.lang.Object o)
abstract java.lang.String
getConnectionId()
int
getHeight()
int
getMaxBitrate()
T
getMediaStreamTrackHolder()
com.mux.sdk.webrtc.spaces.Track.MirrorMode
getMirrorMode()
abstract java.lang.String
getParticipantId()
Track.TrackType
getType()
int
getWidth()
int
hashCode()
boolean
isActiveSpeaker()
boolean
isMuted()
Get the mute status of this trackabstract boolean
isSubscribed()
void
removeSink(VideoTrackSink sink)
protected void
setHeight(int height)
void
setMediaStreamTrackHolder(T holder)
void
setMirrorMode(com.mux.sdk.webrtc.spaces.Track.MirrorMode mirrorMode)
protected void
setWidth(int width)
Signals.Track
toSignals()
java.lang.String
toString()
protected void
updateSinkMirrorState()
-
-
-
Field Detail
-
SOURCE_SCREENSHARE
public static final java.lang.String SOURCE_SCREENSHARE
- See Also:
- Constant Field Values
-
SOURCE_CAMERA
public static final java.lang.String SOURCE_CAMERA
- See Also:
- Constant Field Values
-
SOURCE_MICROPHONE
public static final java.lang.String SOURCE_MICROPHONE
- See Also:
- Constant Field Values
-
sinks
protected java.util.ArrayList<VideoTrackSink> sinks
-
active
public boolean active
-
spaceId
public final java.lang.String spaceId
-
id
public final java.lang.String id
-
trackType
public final Track.TrackType trackType
-
mid
public java.lang.String mid
-
source
public final java.lang.String source
-
name
public final java.lang.String name
-
-
Method Detail
-
isActiveSpeaker
public boolean isActiveSpeaker()
-
getConnectionId
public abstract java.lang.String getConnectionId()
-
getParticipantId
public abstract java.lang.String getParticipantId()
-
isSubscribed
public abstract boolean isSubscribed()
-
getMediaStreamTrackHolder
public T getMediaStreamTrackHolder()
-
setMediaStreamTrackHolder
public void setMediaStreamTrackHolder(T holder)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getType
public Track.TrackType getType()
-
toSignals
public Signals.Track toSignals()
-
getMaxBitrate
public int getMaxBitrate()
-
isMuted
public final boolean isMuted()
Get the mute status of this track- Returns:
- True if the track is muted.
-
addSink
public void addSink(VideoTrackSink sink)
-
removeSink
public void removeSink(VideoTrackSink sink)
-
setWidth
protected void setWidth(int width)
-
setHeight
protected void setHeight(int height)
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
updateSinkMirrorState
protected void updateSinkMirrorState()
-
setMirrorMode
public void setMirrorMode(com.mux.sdk.webrtc.spaces.Track.MirrorMode mirrorMode)
-
getMirrorMode
public com.mux.sdk.webrtc.spaces.Track.MirrorMode getMirrorMode()
-
-