MediaButtons

public enum MediaButtons

Collection of SwiftUI media buttons (SwiftlyKodi Type)

The Views require to have the KodiPlayer Observable Class in the ‘environment’ or else your Application will crash

Note

The buttons are smart and will be disabled when not applicable

Media Buttons

  • Play/Pause an item in the playlist

    There are a few senario’s:

    • Playlist is empty: disable this button; there is nothing to play
    • Player is paused: do method .playerPlayPause to pause
    • Player is playing: do method .playerPlayPause to play
    • Player is stopped: do method .playerOpen to start the playlist
    See more

    Declaration

    Swift

    struct PlayPause : View
  • Play the previous item

    Note

    Kodi is a bit weird; going to ‘previous’ goes to the beginning of an item when it played for a while; else it reallly goes to the previous item
    See more

    Declaration

    Swift

    struct PlayPrevious : View
  • Play the next item

    See more

    Declaration

    Swift

    struct PlayNext : View
  • Toggle shuffle button

    See more

    Declaration

    Swift

    struct SetShuffle : View
  • Toggle repeat button

    See more

    Declaration

    Swift

    struct SetRepeat : View
  • Partymode button (forced to audio)

    Note

    This will set ‘Party Mode’ for audio, I don’t see a use of videos for this
    See more

    Declaration

    Swift

    struct SetPartyMode : View
  • Volume slider

    See more

    Declaration

    Swift

    struct VolumeSlider : View