diff --git a/lib/pages/live_room/view.dart b/lib/pages/live_room/view.dart index 2a3da604c..5f22286dd 100644 --- a/lib/pages/live_room/view.dart +++ b/lib/pages/live_room/view.dart @@ -214,6 +214,9 @@ class _LiveRoomPageState extends State Alignment alignment = Alignment.center, bool needDm = true, }) { + if (!plPlayerController.isLive) { + return const SizedBox.shrink(); + } if (!isFullScreen && !plPlayerController.isDesktopPip) { _liveRoomController.fsSC.value = null; } diff --git a/lib/pages/video/widgets/header_control.dart b/lib/pages/video/widgets/header_control.dart index db27b583b..5bb6649ea 100644 --- a/lib/pages/video/widgets/header_control.dart +++ b/lib/pages/video/widgets/header_control.dart @@ -684,109 +684,122 @@ class HeaderControlState extends State { final state = player.state; return AlertDialog( title: const Text('播放信息'), - content: SingleChildScrollView( - child: Column( - children: [ - ListTile( - dense: true, - title: const Text("Resolution"), - subtitle: Text( - '${state.width}x${state.height}', - ), - onTap: () => Utils.copyText( - 'Resolution\n${state.width}x${state.height}', - ), + contentPadding: const EdgeInsets.only(top: 16), + constraints: const BoxConstraints(maxWidth: 425), + content: Material( + type: MaterialType.transparency, + child: ListTileTheme( + contentPadding: const EdgeInsets.symmetric( + horizontal: 24, + ), + child: SingleChildScrollView( + child: Column( + children: [ + ListTile( + dense: true, + title: const Text("Resolution"), + subtitle: Text( + '${state.width}x${state.height}', + ), + onTap: () => Utils.copyText( + 'Resolution\n${state.width}x${state.height}', + ), + ), + ListTile( + dense: true, + title: const Text("VideoParams"), + subtitle: Text( + state.videoParams.toString(), + ), + onTap: () => Utils.copyText( + 'VideoParams\n${state.videoParams}', + ), + ), + ListTile( + dense: true, + title: const Text("AudioParams"), + subtitle: Text( + state.audioParams.toString(), + ), + onTap: () => Utils.copyText( + 'AudioParams\n${state.audioParams}', + ), + ), + ListTile( + dense: true, + title: const Text("Media"), + subtitle: Text( + state.playlist.toString(), + ), + onTap: () => Utils.copyText( + 'Media\n${state.playlist}', + ), + ), + ListTile( + dense: true, + title: const Text("AudioTrack"), + subtitle: Text( + state.track.audio.toString(), + ), + onTap: () => Utils.copyText( + 'AudioTrack\n${state.track.audio}', + ), + ), + ListTile( + dense: true, + title: const Text("VideoTrack"), + subtitle: Text( + state.track.video.toString(), + ), + onTap: () => Utils.copyText( + 'VideoTrack\n${state.track.audio}', + ), + ), + ListTile( + dense: true, + title: const Text("pitch"), + subtitle: Text(state.pitch.toString()), + onTap: () => Utils.copyText( + 'pitch\n${state.pitch}', + ), + ), + ListTile( + dense: true, + title: const Text("rate"), + subtitle: Text(state.rate.toString()), + onTap: () => + Utils.copyText('rate\n${state.rate}'), + ), + ListTile( + dense: true, + title: const Text("AudioBitrate"), + subtitle: Text( + state.audioBitrate.toString(), + ), + onTap: () => Utils.copyText( + 'AudioBitrate\n${state.audioBitrate}', + ), + ), + ListTile( + dense: true, + title: const Text("Volume"), + subtitle: Text( + state.volume.toString(), + ), + onTap: () => Utils.copyText( + 'Volume\n${state.volume}', + ), + ), + ListTile( + dense: true, + title: const Text('hwdec'), + subtitle: Text(hwdec), + onTap: () => + Utils.copyText('hwdec\n$hwdec'), + ), + ], ), - ListTile( - dense: true, - title: const Text("VideoParams"), - subtitle: Text( - state.videoParams.toString(), - ), - onTap: () => Utils.copyText( - 'VideoParams\n${state.videoParams}', - ), - ), - ListTile( - dense: true, - title: const Text("AudioParams"), - subtitle: Text( - state.audioParams.toString(), - ), - onTap: () => Utils.copyText( - 'AudioParams\n${state.audioParams}', - ), - ), - ListTile( - dense: true, - title: const Text("Media"), - subtitle: Text( - state.playlist.toString(), - ), - onTap: () => Utils.copyText( - 'Media\n${state.playlist}', - ), - ), - ListTile( - dense: true, - title: const Text("AudioTrack"), - subtitle: Text( - state.track.audio.toString(), - ), - onTap: () => Utils.copyText( - 'AudioTrack\n${state.track.audio}', - ), - ), - ListTile( - dense: true, - title: const Text("VideoTrack"), - subtitle: Text( - state.track.video.toString(), - ), - onTap: () => Utils.copyText( - 'VideoTrack\n${state.track.audio}', - ), - ), - ListTile( - dense: true, - title: const Text("pitch"), - subtitle: Text(state.pitch.toString()), - onTap: () => - Utils.copyText('pitch\n${state.pitch}'), - ), - ListTile( - dense: true, - title: const Text("rate"), - subtitle: Text(state.rate.toString()), - onTap: () => - Utils.copyText('rate\n${state.rate}'), - ), - ListTile( - dense: true, - title: const Text("AudioBitrate"), - subtitle: Text( - state.audioBitrate.toString(), - ), - onTap: () => Utils.copyText( - 'AudioBitrate\n${state.audioBitrate}', - ), - ), - ListTile( - dense: true, - title: const Text("Volume"), - subtitle: Text( - state.volume.toString(), - ), - onTap: () => - Utils.copyText('Volume\n${state.volume}'), - ), - ListTile( - dense: true, - title: const Text('hwdec'), - subtitle: Text(hwdec), - onTap: () => Utils.copyText('hwdec\n$hwdec'), - ), - ], + ), ), ), actions: [