Skip to content

Commit

Permalink
fullheightplayer controls overlay for videos (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier authored Dec 2, 2023
1 parent 2b3b060 commit cb4d4f3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 35 deletions.
74 changes: 40 additions & 34 deletions lib/src/player/full_height_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -228,43 +228,49 @@ class FullHeightPlayer extends StatelessWidget {
),
Padding(
padding: const EdgeInsets.all(kYaruPagePadding),
child: Wrap(
alignment: WrapAlignment.end,
spacing: 7.0,
children: [
LikeIconButton(
audio: audio,
liked: liked,
isStarredStation: isStarredStation,
removeStarredStation: removeStarredStation,
addStarredStation: addStarredStation,
removeLikedAudio: removeLikedAudio,
addLikedAudio: addLikedAudio,
color: iconColor,
),
ShareButton(
audio: audio,
active: activeControls,
color: iconColor,
),
VolumeSliderPopup(
direction: PopoverDirection.bottom,
volume: volume,
setVolume: setVolume,
color: iconColor,
),
IconButton(
icon: Icon(
playerViewMode == PlayerViewMode.fullWindow
? Iconz().fullScreenExit
: Iconz().fullScreen,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: isVideo ? Colors.black.withOpacity(0.6) : null,
),
child: Wrap(
alignment: WrapAlignment.end,
spacing: 7.0,
children: [
LikeIconButton(
audio: audio,
liked: liked,
isStarredStation: isStarredStation,
removeStarredStation: removeStarredStation,
addStarredStation: addStarredStation,
removeLikedAudio: removeLikedAudio,
addLikedAudio: addLikedAudio,
color: iconColor,
),
onPressed: () => setFullScreen(
playerViewMode == PlayerViewMode.fullWindow ? false : true,
ShareButton(
audio: audio,
active: activeControls,
color: iconColor,
),
),
],
VolumeSliderPopup(
direction: PopoverDirection.bottom,
volume: volume,
setVolume: setVolume,
color: iconColor,
),
IconButton(
icon: Icon(
playerViewMode == PlayerViewMode.fullWindow
? Iconz().fullScreenExit
: Iconz().fullScreen,
color: iconColor,
),
onPressed: () => setFullScreen(
playerViewMode == PlayerViewMode.fullWindow ? false : true,
),
),
],
),
),
),
if (nextAudio?.title != null && nextAudio?.artist != null && !isVideo)
Expand Down
3 changes: 2 additions & 1 deletion lib/src/radio/radio_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class RadioModel extends SafeChangeNotifier {
(e) => Audio(
url: e.urlResolved,
title: e.name,
artist: e.bitrate == 0 ? ' ' : '${e.bitrate.toString()} kb/s',
artist:
'${e.bitrate == 0 ? '' : '${e.bitrate}kb/s, '}${e.language ?? ''}',
album: e.tags ?? '',
audioType: AudioType.radio,
imageUrl: e.favicon,
Expand Down

0 comments on commit cb4d4f3

Please sign in to comment.