Skip to content

Commit

Permalink
Fix local file playback on iOS/Mac Catalyst. (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbritch authored Sep 28, 2022
1 parent 33a4eb7 commit e282bb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/user-interface/handlers/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ namespace VideoDemos.Platforms.MaciOS
{
string uri = (_video.Source as FileVideoSource).File;
if (!string.IsNullOrWhiteSpace(uri))
asset = AVAsset.FromUrl(new NSUrl(uri));
asset = AVAsset.FromUrl(NSUrl.CreateFileUrl(new [] { uri }));
}
...
}
Expand All @@ -1220,7 +1220,7 @@ namespace VideoDemos.Platforms.MaciOS
}
```

When processing objects of type `FileVideoSource`, the static `AVAsset.FromUrl` method is used to specify the video file to be played, with an iOS `NSUrl` object created from the string URI.
When processing objects of type `FileVideoSource`, the static `AVAsset.FromUrl` method is used to specify the video file to be played, with the `NSUrl.CreateFileUrl` method creating an iOS `NSUrl` object from the string URI.

## Create custom transport controls

Expand Down

0 comments on commit e282bb8

Please sign in to comment.