Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBAndrews committed Dec 9, 2024
1 parent caa0a65 commit dcf08b0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
10 changes: 1 addition & 9 deletions Mlem/App/Utility/Extensions/AVPlayer+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ import AVFoundation

extension AVPlayer {
func isAudioAvailable() async throws -> Bool? {
let result = try await self.currentItem?.asset.loadTracks(withMediaType: .audio).count != 0
print("DEBUG \(result)")
return result
// print("DEBUG \(self.currentItem?.tracks)")
// return self.currentItem?.tracks.filter({$0.assetTrack!.mediaType == AVMediaType.audio}).count != 0
}

var isVideoAvailable: Bool? {
return self.currentItem?.tracks.filter({$0.assetTrack!.mediaType == AVMediaType.video}).count != 0
return try await self.currentItem?.asset.loadTracks(withMediaType: .audio).count != 0
}
}
9 changes: 0 additions & 9 deletions Mlem/App/Views/Shared/Images/Core/DynamicMediaView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,6 @@ struct DynamicMediaView: View {
}
}

func showViewer(url: URL) {
// Sheets don't cover the whole screen on iPad, so use a fullScreenCover instead
if UIDevice.isPad {
navigation.showFullScreenCover(.imageViewer(url))
} else {
navigation.openSheet(.imageViewer(url))
}
}

func showQuickLook(url: URL) async {
if let fileUrl = await downloadImageToFileSystem(url: url) {
quickLookUrl = fileUrl
Expand Down

0 comments on commit dcf08b0

Please sign in to comment.