diff --git a/packages/video_player/CHANGELOG.md b/packages/video_player/CHANGELOG.md index e3e9d9d01691..a95721f1f88c 100644 --- a/packages/video_player/CHANGELOG.md +++ b/packages/video_player/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.10.1 + +* iOS: Consider a player only `initialized` once duration is determined. + ## 0.10.0+8 * iOS: Fix an issue where the player sends initialization message incorrectly. diff --git a/packages/video_player/ios/Classes/VideoPlayerPlugin.m b/packages/video_player/ios/Classes/VideoPlayerPlugin.m index ded94ab499ea..43586a0118dc 100644 --- a/packages/video_player/ios/Classes/VideoPlayerPlugin.m +++ b/packages/video_player/ios/Classes/VideoPlayerPlugin.m @@ -304,6 +304,10 @@ - (void)sendInitialized { if (height == CGSizeZero.height && width == CGSizeZero.width) { return; } + // The player may be initialized but still needs to determine the duration. + if ([self duration] == 0) { + return; + } _isInitialized = true; _eventSink(@{ diff --git a/packages/video_player/pubspec.yaml b/packages/video_player/pubspec.yaml index e469a120afa1..bb8edb5f8dfc 100644 --- a/packages/video_player/pubspec.yaml +++ b/packages/video_player/pubspec.yaml @@ -2,7 +2,7 @@ name: video_player description: Flutter plugin for displaying inline video with other Flutter widgets on Android and iOS. author: Flutter Team -version: 0.10.0+8 +version: 0.10.1 homepage: https://github.com/flutter/plugins/tree/master/packages/video_player flutter: