mirror of
https://github.com/yattee/yattee.git
synced 2024-12-15 06:40:32 +05:30
ba1115fe2a
WIP on controls Chapters working Add previews variable Add lists ids WIP
23 lines
615 B
Swift
23 lines
615 B
Swift
import SwiftUI
|
|
|
|
struct NetworkState: View {
|
|
@EnvironmentObject<PlayerModel> private var player
|
|
@EnvironmentObject<NetworkStateModel> private var model
|
|
|
|
var body: some View {
|
|
Buffering(state: model.fullStateText)
|
|
.opacity(model.pausedForCache || player.isSeeking ? 1 : 0)
|
|
}
|
|
}
|
|
|
|
struct NetworkState_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
let networkState = NetworkStateModel()
|
|
networkState.bufferingState = 30
|
|
|
|
return NetworkState()
|
|
.environmentObject(networkState)
|
|
.environmentObject(PlayerModel())
|
|
}
|
|
}
|