Skip to content

Commit 342b8c7

Browse files
committed
Implemented live special event streaming in Explore tab
1 parent 025a1c0 commit 342b8c7

14 files changed

+477
-227
lines changed

Packages/ConfCore/ConfCore/Storage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public final class Storage {
2626
self.realmConfig = realm.configuration
2727
self.realm = realm
2828

29-
/// This used to be necessary because of CPU usage in the app during script indexing, but it causes a long period of time during indexing where content doesn't reflect what's on the database,
30-
/// including for user actions such as favoriting, etc. Tested with the current version of Realm in the app and it doesn't seem to be an issue anymore.
29+
// This used to be necessary because of CPU usage in the app during script indexing, but it causes a long period of time during indexing where content doesn't reflect what's on the database,
30+
// including for user actions such as favoriting, etc. Tested with the current version of Realm in the app and it doesn't seem to be an issue anymore.
3131
// DistributedNotificationCenter.default().rx.notification(.TranscriptIndexingDidStart).subscribe(onNext: { [unowned self] _ in
3232
// os_log("Locking Realm auto-updates until transcript indexing is finished", log: self.log, type: .info)
3333
//

WWDC.xcodeproj/project.pbxproj

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
DD6E06F61EDBC379000EAEA4 /* WWDCBottomBorderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6E06F51EDBC379000EAEA4 /* WWDCBottomBorderView.swift */; };
5858
DD6E06F81EDBC62D000EAEA4 /* SessionTranscriptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6E06F71EDBC62D000EAEA4 /* SessionTranscriptViewController.swift */; };
5959
DD6E06FC1EDBCA7E000EAEA4 /* TranscriptTableCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6E06FB1EDBCA7E000EAEA4 /* TranscriptTableCellView.swift */; };
60-
DD71CC2A20BD009500BB5F47 /* AppCoordinator+Featured.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD71CC2920BD009500BB5F47 /* AppCoordinator+Featured.swift */; };
6160
DD78588124C3594B008C1C22 /* SlowMigrationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD78588024C3594B008C1C22 /* SlowMigrationView.swift */; };
6261
DD7A2103218111470052FD07 /* WWDCProgressIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD7A2102218111470052FD07 /* WWDCProgressIndicator.swift */; };
6362
DD7E28FF247FE69400A58370 /* ScheduleContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD7E28FE247FE69400A58370 /* ScheduleContainerViewController.swift */; };
@@ -188,6 +187,9 @@
188187
F44C826E2A23B65D00FDE980 /* ToggleFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDEDFCF01ED927A4002477C8 /* ToggleFilter.swift */; };
189188
F44C826F2A23B66300FDE980 /* FilterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD90CDCA1ED77A4800CADE86 /* FilterType.swift */; };
190189
F44C82712A23B68900FDE980 /* TextualFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDEDFCF21ED92F2A002477C8 /* TextualFilter.swift */; };
190+
F4578D572A2659B3005B311A /* ExploreTabItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4578D562A2659B3005B311A /* ExploreTabItemView.swift */; };
191+
F4578D592A2659C5005B311A /* LiveStreamOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4578D582A2659C5005B311A /* LiveStreamOverlay.swift */; };
192+
F4578D5B2A2659F0005B311A /* VideoPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4578D5A2A2659F0005B311A /* VideoPlayer.swift */; };
191193
F4749CE9265C005500062B83 /* WWDCAgentAppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4749CE8265C005500062B83 /* WWDCAgentAppDelegate.swift */; };
192194
F4749CED265C005500062B83 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4749CEC265C005500062B83 /* Assets.xcassets */; };
193195
F4749CF0265C005500062B83 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4749CEF265C005500062B83 /* Preview Assets.xcassets */; };
@@ -371,7 +373,6 @@
371373
DD6E06F51EDBC379000EAEA4 /* WWDCBottomBorderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WWDCBottomBorderView.swift; sourceTree = "<group>"; };
372374
DD6E06F71EDBC62D000EAEA4 /* SessionTranscriptViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionTranscriptViewController.swift; sourceTree = "<group>"; };
373375
DD6E06FB1EDBCA7E000EAEA4 /* TranscriptTableCellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TranscriptTableCellView.swift; sourceTree = "<group>"; };
374-
DD71CC2920BD009500BB5F47 /* AppCoordinator+Featured.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppCoordinator+Featured.swift"; sourceTree = "<group>"; };
375376
DD78588024C3594B008C1C22 /* SlowMigrationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlowMigrationView.swift; sourceTree = "<group>"; };
376377
DD7A2102218111470052FD07 /* WWDCProgressIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WWDCProgressIndicator.swift; sourceTree = "<group>"; };
377378
DD7E28FE247FE69400A58370 /* ScheduleContainerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScheduleContainerViewController.swift; sourceTree = "<group>"; };
@@ -494,13 +495,16 @@
494495
DDF721E21ECA12FC0054C503 /* PIP.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PIP.framework; path = ../../../../../System/Library/PrivateFrameworks/PIP.framework; sourceTree = "<group>"; };
495496
DDFA10BE1EBEAAAD001DCF66 /* DownloadManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DownloadManager.swift; sourceTree = "<group>"; };
496497
DDFD6198247EE55200AD1CD7 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
498+
F42472B12A24D6AC00F68237 /* OpenSource.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = OpenSource.xcconfig; sourceTree = "<group>"; };
497499
F44C82302A2285AC00FDE980 /* OffsetObservingScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffsetObservingScrollView.swift; sourceTree = "<group>"; };
498500
F44C82322A22879000FDE980 /* TitleBarBlurFadeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleBarBlurFadeView.swift; sourceTree = "<group>"; };
499501
F44C82342A22921300FDE980 /* ExploreTabProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExploreTabProvider.swift; sourceTree = "<group>"; };
500502
F44C82362A22B84F00FDE980 /* PreviewAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = PreviewAssets.xcassets; sourceTree = "<group>"; };
501503
F44C82392A22B8DD00FDE980 /* ExploreTabContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExploreTabContent.swift; sourceTree = "<group>"; };
502504
F44C823B2A22B90600FDE980 /* RemoteImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteImage.swift; sourceTree = "<group>"; };
503-
F42472B12A24D6AC00F68237 /* OpenSource.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = OpenSource.xcconfig; sourceTree = "<group>"; };
505+
F4578D562A2659B3005B311A /* ExploreTabItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExploreTabItemView.swift; sourceTree = "<group>"; };
506+
F4578D582A2659C5005B311A /* LiveStreamOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveStreamOverlay.swift; sourceTree = "<group>"; };
507+
F4578D5A2A2659F0005B311A /* VideoPlayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoPlayer.swift; sourceTree = "<group>"; };
504508
F4749CE6265C005400062B83 /* WWDCAgent.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WWDCAgent.app; sourceTree = BUILT_PRODUCTS_DIR; };
505509
F4749CE8265C005500062B83 /* WWDCAgentAppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WWDCAgentAppDelegate.swift; sourceTree = "<group>"; };
506510
F4749CEC265C005500062B83 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -535,13 +539,13 @@
535539
F4CCF93E265EC58900A69E62 /* WWDCAppCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WWDCAppCommand.swift; sourceTree = "<group>"; };
536540
F4CCF941265ED24500A69E62 /* AppCommandsReceiver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCommandsReceiver.swift; sourceTree = "<group>"; };
537541
F4D0F0352A2012C700C74B50 /* VisualEffectDebugger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VisualEffectDebugger.m; sourceTree = "<group>"; };
542+
F4D0F0382A20162200C74B50 /* Main.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Main.xcconfig; sourceTree = "<group>"; };
538543
F4D0F0392A21056900C74B50 /* TopicHeaderRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopicHeaderRow.swift; sourceTree = "<group>"; };
544+
F4F1C9A22A24FF50002C3709 /* TeamID.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = TeamID.xcconfig; sourceTree = "<group>"; };
539545
F4FB069E2A2148EA00799F84 /* ExploreTabRootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExploreTabRootView.swift; sourceTree = "<group>"; };
540546
F4FB06A02A21493B00799F84 /* PreviewSupport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewSupport.swift; sourceTree = "<group>"; };
541547
F4FB06BE2A216C1F00799F84 /* RemoteGlyph.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteGlyph.swift; sourceTree = "<group>"; };
542548
F4FB06C02A2178C000799F84 /* WWDCWindowContentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WWDCWindowContentViewController.swift; sourceTree = "<group>"; };
543-
F4D0F0382A20162200C74B50 /* Main.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Main.xcconfig; sourceTree = "<group>"; };
544-
F4F1C9A22A24FF50002C3709 /* TeamID.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = TeamID.xcconfig; sourceTree = "<group>"; };
545549
/* End PBXFileReference section */
546550

