Storyteller Embedded Clips
A Composable function for embedding a Storyteller Clips player within a Jetpack Compose UI. This component displays a collection of video Clips, adapting its size to maintain a 9:16 aspect ratio while fitting within the constraints of its parent layout. It handles loading states and can display either a direct Clips feed or a tabbed interface for "For You" and "Following" feeds if enabled via the StorytellerEmbeddedClipsStateOld.
The state and interactions of this embedded player are managed through the provided state parameter.
Usage Example:
val clipsState = rememberStorytellerEmbeddedClipsState(
collectionId = "your-collection-id",
topLevelBack = true // Or false, depending on desired back behavior
)
StorytellerEmbeddedClips(
state = clipsState,
modifier = Modifier
.fillMaxWidth()
.aspectRatio(9f / 16f) // Example: Maintain 9:16 aspect ratio
)Parameters
The StorytellerEmbeddedClipsStateOld that holds and manages the state of this embedded Clips player. This includes the collection ID, initial Clip/category, back navigation behavior, and provides methods for interaction (e.g., goBack(), reloadData(), setPlayingState()).
The Modifier to be applied to this Composable. This allows for custom sizing, padding, background, etc. The component will internally attempt to maintain a 9:16 aspect ratio for the player content within the bounds provided by this modifier and its parent. For more information on embedding Clips, including using StorytellerClipsFragment for View-based systems, see the Storyteller Clips Fragment Documentation.