KomodioPlayerView
struct KomodioPlayerView : ViewSwiftUI View for a video player (shared)
Currently, Komodio is using the AVPlayer from the SwiftlyKodiAPI package
It can only play ‘Apple Approved’ formats, so no MKV‘s
It is my intension to replace this sooner or later, but for now, it is as it is.
It will give a warning if it can’t play the file
- 
                  
                  The media item DeclarationSwift let media: MediaItem
- 
                  
                  The Video item try want to play DeclarationSwift @State private var video: (any KodiItem)? { get nonmutating set }
- 
                  
                  The loading state of the View DeclarationSwift @State private var status: ViewStatus { get nonmutating set }
- 
                  
                  
- 
                  
                  
- 
                  
                  
- 
                  
                  The body of the ViewDeclarationSwift var body: some View { get }
- 
                  checkMedia()AsynchronousCheck if we can play the media DeclarationSwift func checkMedia() async -> ViewStatusReturn ValueThe status 
- 
                  
                  SwiftUI See moreViewfor message that we can’t play a videoDeclarationSwift struct CantPlay : View
- 
                  
                  Check if we can play a video or not DeclarationSwift static func canPlay(video: any KodiItem) -> BoolParametersvideoThe video item Return ValueTrue or False 
 View on GitHub
View on GitHub KomodioPlayerView Structure Reference
        KomodioPlayerView Structure Reference