NowPlayingProgressView

struct NowPlayingProgressView : View

SwiftUI View for the progess of the current item in the player

  • The KodiPlayer model

    Declaration

    Swift

    @EnvironmentObject
    var player: KodiPlayer { get }
  • The current seconds

    Declaration

    Swift

    @State
    var currentSeconds: Double { get nonmutating set }
  • The total seconds

    Declaration

    Swift

    @State
    var totalSeconds: Double { get nonmutating set }
  • The time the item started to play

    Declaration

    Swift

    @State
    var startTime: Date { get nonmutating set }
  • The body of the View

    Declaration

    Swift

    var body: some View { get }
  • Set the time

    Declaration

    Swift

    private func setTime()
  • Calculate percentage played

    Declaration

    Swift

    private func percentageValue(for date: Date) -> Double