Initial Commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// AudioPlayerEnvironment.swift
|
||||
// Mobile Music Assistant
|
||||
//
|
||||
// Created by Sven Hanold on 26.03.26.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
// Environment key for audio player
|
||||
private struct AudioPlayerKey: EnvironmentKey {
|
||||
static let defaultValue: MAAudioPlayer? = nil
|
||||
}
|
||||
|
||||
extension EnvironmentValues {
|
||||
var audioPlayer: MAAudioPlayer? {
|
||||
get { self[AudioPlayerKey.self] }
|
||||
set { self[AudioPlayerKey.self] = newValue }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user