Open jaskiratAtNexG opened 11 months ago
Same issue here, did you find any solution? If yes then please share. (@AnonymHK Do you have any information about this?)
Same issue here, did you find any solution? If yes then please share. (@AnonymHK Do you have any information about this?)
https://stackoverflow.com/questions/69219766/how-to-make-exoplayer-fullscreen-in-notched-device --- Hi this is the solution but I have not implemented it yet, if you find the way please share it as well
History check yes, I've checked the issue history and I didn't find anything which may solve my issue.
Describe the bug black strip on the left side of the video in fullscreen mode on Android Devices only.
To Reproduce Go to fullscreen mode on any android device
*Example code import 'package:better_player/better_player.dart'; import 'package:flutter/material.dart';
class VideoScreen extends StatefulWidget { const VideoScreen({super.key});
@override State createState() => _VideoScreenState();
}
class _VideoScreenState extends State {
late BetterPlayerController _betterPlayerController;
bool loading = true;
@override void initState() { super.initState(); initializePlayer(); }
initializePlayer() { BetterPlayerConfiguration betterPlayerConfiguration = BetterPlayerConfiguration( // aspectRatio: 16 / 9, // fit: BoxFit.contain, controlsConfiguration: BetterPlayerControlsConfiguration( playIcon: Icons.play_arrow_rounded, enablePlayPause: false, pauseIcon: Icons.pause_rounded, enableFullscreen: true, iconsColor: Colors.white, progressBarBackgroundColor: Colors.white.withOpacity(0.5), progressBarBufferedColor: Colors.white, progressBarHandleColor: Colors.red, progressBarPlayedColor: Colors.red, overflowMenuIconsColor: Colors.white, overflowModalColor: Colors.black54, overflowModalTextColor: Colors.white ), autoPlay: true, fullScreenByDefault: false, allowedScreenSleep: false, ); BetterPlayerDataSource dataSource = BetterPlayerDataSource( BetterPlayerDataSourceType.network, "https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8", useAsmsSubtitles: true, videoFormat: BetterPlayerVideoFormat.hls, ); _betterPlayerController = BetterPlayerController(betterPlayerConfiguration); _betterPlayerController.setupDataSource(dataSource); loading = false; // SystemChrome.setPreferredOrientations([ // DeviceOrientation.landscapeLeft, // ]); // SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive); // _betterPlayerController.addEventsListener((event){ // if(event.betterPlayerEventType == BetterPlayerEventType.play || event.betterPlayerEventType == BetterPlayerEventType.pause) { // Vibrate.feedback(FeedbackType.medium); // } // }); setState(() {}); }
@override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.black, body: loading ? Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.max, children: const [ CircularProgressIndicator( color: Colors.white, ), SizedBox(height: 20), Text( 'Loading...', style: TextStyle(color: Colors.white), ), ], ), ) : BetterPlayer(controller: _betterPlayerController), );; } } download the package from master branch of better_player package and change the code and kotlin version as explained in this github issue -- https://github.com/jhomlala/betterplayer/issues/1113
Expected behavior There should not be any black strip on the left side of the screen when going to fullscreen mode
Screens
hots
Flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.7.5, on macOS 13.2.1 22D68 darwin-x64, locale en-GB) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.80.1) [✓] Connected device (3 available) [✓] HTTP Host Availability • No issues found!
Better Player version
Smartphone (please complete the following information):