AgoraIO-Extensions / AgoraIO-Extensions/Agora-Flutter-SDK

How to fix landscape mode video broadcasting when device locked.

Abierto
#2,481 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Dart
Estrellas
795
Forks
448
Merge medio
12 h 19 min
PR fusionados (30 d)
14

Descripción

I’ve implemented video broadcasting using Agora in Flutter with the role set as clientRoleBroadcaster.
I’ve also set the orientation to landscape, and it works fine during normal usage.

However, when I lock and unlock the device, the app automatically switches back to portrait mode.
I want the broadcasting to always remain in landscape orientation, regardless of any device behavior (such as screen lock/unlock, rotation, or app lifecycle changes).

i have also set the below code for this but not working.

` VideoEncoderConfiguration(
dimensions: const VideoDimensions(
width: 2560,
height: 1440,
),
frameRate: 30,
bitrate: 5000, // 5 Mbps
minBitrate: 3000, // Minimum 3 Mbps
**orientationMode: OrientationMode.orientationModeFixedLandscape,**
degradationPreference: DegradationPreference.maintainResolution,
),`

`@override
void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.resumed) {
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
}
}
`

``

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.