feat: background playback (wip)

https://github.com/ryanheise/audio_service/issues/1124
This commit is contained in:
2025-05-28 16:28:24 +01:00
parent 5789d9a7a1
commit fb4821ffdd
12 changed files with 263 additions and 32 deletions

View File

@ -17,7 +17,7 @@ import 'package:zap_stream_flutter/widgets/notifications_button.dart';
import 'package:zap_stream_flutter/widgets/pill.dart';
import 'package:zap_stream_flutter/widgets/profile.dart';
import 'package:zap_stream_flutter/widgets/stream_info.dart';
import 'package:zap_stream_flutter/widgets/video_player.dart';
import 'package:zap_stream_flutter/widgets/video_player_main.dart';
import 'package:zap_stream_flutter/widgets/zap.dart';
class StreamPage extends StatefulWidget {
@ -141,11 +141,13 @@ class _StreamPage extends State<StreamPage> with RouteAware {
aspectRatio: 16 / 9,
child:
(stream.info.stream != null && !_offScreen)
? VideoPlayerWidget(
? MainVideoPlayerWidget(
url: stream.info.stream!,
placeholder: stream.info.image,
aspectRatio: 16 / 9,
isLive: true,
title: stream.info.title,
)
: (stream.info.image?.isNotEmpty ?? false)
? ProxyImg(url: stream.info.image)