From 6f9aebd8c3a9e4647b85b5b965a756a8b7d27ceb Mon Sep 17 00:00:00 2001 From: loinsir Date: Sun, 21 Jan 2024 17:01:47 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:heavy=5Fplus=5Fsign:=20add:=20=ED=94=84?= =?UTF-8?q?=EB=A1=9D=EC=8B=9C=20=EC=BA=90=EC=8B=9C=20=EC=84=9C=EB=B2=84=20?= =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/Layover/Layover.xcodeproj/project.pbxproj | 17 +++++++++ .../xcshareddata/swiftpm/Package.resolved | 36 +++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/iOS/Layover/Layover.xcodeproj/project.pbxproj b/iOS/Layover/Layover.xcodeproj/project.pbxproj index 9288b24..8fb0922 100644 --- a/iOS/Layover/Layover.xcodeproj/project.pbxproj +++ b/iOS/Layover/Layover.xcodeproj/project.pbxproj @@ -113,6 +113,7 @@ 19AE482A2B2A127E00DD4612 /* HLSAssetResourceLoaderDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19AE48292B2A127E00DD4612 /* HLSAssetResourceLoaderDelegate.swift */; }; 19AE482C2B2A1A8B00DD4612 /* HLSSliceResourceLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19AE482B2B2A1A8B00DD4612 /* HLSSliceResourceLoader.swift */; }; 19AE482E2B2A24C700DD4612 /* URL+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19AE482D2B2A24C700DD4612 /* URL+.swift */; }; + 19AF2A062B5D06B9008C3620 /* HLSCachingServer in Frameworks */ = {isa = PBXBuildFile; productRef = 19AF2A052B5D06B9008C3620 /* HLSCachingServer */; }; 19B665D92B4EEDDD0083E63C /* SignUpWorkerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B665D52B4EEDDD0083E63C /* SignUpWorkerTests.swift */; }; 19B665DA2B4EEDDD0083E63C /* SignUpInteractorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B665D62B4EEDDD0083E63C /* SignUpInteractorTests.swift */; }; 19B665DB2B4EEDDD0083E63C /* SignUpPresenterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B665D72B4EEDDD0083E63C /* SignUpPresenterTests.swift */; }; @@ -531,6 +532,7 @@ buildActionMask = 2147483647; files = ( 194551FD2B0386D100299768 /* KakaoSDK in Frameworks */, + 19AF2A062B5D06B9008C3620 /* HLSCachingServer in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1286,6 +1288,7 @@ name = Layover; packageProductDependencies = ( 194551FC2B0386D100299768 /* KakaoSDK */, + 19AF2A052B5D06B9008C3620 /* HLSCachingServer */, ); productName = Layover; productReference = FC7E45362AFEB623004F155A /* Layover.app */; @@ -1340,6 +1343,7 @@ mainGroup = FC7E452D2AFEB623004F155A; packageReferences = ( 194551FB2B03863B00299768 /* XCRemoteSwiftPackageReference "kakao-ios-sdk" */, + 19AF2A042B5D06B9008C3620 /* XCRemoteSwiftPackageReference "HLSCachingServer" */, ); productRefGroup = FC7E45372AFEB623004F155A /* Products */; projectDirPath = ""; @@ -1943,6 +1947,14 @@ kind = branch; }; }; + 19AF2A042B5D06B9008C3620 /* XCRemoteSwiftPackageReference "HLSCachingServer" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/loinsir/HLSCachingServer"; + requirement = { + branch = main; + kind = branch; + }; + }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -1951,6 +1963,11 @@ package = 194551FB2B03863B00299768 /* XCRemoteSwiftPackageReference "kakao-ios-sdk" */; productName = KakaoSDK; }; + 19AF2A052B5D06B9008C3620 /* HLSCachingServer */ = { + isa = XCSwiftPackageProductDependency; + package = 19AF2A042B5D06B9008C3620 /* XCRemoteSwiftPackageReference "HLSCachingServer" */; + productName = HLSCachingServer; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = FC7E452E2AFEB623004F155A /* Project object */; diff --git a/iOS/Layover/Layover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/iOS/Layover/Layover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index aa1edfc..9bd86d9 100644 --- a/iOS/Layover/Layover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/iOS/Layover/Layover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -9,6 +9,15 @@ "version" : "5.8.1" } }, + { + "identity" : "hlscachingserver", + "kind" : "remoteSourceControl", + "location" : "https://github.com/loinsir/HLSCachingServer", + "state" : { + "branch" : "main", + "revision" : "53a12e8b498e3c95f55fa837f3561db22eab88bb" + } + }, { "identity" : "kakao-ios-sdk", "kind" : "remoteSourceControl", @@ -17,6 +26,33 @@ "branch" : "master", "revision" : "5840447aabb9512d0ead90f672724e558731abc1" } + }, + { + "identity" : "swift-atomics", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-atomics.git", + "state" : { + "revision" : "cd142fd2f64be2100422d658e7411e39489da985", + "version" : "1.2.0" + } + }, + { + "identity" : "swift-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-collections.git", + "state" : { + "revision" : "d029d9d39c87bed85b1c50adee7c41795261a192", + "version" : "1.0.6" + } + }, + { + "identity" : "swift-nio", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio.git", + "state" : { + "revision" : "702cd7c56d5d44eeba73fdf83918339b26dc855c", + "version" : "2.62.0" + } } ], "version" : 2 From f60d5f2277e74c5d126ccc552de9b7587ac69ab2 Mon Sep 17 00:00:00 2001 From: loinsir Date: Sun, 21 Jan 2024 17:12:52 +0900 Subject: [PATCH 2/2] =?UTF-8?q?:art:=20feat:=20=EC=9E=AC=EC=83=9D=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=97=90=20hls=20=EC=BA=90=EC=8B=B1=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xcshareddata/swiftpm/Package.resolved | 2 +- iOS/Layover/Layover/AppDelegate.swift | 5 ++++- iOS/Layover/Layover/Scenes/Playback/PlaybackView.swift | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/iOS/Layover/Layover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/iOS/Layover/Layover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 9bd86d9..9a7890a 100644 --- a/iOS/Layover/Layover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/iOS/Layover/Layover.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,7 +15,7 @@ "location" : "https://github.com/loinsir/HLSCachingServer", "state" : { "branch" : "main", - "revision" : "53a12e8b498e3c95f55fa837f3561db22eab88bb" + "revision" : "968a67456b32d1ec889c60b826fd85b2fd6add39" } }, { diff --git a/iOS/Layover/Layover/AppDelegate.swift b/iOS/Layover/Layover/AppDelegate.swift index e610d8d..83b93f4 100644 --- a/iOS/Layover/Layover/AppDelegate.swift +++ b/iOS/Layover/Layover/AppDelegate.swift @@ -7,11 +7,12 @@ import UIKit import KakaoSDKCommon +import HLSCachingServer @main class AppDelegate: UIResponder, UIApplicationDelegate { - + private let hlsCachingServer = HLSCachingServer(urlSession: .shared, urlCache: .shared) func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { @@ -27,6 +28,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { setNavigationControllerAppearance() setTabBarAppearance() + hlsCachingServer.start(port: 12345) + return true } diff --git a/iOS/Layover/Layover/Scenes/Playback/PlaybackView.swift b/iOS/Layover/Layover/Scenes/Playback/PlaybackView.swift index 59f859c..c3d448f 100644 --- a/iOS/Layover/Layover/Scenes/Playback/PlaybackView.swift +++ b/iOS/Layover/Layover/Scenes/Playback/PlaybackView.swift @@ -8,6 +8,7 @@ import UIKit import AVFoundation +import HLSCachingServer final class PlaybackView: UIView { @@ -106,7 +107,8 @@ final class PlaybackView: UIView { // MARK: Player Setting Method func addAVPlayer(url: URL) { - playerView.player = AVPlayer(url: url) + guard let reverseProxyURL = HLSCachingServer.reverseProxyURL(from: url) else { return } + playerView.player = AVPlayer(url: reverseProxyURL) } func getPlayerItemStatus() -> AVPlayerItem.Status? {