diff --git a/Apple TV/PlayerView.swift b/Apple TV/PlayerView.swift index bb410821..944e6a74 100644 --- a/Apple TV/PlayerView.swift +++ b/Apple TV/PlayerView.swift @@ -10,11 +10,9 @@ struct PlayerView: View { } var body: some View { - ZStack { - if let video = provider.video { - PlayerViewController(video: video) - .edgesIgnoringSafeArea(.all) - } + VStack { + pvc? + .edgesIgnoringSafeArea(.all) } .task { async { @@ -22,4 +20,12 @@ struct PlayerView: View { } } } + + var pvc: PlayerViewController? { + guard provider.video != nil else { + return nil + } + + return PlayerViewController(video: provider.video!) + } } diff --git a/Apple TV/PlayerViewController.swift b/Apple TV/PlayerViewController.swift index a32979cb..49c60260 100644 --- a/Apple TV/PlayerViewController.swift +++ b/Apple TV/PlayerViewController.swift @@ -14,25 +14,17 @@ struct PlayerViewController: UIViewControllerRepresentable { self.video = video state = PlayerState(video) - loadStream(video.defaultStream, loadBest: false) + loadStream(video.defaultStream, loadBest: true) } - func loadStream(_ stream: Stream?, loadBest: Bool = false) { + fileprivate func loadStream(_ stream: Stream?, loadBest: Bool = false) { if stream != state.streamToLoad { state.loadStream(stream) addTracksAndLoadAssets(stream!, loadBest: loadBest) } } - func loadBestStream() { - guard state.currentStream != video.bestStream else { - return - } - - loadStream(video.bestStream) - } - - func addTracksAndLoadAssets(_ stream: Stream, loadBest: Bool = false) { + fileprivate func addTracksAndLoadAssets(_ stream: Stream, loadBest: Bool = false) { logger.info("adding tracks and loading assets for: \(stream.type), \(stream.description)") stream.assets.forEach { asset in @@ -42,7 +34,7 @@ struct PlayerViewController: UIViewControllerRepresentable { } } - func addTrack(_ asset: AVURLAsset, stream: Stream, type: AVMediaType? = nil) { + fileprivate func addTrack(_ asset: AVURLAsset, stream: Stream, type: AVMediaType? = nil) { let types: [AVMediaType] = stream.type == .adaptive ? [type!] : [.video, .audio] types.forEach { type in @@ -67,7 +59,7 @@ struct PlayerViewController: UIViewControllerRepresentable { } } - func handleAssetLoad(_ stream: Stream, type: AVMediaType, loadBest: Bool = false) { + fileprivate func handleAssetLoad(_ stream: Stream, type: AVMediaType, loadBest: Bool = false) { logger.info("handling asset load: \(stream.type), \(stream.description)") guard stream != state.currentStream else { @@ -82,7 +74,7 @@ struct PlayerViewController: UIViewControllerRepresentable { DispatchQueue.main.async { logger.info("ALL assets loaded: \(stream.type), \(stream.description)") - state.loadStreamIntoPlayer(stream) + state.playStream(stream) } if loadBest { @@ -92,18 +84,28 @@ struct PlayerViewController: UIViewControllerRepresentable { } } - func makeUIViewController(context _: Context) -> AVPlayerViewController { - let controller = AVPlayerViewController() + fileprivate func loadBestStream() { + guard state.currentStream != video.bestStream else { + return + } - controller.transportBarCustomMenuItems = [streamingQualityMenu] + loadStream(video.bestStream) + } + + func makeUIViewController(context _: Context) -> StreamAVPlayerViewController { + let controller = StreamAVPlayerViewController() + controller.state = state + + #if os(tvOS) + controller.transportBarCustomMenuItems = [streamingQualityMenu] + #endif controller.modalPresentationStyle = .fullScreen controller.player = state.player - controller.player?.automaticallyWaitsToMinimizeStalling = true return controller } - func updateUIViewController(_ controller: AVPlayerViewController, context _: Context) { + func updateUIViewController(_ controller: StreamAVPlayerViewController, context _: Context) { var items: [UIMenuElement] = [] if state.streamToLoad != nil { @@ -112,14 +114,16 @@ struct PlayerViewController: UIViewControllerRepresentable { items.append(streamingQualityMenu) - controller.transportBarCustomMenuItems = items + #if os(tvOS) + controller.transportBarCustomMenuItems = items + #endif } - var streamingQualityMenu: UIMenu { + fileprivate var streamingQualityMenu: UIMenu { UIMenu(title: "Streaming quality", image: UIImage(systemName: "waveform"), children: streamingQualityMenuActions) } - var streamingQualityMenuActions: [UIAction] { + fileprivate var streamingQualityMenuActions: [UIAction] { video.selectableStreams.map { stream in let image = self.state.currentStream == stream ? UIImage(systemName: "checkmark") : nil @@ -133,11 +137,11 @@ struct PlayerViewController: UIViewControllerRepresentable { } } - var actionsMenu: UIMenu { + fileprivate var actionsMenu: UIMenu { UIMenu(title: "Actions", image: UIImage(systemName: "bolt.horizontal.fill"), children: [cancelLoadingAction]) } - var cancelLoadingAction: UIAction { + fileprivate var cancelLoadingAction: UIAction { UIAction(title: "Cancel loading \(state.streamToLoad.description) stream") { _ in DispatchQueue.main.async { state.streamToLoad.cancelLoadingAssets() diff --git a/Apple TV/StreamAVPlayerViewController.swift b/Apple TV/StreamAVPlayerViewController.swift new file mode 100644 index 00000000..e252665c --- /dev/null +++ b/Apple TV/StreamAVPlayerViewController.swift @@ -0,0 +1,11 @@ +import AVKit + +class StreamAVPlayerViewController: AVPlayerViewController { + var state: PlayerState? + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + + state?.destroyPlayer() + } +} diff --git a/Apple TV/VideoThumbnailView.swift b/Apple TV/VideoThumbnailView.swift index 5ee1bcd8..5f5c6ad6 100644 --- a/Apple TV/VideoThumbnailView.swift +++ b/Apple TV/VideoThumbnailView.swift @@ -20,7 +20,6 @@ struct VideoThumbnailView: View { .frame(width: 320, height: 180) } .mask(RoundedRectangle(cornerRadius: 12)) - .frame(width: 320, height: 180) } else { Image(systemName: "exclamationmark.square") } diff --git a/Model/PlayerState.swift b/Model/PlayerState.swift index 002df3d3..0ec8c94a 100644 --- a/Model/PlayerState.swift +++ b/Model/PlayerState.swift @@ -7,15 +7,14 @@ final class PlayerState: ObservableObject { var video: Video + @Published private(set) var player: AVPlayer! = AVPlayer() + private(set) var composition = AVMutableComposition() @Published private(set) var currentStream: Stream! - @Published var streamToLoad: Stream! - @Published var savedTime: CMTime? + @Published private(set) var streamToLoad: Stream! + @Published private(set) var streamLoading = false - @Published var streamLoading = false - - @Published var player = AVPlayer() - var composition = AVMutableComposition() + @Published private(set) var savedTime: CMTime? var playerItem: AVPlayerItem { let playerItem = AVPlayerItem(asset: composition) @@ -30,15 +29,9 @@ final class PlayerState: ObservableObject { self.video = video } - func cancelLoadingStream(_ stream: Stream) { - guard streamToLoad == stream else { - return - } - - streamToLoad = nil - streamLoading = false - - logger.info("cancel streamToLoad: \(streamToLoad?.description ?? "nil"), streamLoading \(streamLoading)") + deinit { + print("destr deinit") + destroyPlayer() } func loadStream(_ stream: Stream?) { @@ -57,7 +50,6 @@ final class PlayerState: ObservableObject { func streamDidLoad(_ stream: Stream?) { logger.info("didload stream: \(stream!.description)") - logger.info("before: toLoad: \(streamToLoad?.description ?? "nil"), current \(currentStream?.description ?? "nil"), loading \(streamLoading)") currentStream = stream streamLoading = streamToLoad != stream @@ -65,22 +57,39 @@ final class PlayerState: ObservableObject { if streamToLoad == stream { streamToLoad = nil } - - logger.info("after: toLoad: \(streamToLoad?.description ?? "nil"), current \(currentStream?.description ?? "nil"), loading \(streamLoading)") } - func loadStreamIntoPlayer(_ stream: Stream) { + func cancelLoadingStream(_ stream: Stream) { + guard streamToLoad == stream else { + return + } + + streamToLoad = nil + streamLoading = false + + logger.info("cancel streamToLoad: \(streamToLoad?.description ?? "nil"), streamLoading \(streamLoading)") + } + + func playStream(_ stream: Stream) { + guard player != nil else { + return + } + logger.warning("loading \(stream.description) to player") - beforeLoadStreamIntoPlayer() + saveTime() player.replaceCurrentItem(with: playerItem) streamDidLoad(stream) - afterLoadStreamIntoPlayer() + seekToSavedTime() } - func beforeLoadStreamIntoPlayer() { + func saveTime() { + guard player != nil else { + return + } + let currentTime = player.currentTime() guard currentTime.seconds > 0 else { @@ -90,7 +99,11 @@ final class PlayerState: ObservableObject { savedTime = currentTime } - func afterLoadStreamIntoPlayer() { + func seekToSavedTime() { + guard player != nil else { + return + } + if let time = savedTime { player.seek(to: time) } @@ -98,6 +111,18 @@ final class PlayerState: ObservableObject { player.play() } + func destroyPlayer() { + logger.critical("destroying player") + + player.currentItem?.tracks.forEach { $0.assetTrack?.asset?.cancelLoading() } + + currentStream?.cancelLoadingAssets() + streamToLoad?.cancelLoadingAssets() + + player.cancelPendingPrerolls() + player.replaceCurrentItem(with: nil) + } + private func makeMetadataItem(_ identifier: AVMetadataIdentifier, value: Any) -> AVMetadataItem { let item = AVMutableMetadataItem() diff --git a/Model/Stream.swift b/Model/Stream.swift index 6fdfd8f1..73af9c8b 100644 --- a/Model/Stream.swift +++ b/Model/Stream.swift @@ -37,8 +37,6 @@ class Stream: Equatable { func cancelLoadingAssets() { assets.forEach { $0.cancelLoading() } - audioAsset = AVURLAsset(url: audioAsset.url) - videoAsset = AVURLAsset(url: videoAsset.url) } static func == (lhs: Stream, rhs: Stream) -> Bool { diff --git a/Pearvidious.xcodeproj/project.pbxproj b/Pearvidious.xcodeproj/project.pbxproj index a8b2513d..2ea432ce 100644 --- a/Pearvidious.xcodeproj/project.pbxproj +++ b/Pearvidious.xcodeproj/project.pbxproj @@ -7,7 +7,34 @@ objects = { /* Begin PBXBuildFile section */ + 37141668267A83F9006CA35D /* StreamAVPlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37141667267A83F9006CA35D /* StreamAVPlayerViewController.swift */; }; + 37141669267A83F9006CA35D /* StreamAVPlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37141667267A83F9006CA35D /* StreamAVPlayerViewController.swift */; }; + 3714166A267A83F9006CA35D /* StreamAVPlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37141667267A83F9006CA35D /* StreamAVPlayerViewController.swift */; }; 3741B5302676213400125C5E /* PlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3741B52F2676213400125C5E /* PlayerViewController.swift */; }; + 377FC7D3267A080300A6BBAF /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7D2267A080300A6BBAF /* Alamofire */; }; + 377FC7D5267A080300A6BBAF /* SwiftyJSON in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7D4267A080300A6BBAF /* SwiftyJSON */; }; + 377FC7D7267A080300A6BBAF /* URLImage in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7D6267A080300A6BBAF /* URLImage */; }; + 377FC7D9267A080300A6BBAF /* URLImageStore in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7D8267A080300A6BBAF /* URLImageStore */; }; + 377FC7DB267A080300A6BBAF /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7DA267A080300A6BBAF /* Logging */; }; + 377FC7DC267A081800A6BBAF /* PopularVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF27D26737323007FC770 /* PopularVideosView.swift */; }; + 377FC7DD267A081A00A6BBAF /* PopularVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF27D26737323007FC770 /* PopularVideosView.swift */; }; + 377FC7DE267A082100A6BBAF /* VideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF29926740A01007FC770 /* VideosView.swift */; }; + 377FC7DF267A082200A6BBAF /* VideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF29926740A01007FC770 /* VideosView.swift */; }; + 377FC7E0267A082600A6BBAF /* ChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF2892673AB89007FC770 /* ChannelView.swift */; }; + 377FC7E1267A082600A6BBAF /* ChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF2892673AB89007FC770 /* ChannelView.swift */; }; + 377FC7E2267A084A00A6BBAF /* VideoThumbnailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B18B26717B3800C925CA /* VideoThumbnailView.swift */; }; + 377FC7E3267A084A00A6BBAF /* VideoThumbnailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B18B26717B3800C925CA /* VideoThumbnailView.swift */; }; + 377FC7E4267A084E00A6BBAF /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF27F26737550007FC770 /* SearchView.swift */; }; + 377FC7E5267A084E00A6BBAF /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF27F26737550007FC770 /* SearchView.swift */; }; + 377FC7E6267A085600A6BBAF /* PlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B1822671681B00C925CA /* PlayerView.swift */; }; + 377FC7E7267A085600A6BBAF /* PlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B1822671681B00C925CA /* PlayerView.swift */; }; + 377FC7E8267A085D00A6BBAF /* PlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3741B52F2676213400125C5E /* PlayerViewController.swift */; }; + 377FC7E9267A085D00A6BBAF /* PlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3741B52F2676213400125C5E /* PlayerViewController.swift */; }; + 377FC7EB267A0A0800A6BBAF /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7EA267A0A0800A6BBAF /* Alamofire */; }; + 377FC7ED267A0A0800A6BBAF /* SwiftyJSON in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7EC267A0A0800A6BBAF /* SwiftyJSON */; }; + 377FC7EF267A0A0800A6BBAF /* URLImage in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7EE267A0A0800A6BBAF /* URLImage */; }; + 377FC7F1267A0A0800A6BBAF /* URLImageStore in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7F0267A0A0800A6BBAF /* URLImageStore */; }; + 377FC7F3267A0A0800A6BBAF /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7F2267A0A0800A6BBAF /* Logging */; }; 37AAF27E26737323007FC770 /* PopularVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF27D26737323007FC770 /* PopularVideosView.swift */; }; 37AAF28026737550007FC770 /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF27F26737550007FC770 /* SearchView.swift */; }; 37AAF2822673791F007FC770 /* SearchedVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF2812673791F007FC770 /* SearchedVideosProvider.swift */; }; @@ -107,6 +134,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 37141667267A83F9006CA35D /* StreamAVPlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StreamAVPlayerViewController.swift; sourceTree = ""; }; 3741B52F2676213400125C5E /* PlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerViewController.swift; sourceTree = ""; }; 37AAF27D26737323007FC770 /* PopularVideosView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopularVideosView.swift; sourceTree = ""; }; 37AAF27F26737550007FC770 /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = ""; }; @@ -151,6 +179,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 377FC7D9267A080300A6BBAF /* URLImageStore in Frameworks */, + 377FC7D5267A080300A6BBAF /* SwiftyJSON in Frameworks */, + 377FC7D7267A080300A6BBAF /* URLImage in Frameworks */, + 377FC7D3267A080300A6BBAF /* Alamofire in Frameworks */, + 377FC7DB267A080300A6BBAF /* Logging in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -158,6 +191,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 377FC7F1267A0A0800A6BBAF /* URLImageStore in Frameworks */, + 377FC7ED267A0A0800A6BBAF /* SwiftyJSON in Frameworks */, + 377FC7EF267A0A0800A6BBAF /* URLImage in Frameworks */, + 377FC7EB267A0A0800A6BBAF /* Alamofire in Frameworks */, + 377FC7F3267A0A0800A6BBAF /* Logging in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -197,6 +235,13 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 377FC7D1267A080300A6BBAF /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; 37C7A9022679058300E721B4 /* Extensions */ = { isa = PBXGroup; children = ( @@ -216,6 +261,7 @@ 37D4B0D72671614900C925CA /* Tests iOS */, 37D4B0E12671614900C925CA /* Tests macOS */, 37D4B0CA2671614900C925CA /* Products */, + 377FC7D1267A080300A6BBAF /* Frameworks */, ); sourceTree = ""; }; @@ -268,6 +314,7 @@ 37AAF27F26737550007FC770 /* SearchView.swift */, 37D4B1822671681B00C925CA /* PlayerView.swift */, 3741B52F2676213400125C5E /* PlayerViewController.swift */, + 37141667267A83F9006CA35D /* StreamAVPlayerViewController.swift */, 37AAF29926740A01007FC770 /* VideosView.swift */, 37D4B18B26717B3800C925CA /* VideoThumbnailView.swift */, 37D4B1AE26729DEB00C925CA /* Info.plist */, @@ -320,6 +367,13 @@ dependencies = ( ); name = "Pearvidious (iOS)"; + packageProductDependencies = ( + 377FC7D2267A080300A6BBAF /* Alamofire */, + 377FC7D4267A080300A6BBAF /* SwiftyJSON */, + 377FC7D6267A080300A6BBAF /* URLImage */, + 377FC7D8267A080300A6BBAF /* URLImageStore */, + 377FC7DA267A080300A6BBAF /* Logging */, + ); productName = "Pearvidious (iOS)"; productReference = 37D4B0C92671614900C925CA /* Pearvidious.app */; productType = "com.apple.product-type.application"; @@ -337,6 +391,13 @@ dependencies = ( ); name = "Pearvidious (macOS)"; + packageProductDependencies = ( + 377FC7EA267A0A0800A6BBAF /* Alamofire */, + 377FC7EC267A0A0800A6BBAF /* SwiftyJSON */, + 377FC7EE267A0A0800A6BBAF /* URLImage */, + 377FC7F0267A0A0800A6BBAF /* URLImageStore */, + 377FC7F2267A0A0800A6BBAF /* Logging */, + ); productName = "Pearvidious (macOS)"; productReference = 37D4B0CF2671614900C925CA /* Pearvidious.app */; productType = "com.apple.product-type.application"; @@ -538,18 +599,26 @@ 37CEE4BD2677B670005A1EFE /* AudioVideoStream.swift in Sources */, 37D4B19326717CE100C925CA /* PopularVideosProvider.swift in Sources */, 37AAF29C26741B5F007FC770 /* SubscriptionVideosProvider.swift in Sources */, + 37141668267A83F9006CA35D /* StreamAVPlayerViewController.swift in Sources */, + 377FC7E6267A085600A6BBAF /* PlayerView.swift in Sources */, 37CEE4C12677B697005A1EFE /* Stream.swift in Sources */, 37D4B0E62671614900C925CA /* ContentView.swift in Sources */, + 377FC7DC267A081800A6BBAF /* PopularVideosView.swift in Sources */, 37CEE4B52677B628005A1EFE /* StreamType.swift in Sources */, + 377FC7E3267A084A00A6BBAF /* VideoThumbnailView.swift in Sources */, 37AAF2822673791F007FC770 /* SearchedVideosProvider.swift in Sources */, 37AAF29026740715007FC770 /* AppState.swift in Sources */, 37AAF2942674086B007FC770 /* TabSelection.swift in Sources */, 37D4B1B02672A01000C925CA /* DataProvider.swift in Sources */, 37AAF28C2673ABD3007FC770 /* ChannelVideosProvider.swift in Sources */, + 377FC7E9267A085D00A6BBAF /* PlayerViewController.swift in Sources */, + 377FC7E5267A084E00A6BBAF /* SearchView.swift in Sources */, + 377FC7E1267A082600A6BBAF /* ChannelView.swift in Sources */, 37C7A9042679059200E721B4 /* AVKeyValueStatus+String.swift in Sources */, 37B767DB2677C3CA0098BAA8 /* PlayerState.swift in Sources */, 37D4B1B42672A30700C925CA /* VideoDetailsProvider.swift in Sources */, 37AAF2A026741C97007FC770 /* SubscriptionsView.swift in Sources */, + 377FC7DF267A082200A6BBAF /* VideosView.swift in Sources */, 37D4B19726717E1500C925CA /* Video.swift in Sources */, 37D4B0E42671614900C925CA /* PearvidiousApp.swift in Sources */, 37CEE4B92677B63F005A1EFE /* StreamResolution.swift in Sources */, @@ -563,18 +632,26 @@ 37CEE4BE2677B670005A1EFE /* AudioVideoStream.swift in Sources */, 37D4B19426717CE100C925CA /* PopularVideosProvider.swift in Sources */, 37AAF29D26741B5F007FC770 /* SubscriptionVideosProvider.swift in Sources */, + 37141669267A83F9006CA35D /* StreamAVPlayerViewController.swift in Sources */, + 377FC7E7267A085600A6BBAF /* PlayerView.swift in Sources */, 37CEE4C22677B697005A1EFE /* Stream.swift in Sources */, 37D4B0E72671614900C925CA /* ContentView.swift in Sources */, + 377FC7DD267A081A00A6BBAF /* PopularVideosView.swift in Sources */, 37CEE4B62677B628005A1EFE /* StreamType.swift in Sources */, + 377FC7E2267A084A00A6BBAF /* VideoThumbnailView.swift in Sources */, 37AAF2832673791F007FC770 /* SearchedVideosProvider.swift in Sources */, 37AAF29126740715007FC770 /* AppState.swift in Sources */, 37AAF2952674086B007FC770 /* TabSelection.swift in Sources */, 37D4B1B12672A01000C925CA /* DataProvider.swift in Sources */, 37AAF28D2673ABD3007FC770 /* ChannelVideosProvider.swift in Sources */, + 377FC7E8267A085D00A6BBAF /* PlayerViewController.swift in Sources */, + 377FC7E4267A084E00A6BBAF /* SearchView.swift in Sources */, + 377FC7E0267A082600A6BBAF /* ChannelView.swift in Sources */, 37C7A906267905AF00E721B4 /* AVKeyValueStatus+String.swift in Sources */, 37B767DC2677C3CA0098BAA8 /* PlayerState.swift in Sources */, 37D4B1B52672A30700C925CA /* VideoDetailsProvider.swift in Sources */, 37AAF2A126741C97007FC770 /* SubscriptionsView.swift in Sources */, + 377FC7DE267A082100A6BBAF /* VideosView.swift in Sources */, 37D4B19826717E1500C925CA /* Video.swift in Sources */, 37D4B0E52671614900C925CA /* PearvidiousApp.swift in Sources */, 37CEE4BA2677B63F005A1EFE /* StreamResolution.swift in Sources */, @@ -604,6 +681,7 @@ 37AAF28026737550007FC770 /* SearchView.swift in Sources */, 37CEE4BF2677B670005A1EFE /* AudioVideoStream.swift in Sources */, 37CEE4B72677B628005A1EFE /* StreamType.swift in Sources */, + 3714166A267A83F9006CA35D /* StreamAVPlayerViewController.swift in Sources */, 37D4B19526717CE100C925CA /* PopularVideosProvider.swift in Sources */, 37AAF29E26741B5F007FC770 /* SubscriptionVideosProvider.swift in Sources */, 37D4B1842671684E00C925CA /* PlayerView.swift in Sources */, @@ -784,7 +862,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -814,7 +892,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -849,7 +927,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = net.arekf.Pearvidious; PRODUCT_NAME = Pearvidious; @@ -878,7 +956,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = net.arekf.Pearvidious; PRODUCT_NAME = Pearvidious; @@ -1211,6 +1289,56 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 377FC7D2267A080300A6BBAF /* Alamofire */ = { + isa = XCSwiftPackageProductDependency; + package = 37D4B18F26717C6900C925CA /* XCRemoteSwiftPackageReference "Alamofire" */; + productName = Alamofire; + }; + 377FC7D4267A080300A6BBAF /* SwiftyJSON */ = { + isa = XCSwiftPackageProductDependency; + package = 37D4B19B2671817900C925CA /* XCRemoteSwiftPackageReference "SwiftyJSON" */; + productName = SwiftyJSON; + }; + 377FC7D6267A080300A6BBAF /* URLImage */ = { + isa = XCSwiftPackageProductDependency; + package = 37D4B1A92672580400C925CA /* XCRemoteSwiftPackageReference "url-image" */; + productName = URLImage; + }; + 377FC7D8267A080300A6BBAF /* URLImageStore */ = { + isa = XCSwiftPackageProductDependency; + package = 37D4B1A92672580400C925CA /* XCRemoteSwiftPackageReference "url-image" */; + productName = URLImageStore; + }; + 377FC7DA267A080300A6BBAF /* Logging */ = { + isa = XCSwiftPackageProductDependency; + package = 37B767DE2678C5BF0098BAA8 /* XCRemoteSwiftPackageReference "swift-log" */; + productName = Logging; + }; + 377FC7EA267A0A0800A6BBAF /* Alamofire */ = { + isa = XCSwiftPackageProductDependency; + package = 37D4B18F26717C6900C925CA /* XCRemoteSwiftPackageReference "Alamofire" */; + productName = Alamofire; + }; + 377FC7EC267A0A0800A6BBAF /* SwiftyJSON */ = { + isa = XCSwiftPackageProductDependency; + package = 37D4B19B2671817900C925CA /* XCRemoteSwiftPackageReference "SwiftyJSON" */; + productName = SwiftyJSON; + }; + 377FC7EE267A0A0800A6BBAF /* URLImage */ = { + isa = XCSwiftPackageProductDependency; + package = 37D4B1A92672580400C925CA /* XCRemoteSwiftPackageReference "url-image" */; + productName = URLImage; + }; + 377FC7F0267A0A0800A6BBAF /* URLImageStore */ = { + isa = XCSwiftPackageProductDependency; + package = 37D4B1A92672580400C925CA /* XCRemoteSwiftPackageReference "url-image" */; + productName = URLImageStore; + }; + 377FC7F2267A0A0800A6BBAF /* Logging */ = { + isa = XCSwiftPackageProductDependency; + package = 37B767DE2678C5BF0098BAA8 /* XCRemoteSwiftPackageReference "swift-log" */; + productName = Logging; + }; 37B767DF2678C5BF0098BAA8 /* Logging */ = { isa = XCSwiftPackageProductDependency; package = 37B767DE2678C5BF0098BAA8 /* XCRemoteSwiftPackageReference "swift-log" */;