Class MediaTrack
java.lang.Object
com.codename1.webrtc.MediaTrack
One stream of audio or video: the local camera or microphone, or what arrives from the other side.
A muted track keeps flowing as silence or black frames, so unmuting is instant and the other side's connection never notices.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetKind()booleanbooleanisLocal()Whether this is this device's own camera or microphone.booleanisVideo()voidrelease()Stops the camera or microphone behind a local track.voidsetEnabled(boolean enabled) Mutes (false) or unmutes (true) the track.voidSwitches a local video track between the front and back cameras.
-
Field Details
-
AUDIO
-
VIDEO
-
-
Method Details
-
getKind
-
isVideo
public boolean isVideo() -
isLocal
public boolean isLocal()Whether this is this device's own camera or microphone. -
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) Mutes (false) or unmutes (true) the track. -
switchCamera
public void switchCamera()Switches a local video track between the front and back cameras. Does nothing for any other track. -
release
public void release()Stops the camera or microphone behind a local track. A track cannot be restarted; open new media instead. Remote tracks end with their connection, so this does nothing for them.
-