Skip to content

Commit 1b1f684

Browse files
committed
Add video playground
1 parent 300e9b0 commit 1b1f684

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#if canImport(AndroidSwiftUI)
2+
import AndroidSwiftUI
3+
#else
4+
import SwiftUI
5+
import AVKit
6+
#endif
7+
8+
import Foundation
9+
10+
struct VideoPlayground: View {
11+
var body: some View {
12+
ScrollView {
13+
VStack(alignment: .leading, spacing: 0) {
14+
Example("Streaming video") {
15+
VStack(alignment: .leading, spacing: 8) {
16+
VideoPlayer(player: AVPlayer(url: URL(string: "https://storage.googleapis.com/exoplayer-test-media-0/BigBuckBunny_320x180.mp4")!))
17+
.cornerRadius(8)
18+
Text("Tap the video for playback controls")
19+
}
20+
}
21+
}
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)