support multiple servers

This commit is contained in:
Rasmus Krämer
2022-04-15 10:16:11 +02:00
parent 9a7b2e8172
commit 29fd29728a
8 changed files with 68 additions and 38 deletions
+2 -2
View File
@@ -164,11 +164,11 @@ class AudioPlayer: NSObject {
// MARK: - Private
private func createAsset() -> AVAsset {
let headers: [String: String] = [
"Authorization": "Bearer \(Store.serverConfig.token)"
"Authorization": "Bearer \(Store.serverConfig!.token)"
]
debugPrint(activeAudioTrack)
return AVURLAsset(url: URL(string: "\(Store.serverConfig.address)\(activeAudioTrack.contentUrl)")!, options: ["AVURLAssetHTTPHeaderFieldsKey": headers])
return AVURLAsset(url: URL(string: "\(Store.serverConfig!.address)\(activeAudioTrack.contentUrl)")!, options: ["AVURLAssetHTTPHeaderFieldsKey": headers])
}
private func initAudioSession() {
do {