-
public final class ComposeVisibility extends VideoSinkVisibilityA VideoSinkVisibility for compose views.
To use, pass an
onGloballyPositionedmodifier your composable like so:modifier = Modifier.onGloballyPositioned { videoSinkVisibility.onGloballyPositioned(it) }onDispose must be called when the associated composable is no longer used (i.e. with a DisposableEffect).
DisposableEffect(room) { onDispose { videoSinkVisibility.onDispose() } }
-
-
Constructor Summary
Constructors Constructor Description ComposeVisibility()
-
Method Summary
Modifier and Type Method Description BooleanisVisible()Track.Dimensionssize()final UnitonGloballyPositioned(LayoutCoordinates layoutCoordinates)To be called from a compose view, using Modifier.onGloballyPositioned.final UnitonDispose()Cleans up any resources held by this object. -
Methods inherited from class io.livekit.android.room.track.video.VideoSinkVisibility
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged -
Methods inherited from class io.livekit.android.compose.ui.ComposeVisibility
close, notifyChanged -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
size
Track.Dimensions size()
-
onGloballyPositioned
final Unit onGloballyPositioned(LayoutCoordinates layoutCoordinates)
To be called from a compose view, using
Modifier.onGloballyPositioned.Example:
modifier = Modifier.onGloballyPositioned { videoSinkVisibility.onGloballyPositioned(it) }
-
-
-
-