You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/unity_video_player/unity_video_player_platform_interface/lib/unity_video_player_platform_interface.dart
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -437,12 +437,21 @@ abstract class UnityVideoPlayer with ChangeNotifier {
437
437
/// The video is considered late if the current position is more than 1.5
438
438
/// seconds after the last image update.
439
439
boolget isLate {
440
-
if (lastImageUpdate ==null) returnfalse;
440
+
if (dataSource ==null||lastImageUpdate ==null||!isLive) returnfalse;
441
441
final now =DateTime.now();
442
442
final diff = now.difference(lastImageUpdate!);
443
443
return diff.inMilliseconds >1500;
444
444
}
445
445
446
+
/// Whether the video is a live stream.
447
+
boolget isLive =>
448
+
// TODO(bdlukaa): do a better checking of this
449
+
dataSource !=null&&
450
+
// It is only LIVE if it starts with rtsp or is hls
0 commit comments