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 -- jhomlala/betterplayer#1113
Expected behavior
There should not be any black strip on the left side of the screen when going to fullscreen mode
Screens
![WhatsApp Image 2023-07-20 at 6 40 48 PM](https://private-user-images.githubusercontent.com/95342622/254897894-7cb561eb-8679-45f9-bb59-b6418b2c662c.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMzU3ODAsIm5iZiI6MTcyNDEzNTQ4MCwicGF0aCI6Ii85NTM0MjYyMi8yNTQ4OTc4OTQtN2NiNTYxZWItODY3OS00NWY5LWJiNTktYjY0MThiMmM2NjJjLmpwZWc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMFQwNjMxMjBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lYzc4NmNmMGYwZDI0OWY0OWU1ZmQxMGU5NzMxY2VjZTdjOTZiYzlmMmM2OGRjNTZhOTViNDczMmM4MmM5ODVlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.bzDlBQIUzuNF-_-AJwH2lHQdJrR8KozLxH1FJLLcRqs)
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
- Version: better player master package
Smartphone (please complete the following information):
- Device: Realeme XT
- OS: Android 11