Skip to content

Commit

Permalink
[housekeeping] Automated PR to fix formatting errors (#2110)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 10, 2024
1 parent 7097cd8 commit 816e8a7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,22 +313,22 @@ protected virtual partial void PlatformUpdateSource()
}
void SetPoster()
{

if (PlayerItem is null || metaData is null)
{
return;
}
var videoTrack = PlayerItem.Asset.TracksWithMediaType(AVMediaTypes.Video.GetConstant()).FirstOrDefault();
if(videoTrack is not null)
if (videoTrack is not null)
{
return;
}
if(PlayerItem.Asset.Tracks.Length == 0)
if (PlayerItem.Asset.Tracks.Length == 0)
{
// No video track found and no tracks found. This is likely an audio file. So we can't set a poster.
return;
}

if (PlayerViewController?.View is not null && PlayerViewController.ContentOverlayView is not null && !string.IsNullOrEmpty(MediaElement.MetadataArtworkUrl))
{
var image = UIImage.LoadFromData(NSData.FromUrl(new NSUrl(MediaElement.MetadataArtworkUrl))) ?? new UIImage();
Expand Down

0 comments on commit 816e8a7

Please sign in to comment.