File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
Sources/swiftui-loop-videoplayer Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2020## SwiftUI example for the package
2121[ SwiftUI loop video player example] ( https://github.com/The-Igor/swiftui-loop-videoplayer-example )
2222
23- ![ The concept] ( https://github.com/The-Igor/swiftui-loop-videoplayer-example/blob/main/swiftui-loop-videoplayer-example/img/img_01 .gif )
23+ ![ The concept] ( https://github.com/The-Igor/swiftui-loop-videoplayer-example/blob/main/swiftui-loop-videoplayer-example/img/img_02 .gif )
2424
2525## Documentation(API)
2626- You need to have Xcode 13 installed in order to have access to Documentation Compiler (DocC)
Original file line number Diff line number Diff line change 66//
77
88import SwiftUI
9+ import UIKit
910import AVKit
1011
1112/// Player view for running a video in loop
@@ -55,7 +56,7 @@ public struct LoopPlayerView: UIViewRepresentable {
5556 /// - Returns: View
5657 public func makeUIView( context: Context ) -> UIView {
5758 let name = resourceName
58- let ext = extention
59+ let ext = extention
5960 guard let view = LoopingPlayerUIView ( name, width: ext, gravity: videoGravity) else {
6061 return errorTpl ( )
6162 }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class LoopingPlayerUIView: UIView {
2525 /// - name: Name of the video to play
2626 /// - ext: Video extension
2727 /// - gravity: A structure that defines how a layer displays a player’s visual content within the layer’s bounds
28- public init ? ( _ name: String , width ext: String , gravity: AVLayerVideoGravity ) {
28+ init ? ( _ name: String , width ext: String , gravity: AVLayerVideoGravity ) {
2929
3030 /// Load the resource
3131 guard let fileUrl = Bundle . main. url ( forResource: name, withExtension: ext) else {
You can’t perform that action at this time.
0 commit comments