Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
added iOS exception on incorrect asset path
  • Loading branch information
zopagaduanjr committed Jul 13, 2023
commit cf011a517c0576d520b4d7b05e0bc22c7da85392
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 2.4.7

* Updates minimum supported SDK version to Flutter 3.3/Dart 2.18.
* Added iOS exception on incorrect asset path

## 2.4.6

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,10 +620,16 @@ - (FLTTextureMessage *)create:(FLTCreateMessage *)input error:(FlutterError **)e
} else {
assetPath = [_registrar lookupKeyForAsset:input.asset];
}
player = [[FLTVideoPlayer alloc] initWithAsset:assetPath
frameUpdater:frameUpdater
playerFactory:_playerFactory];
return [self onPlayerSetup:player frameUpdater:frameUpdater];
@try {
player = [[FLTVideoPlayer alloc] initWithAsset:assetPath
frameUpdater:frameUpdater
playerFactory:_playerFactory];
return [self onPlayerSetup:player frameUpdater:frameUpdater];
}
@catch (NSException *exception) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did it crash before when the exception is thrown?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for ios yes. using the code sample of flutter/flutter#118660 (comment), it should crash and look like this

Screenshot 2023-06-28 at 9 47 56 PM

*error = [FlutterError errorWithCode:@"video_player" message:exception.reason details:nil];
return nil;
}
} else if (input.uri) {
player = [[FLTVideoPlayer alloc] initWithURL:[NSURL URLWithString:input.uri]
frameUpdater:frameUpdater
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: video_player_avfoundation
description: iOS implementation of the video_player plugin.
repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
version: 2.4.6
version: 2.4.7

environment:
sdk: ">=2.18.0 <4.0.0"
Expand Down