Skip to content

Commit e681f68

Browse files
raju-muliyashiyaRaju
authored andcommitted
update CHANGELOG.md and address gemini comment
1 parent e472d18 commit e681f68

File tree

2 files changed

+4
-2
lines changed
  • packages/video_player/video_player_avfoundation

2 files changed

+4
-2
lines changed

packages/video_player/video_player_avfoundation/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Resolve `tracksWithMediaType:` deprecations.
44
* Use `loadTracksWithMediaType:completionHandler:` for iOS 15.0+/macOS 12.0+.
55

6-
* ## 2.8.8
6+
## 2.8.8
77

88
* Refactors Dart internals for maintainability.
99

packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ - (instancetype)initWithPlayerItem:(AVPlayerItem *)item
8282
AVAsset *asset = [item asset];
8383
void (^assetCompletionHandler)(void) = ^{
8484
if ([asset statusOfValueForKey:@"tracks" error:nil] == AVKeyValueStatusLoaded) {
85-
void (^processVideoTracks)(NSArray *) = ^(NSArray *tracks) {
85+
void (^processVideoTracks)(NSArray<AVAssetTrack *> *) = ^(NSArray<AVAssetTrack *> *tracks) {
8686
if ([tracks count] > 0) {
8787
AVAssetTrack *videoTrack = tracks[0];
8888
void (^trackCompletionHandler)(void) = ^{
@@ -119,6 +119,8 @@ - (instancetype)initWithPlayerItem:(AVPlayerItem *)item
119119
NSError *_Nullable error) {
120120
if (error == nil && tracks != nil) {
121121
processVideoTracks(tracks);
122+
} else if (error != nil) {
123+
NSLog(@"Error loading tracks: %@", error);
122124
}
123125
}];
124126
} else {

0 commit comments

Comments
 (0)