Flutter Doctor Output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.5, on macOS 14.1.2 23B92 darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.87.2)
[✓] Connected device (4 available)
[✓] Network resources
I am facing an issue and Fullscreen issue on an ios device(iPhone 8 plus)
ios App screen-recording
android app screen-recording
version in pubspec.yaml pod_player: ^0.2.1
Flutter Doctor Output: Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.5, on macOS 14.1.2 23B92 darwin-arm64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.2) [✓] VS Code (version 1.87.2) [✓] Connected device (4 available) [✓] Network resources
• No issues found!
Code:
import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:pod_player/pod_player.dart';
class VideoTest extends StatefulWidget { final String url;
const VideoTest({super.key, required this.url});
@override State createState() => _VideoTestState();
}
class _VideoTestState extends State {
late final PodPlayerController controller;
@override void initState() { super.initState(); controller = PodPlayerController( playVideoFrom: PlayVideoFrom.network( widget.url, ), )..initialise(); }
@override Widget build(BuildContext context) { return Scaffold( body: PodVideoPlayer( controller: controller, matchFrameAspectRatioToVideo: false, matchVideoAspectRatioToFrame: true, onToggleFullScreen: (isFullScreen) async { if (isFullScreen) { await SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); } else { await SystemChrome.setPreferredOrientations( [ DeviceOrientation.portraitUp, ], ); } setState(() {}); }, podProgressBarConfig: const PodProgressBarConfig( padding: EdgeInsets.only( bottom: 20, left: 20, right: 20, ), ), ), ); }
@override void dispose() { SystemChrome.setPreferredOrientations( [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
} }
NOTE: I also commented onToggleFullScreen() function, still its not working.
please let me know if you need any other things.