yattee/Shared/Player/Controls/OSD/NetworkState.swift

22 lines
541 B
Swift
Raw Normal View History

import SwiftUI
struct NetworkState: View {
2022-09-01 23:19:15 +00:00
@ObservedObject private var model = NetworkStateModel.shared
var body: some View {
Buffering(state: model.fullStateText)
2022-09-01 23:05:31 +00:00
.opacity(model.osdVisible ? 1 : 0)
}
}
struct NetworkState_Previews: PreviewProvider {
static var previews: some View {
let networkState = NetworkStateModel()
networkState.bufferingState = 30
return NetworkState()
.environmentObject(networkState)
.environmentObject(PlayerModel())
}
}