diff --git a/lib/screens/channel/video/native_video.dart b/lib/screens/channel/video/native_video.dart index cbffca9c..546dbc17 100644 --- a/lib/screens/channel/video/native_video.dart +++ b/lib/screens/channel/video/native_video.dart @@ -17,11 +17,14 @@ class NativeVideo extends StatelessWidget { final controller = nativeVideoStore.controller; final error = nativeVideoStore.error; + final isOffline = + nativeVideoStore.streamInfo == null && error == null; + return ColoredBox( color: Colors.black, child: Stack( children: [ - if (controller != null) + if (controller != null && !isOffline) NativeVideoPlayer( key: ObjectKey(controller), controller: controller, @@ -37,6 +40,17 @@ class NativeVideo extends StatelessWidget { ), ), ), + if (isOffline) + const Center( + child: Text( + 'Offline', + style: TextStyle( + color: Colors.white38, + fontSize: 16, + fontWeight: FontWeight.w500, + ), + ), + ), ], ), ); diff --git a/lib/screens/channel/video/native_video_store.dart b/lib/screens/channel/video/native_video_store.dart index 44901993..9f7928b0 100644 --- a/lib/screens/channel/video/native_video_store.dart +++ b/lib/screens/channel/video/native_video_store.dart @@ -185,9 +185,15 @@ abstract class NativeVideoStoreBase with Store implements VideoPlayerInterface { _error = null; }); } catch (e) { + // Wait for stream info so we can distinguish "offline" from "broken". + await updateStreamInfo(); runInAction(() { - _error = - 'Native player failed to load. Try the standard player in Settings.'; + // Only show the error if the stream is actually live — an offline + // channel is expected to fail here and the overlay handles it. + if (_streamInfo != null) { + _error = + 'Native player failed to load. Try the standard player in Settings.'; + } }); debugPrint('NativeVideoStore init error: $e'); } diff --git a/lib/screens/channel/video/video_overlay.dart b/lib/screens/channel/video/video_overlay.dart index bef13dbe..3ba00545 100644 --- a/lib/screens/channel/video/video_overlay.dart +++ b/lib/screens/channel/video/video_overlay.dart @@ -260,7 +260,6 @@ class VideoOverlay extends StatelessWidget { displayName: chatStore.displayName, showUptime: false, showViewerCount: false, - showOfflineIndicator: false, textColor: surfaceColor, isOffline: true, isInSharedChatMode: