Video plays automatically when the device orientation is changed to landscape

The flutterflow version in use is 4.1.52

The page is a mix of buttons and youtube player widgets

The page works as expected in portrait mode. But when the device is changed to landscape mode, the last video of the page plays automatically in full screen and I am unable to exit the full screen mode and have to close the app.

In pages where there are no videos, the functionality is fine.

The page was working fine until today morning when i upgraded to the above flutterflow version.

I have shared the dart files of the page.

MECHANICS PAGE CODE

`
class RefereesMechanicsWidget extends StatefulWidget {
  const RefereesMechanicsWidget({super.key});

  @override
  State<RefereesMechanicsWidget> createState() =>
      _RefereesMechanicsWidgetState();
}

class _RefereesMechanicsWidgetState extends State<RefereesMechanicsWidget> {
  late RefereesMechanicsModel _model;

  final scaffoldKey = GlobalKey<ScaffoldState>();

  @override
  void initState() {
    super.initState();
    _model = createModel(context, () => RefereesMechanicsModel());

    WidgetsBinding.instance.addPostFrameCallback((_) => setState(() {}));
  }

  @override
  void dispose() {
    _model.dispose();

    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return YoutubeFullScreenWrapper(
      child: GestureDetector(
        onTap: () => _model.unfocusNode.canRequestFocus
            ? FocusScope.of(context).requestFocus(_model.unfocusNode)
            : FocusScope.of(context).unfocus(),
        child: Scaffold(
          key: scaffoldKey,
          backgroundColor: Colors.black,
          appBar: AppBar(
            backgroundColor: Color(0xFF613B81),
            automaticallyImplyLeading: false,
            leading: FlutterFlowIconButton(
              borderRadius: 30.0,
              borderWidth: 1.0,
              buttonSize: 30.0,
              icon: Icon(
                Icons.arrow_circle_left_rounded,
                color: Colors.black,
                size: 40.0,
              ),
              onPressed: () async {
                context.pushNamed('Referees');
              },
            ),
            title: Align(
              alignment: AlignmentDirectional(0.0, 0.0),
              child: Row(
                mainAxisSize: MainAxisSize.min,
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  ClipRRect(
                    borderRadius: BorderRadius.circular(8.0),
                    child: Image.asset(
                      'assets/images/RV_2.0.png',
                      width: 75.0,
                      height: 75.0,
                      fit: BoxFit.cover,
                    ),
                  ),
                  Padding(
                    padding: EdgeInsets.all(8.0),
                    child: AutoSizeText(
                      'MECHANICS',
                      style:
                      FlutterFlowTheme.of(context).headlineMedium.override(
                        fontFamily: FlutterFlowTheme.of(context)
                            .headlineMediumFamily,
                        color: Colors.black,
                        fontSize: () {
                          if (MediaQuery.sizeOf(context).width <
                              kBreakpointSmall) {
                            return 24;
                          } else if (MediaQuery.sizeOf(context).width <
                              kBreakpointMedium) {
                            return 35;
                          } else if (MediaQuery.sizeOf(context).width <
                              kBreakpointLarge) {
                            return 40;
                          } else {
                            return 45;
                          }
                        }()
                            .toDouble(),
                        letterSpacing: 0.0,
                        fontWeight: FontWeight.w600,
                        useGoogleFonts: GoogleFonts.asMap().containsKey(
                            FlutterFlowTheme.of(context)
                                .headlineMediumFamily),
                      ),
                    ),
                  ),
                 
                              Align(
                                alignment: AlignmentDirectional(0.76, -0.83),
                                child: FlutterFlowYoutubePlayer(
                                  url:
                                  'https://www.youtube.com/watch?v=U-eZv3iDTnQ',
                                  width: () {
                                    if (MediaQuery.sizeOf(context).width <
                                        kBreakpointSmall) {
                                      return 110;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointMedium) {
                                      return 150;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointLarge) {
                                      return 200;
                                    } else {
                                      return 250;
                                    }
                                  }()
                                      .toDouble(),
                                  height: () {
                                    if (MediaQuery.sizeOf(context).width <
                                        kBreakpointSmall) {
                                      return 110;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointMedium) {
                                      return 150;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointLarge) {
                                      return 200;
                                    } else {
                                      return 250;
                                    }
                                  }()
                                      .toDouble(),
                                  autoPlay: false,
                                  looping: true,
                                  mute: false,
                                  showControls: true,
                                  showFullScreen: true,
                                  strictRelatedVideos: false,
fullScreenByDefault: true
                                ),
                              ),
                            ].divide(SizedBox(width: 10.0)),
                          ),
                          Align(
                            alignment: AlignmentDirectional(0.0, 0.0),
                            child: Padding(
                              padding: EdgeInsets.all(22.0),
                              child: FFButtonWidget(
                                onPressed: () async {
                                  await launchURL(
                                      'https://youtu.be/GJKj5KOzSl0?list=PLOnrMq_sQkhrUXzJwwOTHOrA_mcLfhu22');
                                },
                                text: 'Watch Mechanics Playlist',
                                icon: FaIcon(
                                  FontAwesomeIcons.video,
                                ),
                                options: FFButtonOptions(
                                  width: () {
                                    if (MediaQuery.sizeOf(context).width <
                                        kBreakpointSmall) {
                                      return 300;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointMedium) {
                                      return 600;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointLarge) {
                                      return 700;
                                    } else {
                                      return 900;
                                    }
                                  }()
                                      .toDouble(),
                                  height: () {
                                    if (MediaQuery.sizeOf(context).width <
                                        kBreakpointSmall) {
                                      return 40;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointMedium) {
                                      return 50;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointLarge) {
                                      return 60;
                                    } else {
                                      return 70;
                                    }
                                  }()
                                      .toDouble(),
                                  padding: EdgeInsets.all(12.0),
                                  iconPadding: EdgeInsetsDirectional.fromSTEB(
                                      0.0, 0.0, 0.0, 0.0),
                                  color: Color(0xFFFFE300),
                                  textStyle: FlutterFlowTheme.of(context)
                                      .titleSmall
                                      .override(
                                    fontFamily: FlutterFlowTheme.of(context)
                                        .titleSmallFamily,
                                    color: Colors.black,
                                    fontSize: () {
                                      if (MediaQuery.sizeOf(context).width <
                                          kBreakpointSmall) {
                                        return 20;
                                      } else if (MediaQuery.sizeOf(context)
                                          .width <
                                          kBreakpointMedium) {
                                        return 24;
                                      } else if (MediaQuery.sizeOf(context)
                                          .width <
                                          kBreakpointLarge) {
                                        return 28;
                                      } else {
                                        return 32;
                                      }
                                    }()
                                        .toDouble(),
                                    letterSpacing: 0.0,
                                    useGoogleFonts: GoogleFonts.asMap()
                                        .containsKey(
                                        FlutterFlowTheme.of(context)
                                            .titleSmallFamily),
                                  ),
                                  elevation: 3.0,
                                  borderSide: BorderSide(
                                    width: 1.0,
                                  ),
                                  borderRadius: BorderRadius.circular(12.0),
                                ),
                              ),
                            ),
                          ),
                          Align(
                            alignment: AlignmentDirectional(0.0, 0.0),
                            child: Padding(
                              padding: EdgeInsets.all(22.0),
                              child: FFButtonWidget(
                                onPressed: () async {
                                  await launchURL(
                                      'https://youtu.be/tqDVuO6uUoo?list=PLOnrMq_sQkhrhogAX6iy5hJtGtwY3kSoX');
                                },
                                text: 'Watch Guessing Playlist',
                                icon: FaIcon(
                                  FontAwesomeIcons.video,
                                ),
                                options: FFButtonOptions(
                                  width: () {
                                    if (MediaQuery.sizeOf(context).width <
                                        kBreakpointSmall) {
                                      return 300;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointMedium) {
                                      return 600;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointLarge) {
                                      return 700;
                                    } else {
                                      return 900;
                                    }
                                  }()
                                      .toDouble(),
                                  height: () {
                                    if (MediaQuery.sizeOf(context).width <
                                        kBreakpointSmall) {
                                      return 40;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointMedium) {
                                      return 50;
                                    } else if (MediaQuery.sizeOf(context)
                                        .width <
                                        kBreakpointLarge) {
                                      return 60;
                                    } else {
                                      return 70;
                                    }
                                  }()
                                      .toDouble(),
                                  padding: EdgeInsets.all(12.0),
                                  iconPadding: EdgeInsetsDirectional.fromSTEB(
                                      0.0, 0.0, 0.0, 0.0),
                                  color: Color(0xFFFFE300),
                                  textStyle: FlutterFlowTheme.of(context)
                                      .titleSmall
                                      .override(
                                    fontFamily: FlutterFlowTheme.of(context)
                                        .titleSmallFamily,
                                    color: Colors.black,
                                    fontSize: () {
                                      if (MediaQuery.sizeOf(context).width <
                                          kBreakpointSmall) {
                                        return 20;
                                      } else if (MediaQuery.sizeOf(context)
                                          .width <
                                          kBreakpointMedium) {
                                        return 24;
                                      } else if (MediaQuery.sizeOf(context)
                                          .width <
                                          kBreakpointLarge) {
                                        return 28;
                                      } else {
                                        return 32;
                                      }
                                    }()
                                        .toDouble(),
                                    letterSpacing: 0.0,
                                    useGoogleFonts: GoogleFonts.asMap()
                                        .containsKey(
                                        FlutterFlowTheme.of(context)
                                            .titleSmallFamily),
                                  ),
                                  elevation: 3.0,
                                  borderSide: BorderSide(
                                    width: 1.0,
                                  ),
                                  borderRadius: BorderRadius.circular(12.0),
                                ),
                              ),
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}`
`
In this case, "https://www.youtube.com/watch?v=1waAdTN7pDs" is played automatically in fullscreen in landscape mode.

This happens to the last video on the page.

Other pages without video player or youtube player widgets are working fine.

PFB the manifest file.

`      <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">`


I tried with setting the fullscreenbydefault attribute to false.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật