StreamSessionState enum
Represents the current state of a stream session.
Values
- stopping → const StreamSessionState
-
The session is in the process of stopping.
const StreamSessionState(0) - stopped → const StreamSessionState
-
The session is completely stopped.
Terminal — clear your texture id when you see this. The native texture is unregistered alongside it, so continuing to render it shows a black or frozen frame.
Since 0.9.0 this also arrives when the app is backgrounded without MetaWearablesDat.enableBackgroundStreaming, preceded by a
stoppedForBackgroundcode on MetaWearablesDat.streamSessionErrorStream. That variant is deliberate, not a failure: do not retry it, and expect no auto-resume on foreground.const StreamSessionState(1) - waitingForDevice → const StreamSessionState
-
The session is waiting for a device to become available.
const StreamSessionState(2) - starting → const StreamSessionState
-
The session is in the process of starting.
const StreamSessionState(3) - streaming → const StreamSessionState
-
The session is actively streaming.
const StreamSessionState(4) - paused → const StreamSessionState
-
The session is temporarily paused.
The DAT SDK both enters and leaves this state on its own. The common trigger is
thermalCritical, which pauses the stream while the glasses cool and then returns it to streaming. There is no public resume because none is needed — per Meta's guidance, keep the connection and wait for streaming or stopped rather than restarting.Do not treat it as terminal. Tearing the session down here destroys the SDK's own recovery, and MetaWearablesDat.startStreamSession deliberately will not recreate a paused stream — it returns the existing texture id, so frames resume on the texture you already have.
The feed does go silent while it lasts, so your
Textureholds its last frame. Render a "paused" affordance over it instead of swapping it out.const StreamSessionState(5)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → int
-
The integer value of the state.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromInt(
int value) → StreamSessionState - Converts an integer value to a stream session state.
Constants
-
values
→ const List<
StreamSessionState> - A constant List of the values in this enum, in order of their declaration.