-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Sjmarf <[email protected]>
- Loading branch information
1 parent
3daecd4
commit 59ce59d
Showing
14 changed files
with
225 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// AVPlayer+Extensions.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2024-12-09. | ||
// | ||
// From https://stackoverflow.com/questions/11704322/how-to-check-if-avplayer-has-video-or-just-audio | ||
|
||
import AVFoundation | ||
|
||
extension AVPlayer { | ||
func isAudioAvailable() async throws -> Bool? { | ||
return try await self.currentItem?.asset.loadTracks(withMediaType: .audio).count != 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// WebpView.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2024-12-06. | ||
// | ||
|
||
import SDWebImageSwiftUI | ||
import SwiftUI | ||
|
||
struct WebpView: View { | ||
let data: Data | ||
|
||
@State var animating: Bool = true | ||
|
||
var body: some View { | ||
AnimatedImage(data: data, isAnimating: $animating) | ||
.resizable() | ||
.withAnimationControls(animating: $animating) | ||
} | ||
} |
Oops, something went wrong.