547551
/* Begin PBXFrameworksBuildPhase section */
@@ -698,7 +702,6 @@
698702
DDF32EB61EBE65930028E39D /* AppCoordinator+UserActivity.swift */,
699703
DDF32EBA1EBE65DD0028E39D /* AppCoordinator+SessionActions.swift */,
700704
DD4873D220AE5FF3005033CE /* AppCoordinator+RelatedSessions.swift */,
701-
DD71CC2920BD009500BB5F47 /* AppCoordinator+Featured.swift */,
702705
DDFA10BE1EBEAAAD001DCF66 /* DownloadManager.swift */,
703706
4D0E806E217A2D6E00B24237 /* DownloadManager+SupportingTypesAndExtensions.swift */,
704707
DD0159FB1ED23F7700F980F1 /* RemoteEnvironment.swift */,
@@ -1308,6 +1311,9 @@
13081311
F44C823B2A22B90600FDE980 /* RemoteImage.swift */,
13091312
F44C82302A2285AC00FDE980 /* OffsetObservingScrollView.swift */,
13101313
F44C82322A22879000FDE980 /* TitleBarBlurFadeView.swift */,
1314+
F4578D562A2659B3005B311A /* ExploreTabItemView.swift */,
1315+
F4578D5A2A2659F0005B311A /* VideoPlayer.swift */,
1316+
F4578D582A2659C5005B311A /* LiveStreamOverlay.swift */,
13111317
);
13121318
name = Components;
13131319
sourceTree = "<group>";
@@ -1640,6 +1646,7 @@
16401646
DD7F38781EAC0C98002D8C00 /* ShelfViewController.swift in Sources */,
16411647
DDDAA40C1EC798B600DF9D02 /* Preferences.swift in Sources */,
16421648
DDB352A01EC9088000254815 /* WWDCTableView.swift in Sources */,
1649+
F4578D572A2659B3005B311A /* ExploreTabItemView.swift in Sources */,
16431650
DDB28F861EAD20A10077703F /* UIDebugger.m in Sources */,
16441651
F4CCF942265ED24500A69E62 /* AppCommandsReceiver.swift in Sources */,
16451652
DDB3529A1EC8AB2800254815 /* WWDCImageView.swift in Sources */,
@@ -1658,13 +1665,15 @@
16581665
F44C82352A22921300FDE980 /* ExploreTabProvider.swift in Sources */,
16591666
DDF32EB31EBE5C4D0028E39D /* SessionActionsViewController.swift in Sources */,
16601667
DDA7B7352484416B00F86668 /* CompositionalLayoutBackgroundSwizzler.m in Sources */,
1668+
F4578D5B2A2659F0005B311A /* VideoPlayer.swift in Sources */,
16611669
4D4D80C4217D281D00D1C233 /* DownloadViewModel.swift in Sources */,
16621670
DDB28F931EAD48D70077703F /* UserActivityRepresentable.swift in Sources */,
16631671
4DA25DC821063CD500762BBD /* TitleBarViewController.swift in Sources */,
16641672
4D5EB0F820598E6000D4BC52 /* SessionRowProvider.swift in Sources */,
16651673
DD7E28FF247FE69400A58370 /* ScheduleContainerViewController.swift in Sources */,
16661674
F4FB06C12A2178C000799F84 /* WWDCWindowContentViewController.swift in Sources */,
16671675
DDEDFCF11ED927A4002477C8 /* ToggleFilter.swift in Sources */,
1676+
F4578D592A2659C5005B311A /* LiveStreamOverlay.swift in Sources */,
16681677
DD7F38801EAC15B4002D8C00 /* RxNil.swift in Sources */,
16691678
DDFA10BF1EBEAAAD001DCF66 /* DownloadManager.swift in Sources */,
16701679
DD0159A71ECFE26200F980F1 /* DeepLink.swift in Sources */,
@@ -1715,7 +1724,6 @@
17151724
DD34A79B1EC3CD5900E0B575 /* Constants.swift in Sources */,
17161725
4DA9C4D120EC098800710354 /* DownloadsManagementViewController.swift in Sources */,
17171726
DD90CDCD1ED7A5ED00CADE86 /* SearchCoordinator.swift in Sources */,
1718-
DD71CC2A20BD009500BB5F47 /* AppCoordinator+Featured.swift in Sources */,
17191727
DD9301C01EE3212D00BE724B /* ChromeCastPlaybackProvider.swift in Sources */,
17201728
DDB28F6F1EACFCDB0077703F /* VibrantButton.swift in Sources */,
17211729
4D7482CA20FF735D008D156C /* WWDCWindowController.swift in Sources */,
@@ -1926,7 +1934,6 @@
19261934
/* Begin XCBuildConfiguration section */
19271935
DD36A4B91E478C6A00B2EA88 /* Debug */ = {
19281936
isa = XCBuildConfiguration;
1929-
baseConfigurationReference = F4D0F0382A20162200C74B50 /* Main.xcconfig */;
19301937
baseConfigurationReference = F42472B12A24D6AC00F68237 /* OpenSource.xcconfig */;
19311938
buildSettings = {
19321939
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -1987,7 +1994,6 @@
19871994
};
19881995
DD36A4BA1E478C6A00B2EA88 /* Release */ = {
19891996
isa = XCBuildConfiguration;
1990-
baseConfigurationReference = F4D0F0382A20162200C74B50 /* Main.xcconfig */;
19911997
baseConfigurationReference = F42472B12A24D6AC00F68237 /* OpenSource.xcconfig */;
19921998
buildSettings = {
19931999
ALWAYS_SEARCH_USER_PATHS = NO;

WWDC.xcodeproj/xcshareddata/xcschemes/WWDC_iCloud.xcscheme

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@
151151
</CommandLineArgument>
152152
<CommandLineArgument
153153
argument = "--delorean"
154-
isEnabled = "YES">
154+
isEnabled = "NO">
155155
</CommandLineArgument>
156156
<CommandLineArgument
157-
argument = "2022-06-06T18:00:00+00:00"
158-
isEnabled = "YES">
157+
argument = "2022-06-06T17:10:00+00:00"
158+
isEnabled = "NO">
159159
</CommandLineArgument>
160160
</CommandLineArguments>
161161
</LaunchAction>

WWDC/AppCoordinator+Featured.swift

Lines changed: 0 additions & 20 deletions
This file was deleted.

WWDC/AppCoordinator.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ final class AppCoordinator {
192192
bind(session: selectedSession, to: videosController.detailViewController)
193193

194194
bind(session: selectedScheduleItem, to: scheduleController.splitViewController.detailViewController)
195-
196-
bind(session: exploreTabLiveSession, to: exploreController.liveSessionController)
197195
}
198196

199197
private func updateSelectedViewModelRegardlessOfTab() {
@@ -228,12 +226,6 @@ final class AppCoordinator {
228226
}
229227

230228
private func setupDelegation() {
231-
let exploreLiveDetail = exploreController.liveSessionController
232-
233-
exploreLiveDetail.shelfController.delegate = self
234-
exploreLiveDetail.summaryController.actionsViewController.delegate = self
235-
exploreLiveDetail.summaryController.relatedSessionsViewController.delegate = self
236-
237229
let videoDetail = videosController.detailViewController
238230

239231
videoDetail.shelfController.delegate = self

WWDC/Constants.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,7 @@ struct Constants {
5151
/// How many MINUTES to add to the end time of a live session to consider it not live anymore
5252
static let liveSessionEndTimeTolerance: Int = 30
5353

54+
/// How long before the scheduled start date for a special event the Explore tab will start showing it on the list.
55+
static let exploreTabSpecialEventLiveSoonInterval: TimeInterval = 12 * 60 * 60
56+
5457
}

WWDC/ExploreTabContent.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ extension ExploreTabContent {
9898
fatalError("Missing \(name) development asset")
9999
}
100100
do {
101-
return try JSONDecoder().decode(ExploreTabContent.self, from: data)
101+
let decoder = JSONDecoder()
102+
decoder.dateDecodingStrategy = .iso8601
103+
return try decoder.decode(ExploreTabContent.self, from: data)
102104
} catch {
103105
fatalError("Failed to decode \(name) development asset: \(error)")
104106
}

0 commit comments

Comments
 (0)