add apple tv app

This commit is contained in:
Trey t
2024-06-18 12:03:56 -05:00
parent addeca4ead
commit 7d2b6b3e6e
134 changed files with 869 additions and 37 deletions

View File

@@ -0,0 +1,40 @@
//
// AudioQueue.swift
// Werkout_ios
//
// Created by Trey Tartt on 8/12/23.
//
import Foundation
enum AudioType {
case shortBeep
case finishBeep
case remoteURL(URL)
}
struct AudioQueue: Codable, Identifiable, Equatable {
var id = UUID()
let playAt: Int
let audioURL: String
enum CodingKeys: String, CodingKey {
case playAt = "play_at"
case audioURL = "audio_url"
}
var audioType: AudioType {
if audioURL == "short_beep" {
return .shortBeep
} else if audioURL == "long_beep" {
return .finishBeep
} else {
if let url = URL(string: BaseURLs.currentBaseURL + audioURL) {
return .remoteURL(url)
} else {
return .shortBeep
}
}
}
}