mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 22:00:31 +05:30
fix tvOS build
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
This commit is contained in:
parent
a65ed67751
commit
4855f9bead
@ -1322,6 +1322,8 @@ final class PlayerModel: ObservableObject {
|
|||||||
logger.info("Interruption type received: \(type)")
|
logger.info("Interruption type received: \(type)")
|
||||||
|
|
||||||
// Check availability for iOS 14.5 or newer to handle interruption reason
|
// Check availability for iOS 14.5 or newer to handle interruption reason
|
||||||
|
// Currently only for debugging purpose
|
||||||
|
#if os(iOS)
|
||||||
if #available(iOS 14.5, *) {
|
if #available(iOS 14.5, *) {
|
||||||
// Extract the interruption reason, if available
|
// Extract the interruption reason, if available
|
||||||
if let reasonValue = info[AVAudioSessionInterruptionReasonKey] as? UInt,
|
if let reasonValue = info[AVAudioSessionInterruptionReasonKey] as? UInt,
|
||||||
@ -1342,6 +1344,7 @@ final class PlayerModel: ObservableObject {
|
|||||||
} else {
|
} else {
|
||||||
logger.info("Interruption reason handling is not available on this iOS version.")
|
logger.info("Interruption reason handling is not available on this iOS version.")
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Handle the specific interruption type
|
// Handle the specific interruption type
|
||||||
switch type {
|
switch type {
|
||||||
|
Loading…
Reference in New Issue
Block a user