additional changes
This commit is contained in:
+6
-9
@@ -63,11 +63,7 @@ class _MyAppState extends State<MyApp> {
|
||||
}
|
||||
|
||||
class MainPage extends StatefulWidget {
|
||||
const MainPage({
|
||||
super.key,
|
||||
required this.audio,
|
||||
required this.casting,
|
||||
});
|
||||
const MainPage({super.key, required this.audio, required this.casting});
|
||||
|
||||
final StreamingAudioBusinessObject audio;
|
||||
final CastingBusinessObject casting;
|
||||
@@ -94,7 +90,8 @@ class _MainPageState extends State<MainPage> {
|
||||
|
||||
bool get _isPlaybackStopped {
|
||||
if (_isUsingRemotePlayback) {
|
||||
return _casting.isStopped || _casting.playbackStatus == CastingPlaybackStatus.unknown;
|
||||
return _casting.isStopped ||
|
||||
_casting.playbackStatus == CastingPlaybackStatus.unknown;
|
||||
}
|
||||
|
||||
return _audio.isStopped;
|
||||
@@ -158,8 +155,7 @@ class _MainPageState extends State<MainPage> {
|
||||
}
|
||||
|
||||
void _handleCastingStateChanged() {
|
||||
if (
|
||||
_usesExternalCastPlayback &&
|
||||
if (_usesExternalCastPlayback &&
|
||||
(!_castStreamStartedForActiveSession || _pendingRemotePlay) &&
|
||||
!_isStartingCastStream) {
|
||||
_startCastingLiveStream();
|
||||
@@ -214,7 +210,8 @@ class _MainPageState extends State<MainPage> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_usesExternalCastPlayback && _casting.status == CastingStatus.connecting) {
|
||||
if (_usesExternalCastPlayback &&
|
||||
_casting.status == CastingStatus.connecting) {
|
||||
_pendingRemotePlay = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user