On IOS and Android, subtitles of videos are being cutoff when playing the YouTube video in full screen mode.
On IOS and Android, subtitles of videos are being cutoff when playing the YouTube video in full screen mode.
To Reproduce
Include any video URL which has subtitles and play the video in full screen mode in Android or IOS
`Widget _mobileYoutubePlayerWidget() {
if (_videoID == null || !widget.shouldShowVideoPlayer) {
return _scaffold(null);
}
return YoutubePlayerBuilder(
player: _youtubePlayer() as YoutubePlayer,
builder: (context, player) {
return _scaffold(player);
},
onExitFullScreen: () {
// Full screen video is hiding top & bottom status bar. So below code is to
// show the top/bottom status bar back on exit based on system configured values
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
overlays: SystemUiOverlay.values);
},
);
// return YoutubePlayer(
// controller: _controllerYoutube!,
// showVideoProgressIndicator: true,
// progressIndicatorColor: Colors.lightBlue,
// );
}
/// this is for youtube player
Widget _youtubePlayer() {
return _controllerYoutube != null
? YoutubePlayer(
// key: Key(_videoID),
controller: _controllerYoutube!,
showVideoProgressIndicator: true,
progressIndicatorColor: Colors.lightBlue,
)
: const SizedBox();
}
On IOS and Android, subtitles of videos are being cutoff when playing the YouTube video in full screen mode. On IOS and Android, subtitles of videos are being cutoff when playing the YouTube video in full screen mode.
To Reproduce Include any video URL which has subtitles and play the video in full screen mode in Android or IOS
`Widget _mobileYoutubePlayerWidget() { if (_videoID == null || !widget.shouldShowVideoPlayer) { return _scaffold(null); } return YoutubePlayerBuilder( player: _youtubePlayer() as YoutubePlayer, builder: (context, player) { return _scaffold(player); }, onExitFullScreen: () { // Full screen video is hiding top & bottom status bar. So below code is to // show the top/bottom status bar back on exit based on system configured values SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: SystemUiOverlay.values); }, ); // return YoutubePlayer( // controller: _controllerYoutube!, // showVideoProgressIndicator: true, // progressIndicatorColor: Colors.lightBlue, // ); }
/// this is for youtube player Widget _youtubePlayer() { return _controllerYoutube != null ? YoutubePlayer( // key: Key(_videoID), controller: _controllerYoutube!, showVideoProgressIndicator: true, progressIndicatorColor: Colors.lightBlue, ) : const SizedBox(); }
void initPlayer() {
if (_videoID != null) { _controllerYoutube = YoutubePlayerController( initialVideoId: _videoID!, flags: const YoutubePlayerFlags( mute: false, autoPlay: false, disableDragSeek: false, loop: false, isLive: false, forceHD: false, enableCaption: true, ), ); } if (_controllerYoutube != null) { _controllerYoutube!.addListener(playStateChangedCallback); } }`
Expected behavior Subtitles should not cut off and display correctly,
Screenshots
Technical Details:
Additional context Same behavior on android as well