Skip to content

Commit

Permalink
handle duration < 0
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed May 24, 2024
1 parent d8b5336 commit eda2273
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/video_player_mdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MdkVideoPlayer extends mdk.Player {
streamCtl.add(VideoEvent(
eventType: VideoEventType.initialized,
duration: Duration(
milliseconds: info.duration == 0
milliseconds: info.duration <= 0
? double.maxFinite.toInt()
: info
.duration) // FIXME: live stream info.duraiton == 0 and result a seekTo(0) in play()
Expand Down

0 comments on commit eda2273

Please sign in to comment.