-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[video_player] added iOS exception on incorrect asset path #4318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
cf011a5
6552088
3b1a4c2
f6456f3
5f1564b
9e77817
9e1c8f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) { | ||
|
||
| *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 | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.