-
-
Notifications
You must be signed in to change notification settings - Fork 879
Open
Description
hi.
i dont want to use android:screenOrientation="sensor" because i want to use only one layout for my activity and only rotate icons programmatically in the class.
i can get correct phone orientation state by onSensorChanged method and handle icon rotation works good.
but i cant get landscape video output from stream anyway. i try many ways but no success!
could you help me please?
orientationHelper.currentOrientation.observe(this) { orientation ->
if (lastOrientation != orientation) {
lastOrientation = orientation
rotateIconsOnly(orientation)
val rotationAngle = OrientationHelper.getRotationAngle(orientation).toInt()
viewModel.updateOrientation(rotationAngle)
Log.d("MainActivity", "Orientation changed to: $orientation, Angle: $rotationAngle")
}
}
in lanscape mode the value of rotationAngle is 270 in my app:
Phone camera start stream using rotation: 270 degrees w:640 - h:360
Phone camera RTP connection started: rtmp://80.191.242.19:1935/live/test
Phone camera RTP connection success
Metadata
Metadata
Assignees
Labels
No labels