diff --git a/lib/ui/common/modals/fullscreen_video_viewer.dart b/lib/ui/common/modals/fullscreen_video_viewer.dart index 1c1eec3e..10757368 100644 --- a/lib/ui/common/modals/fullscreen_video_viewer.dart +++ b/lib/ui/common/modals/fullscreen_video_viewer.dart @@ -1,6 +1,6 @@ import 'package:wonders/common_libs.dart'; import 'package:wonders/ui/common/controls/app_loading_indicator.dart'; -import 'package:youtube_player_iframe/youtube_player_iframe.dart'; +// import 'package:youtube_player_iframe/youtube_player_iframe.dart'; class FullscreenVideoViewer extends StatefulWidget { const FullscreenVideoViewer({Key? key, required this.id}) : super(key: key); @@ -11,50 +11,46 @@ class FullscreenVideoViewer extends StatefulWidget { } class _FullscreenVideoViewerState extends State { - late final _controller = YoutubePlayerController( - initialVideoId: widget.id, - params: const YoutubePlayerParams(autoPlay: true, startAt: Duration(seconds: 1)), - )..play(); - @override - void initState() { - super.initState(); - appLogic.supportedOrientationsOverride = [Axis.horizontal, Axis.vertical]; - } - - @override - void dispose() { - // when view closes, remove the override - appLogic.supportedOrientationsOverride = null; - super.dispose(); - } - - @override - Widget build(BuildContext context) { - double aspect = context.isLandscape ? MediaQuery.of(context).size.aspectRatio : 9 / 9; - return Scaffold( - backgroundColor: Colors.black, - body: Stack( - children: [ - Center( - child: AspectRatio( - aspectRatio: aspect, - child: Stack( - children: [ - const Center(child: AppLoadingIndicator()), - YoutubePlayerIFrame(controller: _controller, aspectRatio: aspect), - ], - ), - ), - ), - SafeArea( - child: Padding( - padding: EdgeInsets.all($styles.insets.md), - child: const BackBtn(), - ), - ), - ], - ), - ); - } + Widget build(BuildContext context) => Placeholder(); + // late final _controller = YoutubePlayerController.fromVideoId( + // videoId: widget.id, + // params: const YoutubePlayerParams(showFullscreenButton: true), + // ); + // + // @override + // void initState() { + // super.initState(); + // appLogic.supportedOrientationsOverride = [Axis.horizontal, Axis.vertical]; + // } + // + // @override + // void dispose() { + // // when view closes, remove the override + // appLogic.supportedOrientationsOverride = null; + // super.dispose(); + // } + // + // @override + // Widget build(BuildContext context) { + // double aspect = context.isLandscape ? MediaQuery.of(context).size.aspectRatio : 9 / 9; + // return Scaffold( + // backgroundColor: Colors.black, + // body: YoutubePlayerScaffold( + // controller: _controller, + // aspectRatio: aspect, + // builder: (_, player) => Stack( + // children: [ + // player, + // SafeArea( + // child: Padding( + // padding: EdgeInsets.all($styles.insets.md), + // child: const BackBtn(), + // ), + // ), + // ], + // ), + // ), + // ); + // } } diff --git a/pubspec.yaml b/pubspec.yaml index e90f9f59..7769ab49 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -52,7 +52,7 @@ dependencies: sized_context: ^1.0.0+1 smooth_page_indicator: ^1.0.0+2 unsplash_client: ^2.1.0+3 - youtube_player_iframe: 2.3.0 +# youtube_player_iframe: 4.0.4 dev_dependencies: build_runner: ^2.2.0