Google is committed to advancing racial equity for Black communities. See how.

StreamState

class StreamState
kotlin.Any
   ↳ kotlin.Enum<androidx.camera.view.PreviewView.StreamState>
   ↳ androidx.camera.view.PreviewView.StreamState

Definitions for current preview stream state.

Summary

Enum values

Preview is not visible yet.

Preview is streaming.

Enum values

IDLE

enum val IDLE : PreviewView.StreamState

Preview is not visible yet.

STREAMING

enum val STREAMING : PreviewView.StreamState

Preview is streaming. It only guarantees preview streaming when implementation mode is ImplementationMode#COMPATIBLE. When in ImplementationMode#PERFORMANCE, it is possible that preview becomes visible slightly after state is changed. For apps relying on the preview visible signal to work correctly, please set ImplementationMode#PERFORMANCE mode via setImplementationMode.