File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,10 @@ Get StreamPack core latest artifacts on Maven Central:
1818``` groovy
1919dependencies {
2020 implementation 'io.github.thibaultbee.streampack:streampack-core:3.1.0'
21- // For UI (incl. PreviewView)
21+ // For xml UI (incl. PreviewView)
2222 implementation 'io.github.thibaultbee.streampack:streampack-ui:3.1.0'
23+ // Or compose UI (incl. SourcePreview)
24+ implementation 'io.github.thibaultbee.streampack:streampack-compose:3.1.0'
2325 // For services (incl. screen capture/media projection service)
2426 implementation 'io.github.thibaultbee.streampack:streampack-services:3.1.0'
2527 // For RTMP
@@ -150,6 +152,8 @@ minutes, you will be able to stream live video to your server.
150152
1511535. Inflates the preview with the streamer
152154
155+ Either `xml` UI
156+
153157 ```kotlin
154158 val streamer = cameraSingleStreamer(context = requireContext()) // Already instantiated streamer
155159 val preview = findViewById<PreviewView >(R.id.preview) // Already inflated preview
@@ -166,6 +170,16 @@ minutes, you will be able to stream live video to your server.
166170 streamer.startPreview(preview)
167171 ```
168172
173+ Or Compose UI
174+
175+ ```kotlin
176+ val streamer = cameraSingleStreamer(context = requireContext()) // Already instantiated streamer
177+
178+ Box {
179+ SourcePreview(streamer, modifier = Modifier.fillMaxSize())
180+ }
181+ ```
182+
1691836. Sets the device orientation
170184
171185 ```kotlin
You can’t perform that action at this time.
0 commit comments