CompoundComponentFactory

fun CompoundComponentFactory(vararg keys: Any?, factory: (currentComponentFactory: VideoComponentFactory) -> VideoComponentFactory, content: @Composable () -> Unit)

Provides a VideoComponentFactory built on top of the current VideoComponentFactory to the given content, allowing overrides to be layered for a subtree.

CompoundComponentFactory(
factory = { currentComponentFactory ->
object : VideoComponentFactory by currentComponentFactory {
// Overridden components
}
},
) {
// Content using the compound factory
}

The factory function is called once, and again only when the current VideoComponentFactory, the factory instance, one of the keys, or Compose state read inside factory changes.

Parameters

keys

Optional keys for values the factory function reads that Compose does not track, such as plain fields. If any of the keys change, the factory function is called again.

factory

Builds the new VideoComponentFactory from the current one.

content

The content that uses the compound factory.