liveview-native-swiftui-avkit
is an add-on library for LiveView Native. It adds AVKit support for video playback and other audiovisual capabilities.
https://github.com/liveview-native/liveview-native-swiftui-avkit
Import LiveViewNativeAVKit
and add the AVKitRegistry
to the list of addons on your LiveView
:
import SwiftUI
import LiveViewNative
import LiveViewNativeAVKit
struct ContentView: View {
var body: some View {
#LiveView(
.localhost,
addons: [AVKitRegistry<_>.self]
)
}
}
Now you can use the VideoPlayer
element in your template.
```html
|
![]() |
You can view documentation on the elements and attributes in this addon from Xcode: