Skip to content

Commit

Permalink
πŸ› 린트 μ—λŸ¬ 및 ν…ŒμŠ€νŠΈ μˆ˜μ •
Browse files Browse the repository at this point in the history
  • Loading branch information
anyukyung committed Dec 14, 2023
1 parent 271a3b8 commit 64ce2ab
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions iOS/Layover/Layover/Extensions/URL+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ extension URL {
return components?.url ?? self
}

var customHLS_URL: URL {
var customHLSURL: URL {
changeScheme(to: "lhls")
}

var originHLS_URL: URL {
var originHLSURL: URL {
changeScheme(to: "https")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class LoopingPlayerView: UIView {
let asset: AVURLAsset
if let assetResourceLoaderDelegate {
self.assetResourceLoaderDelegate = assetResourceLoaderDelegate
asset = AVURLAsset(url: url.customHLS_URL)
asset = AVURLAsset(url: url.customHLSURL)
asset.resourceLoader.setDelegate(assetResourceLoaderDelegate,
queue: DispatchQueue.global(qos: .utility))
Task {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class HLSAssetResourceLoaderDelegate: NSObject, AVAssetResourceLoaderDelegate {

// κ³΅ν†΅μœΌλ‘œ 처리
func loadRequestedResource(_ loadingRequest: AVAssetResourceLoadingRequest) -> Bool {
guard let url = loadingRequest.request.url?.originHLS_URL else { return false }
guard let url = loadingRequest.request.url?.originHLSURL else { return false }

if url.pathExtension.contains("ts") { // ts νŒŒμΌμ€ λ¦¬λ””λ ‰μ…˜ μ‹œν‚¨λ‹€.
loadingRequest.redirect = URLRequest(url: url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ final class HLSSliceResourceLoader: ResourceLoader {
// MARK: - ResourceLoader

func loadResource(from url: URL) async -> Data? {
let urlRequest = URLRequest(url: url.originHLS_URL) // μ›λž˜ url scheme 으둜 λ³€κ²½
let urlRequest = URLRequest(url: url.originHLSURL) // μ›λž˜ url scheme 으둜 λ³€κ²½

guard let (data, response) = try? await session.data(for: urlRequest),
let httpResponse = response as? HTTPURLResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ class UploadPostInteractorTests: XCTestCase {
presentUploadButtonResponse = response
}

func presentUnsupportedFormatAlert() {

}

}

// MARK: - Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ class UploadPostPresenterTests: XCTestCase {
displayUploadButtonViewModel = viewModel
}

func displayUnsupportedFormatAlert() {

}

}

// MARK: - Tests
Expand Down

0 comments on commit 64ce2ab

Please sign in to comment.