-
-
Notifications
You must be signed in to change notification settings - Fork 91
Description
Version
3.0.2
Environment that reproduces the issue
- Samsung Galaxy Note 8
- Galaxy A35
RTMP/SRT/... Server
http://192.168.1.45:8088/stream.m3u
Audio configuration
No response
Video configuration
No response
Is it reproducible in the demos application?
Yes
Reproduction steps
Streaming to remote server works fine. Video appears fine on other clients, but the streaming device's preview is just blank. SurfaceView, TextureView, AutoFitTextureView all work, albeit the video gets stretched and skewed.
Following this snippet in the documentation (repo page):
val streamer = cameraSingleStreamer(context = requireContext()) // Already instantiated streamer
val preview = findViewById<PreviewView>(R.id.preview) // Already inflated preview
/**
* If the preview is a `PreviewView`
*/
preview.streamer = streamer
// Then start the preview
streamer.startPreview()The app crashes. Reason: Preview surface is not set:
Expected result
The goal is to prevent the video from stretching and skewing. I wanted to use AutoFitSurfaceView, which is deprecated in favor of PreviewView. However, PreviewView either doesn't work or crashes the app.
Preview should be visible.
Actual result
Preview is not visible if calling preview.startPreview().
Calling streamer.startPreview() causes a crash with following output
Additional context
No response