Skip to content

Commit 4489264

Browse files
committed
update
1 parent 343ebdc commit 4489264

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
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)

Sources/swiftui-loop-videoplayer/LoopPlayerView.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import SwiftUI
9+
import UIKit
910
import 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
}

Sources/swiftui-loop-videoplayer/view/LoopingPlayerUIView.swift

+1-1
Original file line numberDiff line numberDiff 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{

0 commit comments

Comments
 (0)