Skip to content

Commit

Permalink
feature: remove everything live
Browse files Browse the repository at this point in the history
  • Loading branch information
sifferhans committed Dec 17, 2024
1 parent d4340a9 commit 5c98241
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 180 deletions.
34 changes: 9 additions & 25 deletions BCC Media tvOS/BCC Media tvOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@
09055A2C2B57FC540019FB9A /* EpisodeViewer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 090559FF2B57FC540019FB9A /* EpisodeViewer.swift */; };
09055A2D2B57FC540019FB9A /* CalendarDay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A002B57FC540019FB9A /* CalendarDay.swift */; };
09055A2E2B57FC540019FB9A /* LockView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A012B57FC540019FB9A /* LockView.swift */; };
09055A2F2B57FC540019FB9A /* LivePlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A032B57FC540019FB9A /* LivePlayer.swift */; };
09055A312B57FC540019FB9A /* PlayerListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A062B57FC540019FB9A /* PlayerListener.swift */; };
09055A332B57FC540019FB9A /* PlayerOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A082B57FC540019FB9A /* PlayerOptions.swift */; };
09055A342B57FC540019FB9A /* PlayerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A092B57FC540019FB9A /* PlayerExtensions.swift */; };
09055A352B57FC540019FB9A /* AboutUs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A0B2B57FC540019FB9A /* AboutUs.swift */; };
09055A362B57FC540019FB9A /* FrontPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A0C2B57FC540019FB9A /* FrontPage.swift */; };
09055A372B57FC540019FB9A /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A0D2B57FC540019FB9A /* Settings.swift */; };
09055A382B57FC540019FB9A /* SignIn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A0E2B57FC540019FB9A /* SignIn.swift */; };
09055A392B57FC540019FB9A /* Live.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A0F2B57FC540019FB9A /* Live.swift */; };
09055A3A2B57FC540019FB9A /* Search.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A102B57FC540019FB9A /* Search.swift */; };
09055A3C2B57FD450019FB9A /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A3B2B57FD450019FB9A /* Utils.swift */; };
09055A4F2B57FF550019FB9A /* AppOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09055A482B57FF550019FB9A /* AppOptions.swift */; };
Expand Down Expand Up @@ -132,15 +130,13 @@
090559FF2B57FC540019FB9A /* EpisodeViewer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EpisodeViewer.swift; sourceTree = "<group>"; };
09055A002B57FC540019FB9A /* CalendarDay.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalendarDay.swift; sourceTree = "<group>"; };
09055A012B57FC540019FB9A /* LockView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LockView.swift; sourceTree = "<group>"; };
09055A032B57FC540019FB9A /* LivePlayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LivePlayer.swift; sourceTree = "<group>"; };
09055A062B57FC540019FB9A /* PlayerListener.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayerListener.swift; sourceTree = "<group>"; };
09055A082B57FC540019FB9A /* PlayerOptions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayerOptions.swift; sourceTree = "<group>"; };
09055A092B57FC540019FB9A /* PlayerExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayerExtensions.swift; sourceTree = "<group>"; };
09055A0B2B57FC540019FB9A /* AboutUs.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutUs.swift; sourceTree = "<group>"; };
09055A0C2B57FC540019FB9A /* FrontPage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FrontPage.swift; sourceTree = "<group>"; };
09055A0D2B57FC540019FB9A /* Settings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Settings.swift; sourceTree = "<group>"; };
09055A0E2B57FC540019FB9A /* SignIn.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignIn.swift; sourceTree = "<group>"; };
09055A0F2B57FC540019FB9A /* Live.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Live.swift; sourceTree = "<group>"; };
09055A102B57FC540019FB9A /* Search.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Search.swift; sourceTree = "<group>"; };
09055A3B2B57FD450019FB9A /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = "<group>"; };
09055A482B57FF550019FB9A /* AppOptions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppOptions.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -261,7 +257,6 @@
090559EC2B57FC540019FB9A /* Sections */,
090559FD2B57FC540019FB9A /* Episodes */,
090559F92B57FC540019FB9A /* Page */,
09055A022B57FC540019FB9A /* Live */,
09055A042B57FC540019FB9A /* Player */,
090559FC2B57FC540019FB9A /* ItemImage.swift */,
09055A002B57FC540019FB9A /* CalendarDay.swift */,
Expand Down Expand Up @@ -307,14 +302,6 @@
path = Episodes;
sourceTree = "<group>";
};
09055A022B57FC540019FB9A /* Live */ = {
isa = PBXGroup;
children = (
09055A032B57FC540019FB9A /* LivePlayer.swift */,
);
path = Live;
sourceTree = "<group>";
};
09055A042B57FC540019FB9A /* Player */ = {
isa = PBXGroup;
children = (
Expand All @@ -333,7 +320,6 @@
09055A0C2B57FC540019FB9A /* FrontPage.swift */,
09055A0D2B57FC540019FB9A /* Settings.swift */,
09055A0E2B57FC540019FB9A /* SignIn.swift */,
09055A0F2B57FC540019FB9A /* Live.swift */,
09055A102B57FC540019FB9A /* Search.swift */,
);
path = Views;
Expand Down Expand Up @@ -470,11 +456,11 @@
mainGroup = 090559902B57F22F0019FB9A;
packageReferences = (
090559B02B57FB560019FB9A /* XCRemoteSwiftPackageReference "apollo-ios" */,
090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0.swift" */,
090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0" */,
09055A5E2B5807920019FB9A /* XCRemoteSwiftPackageReference "plugin-ios" */,
09055A702B594E6B0019FB9A /* XCLocalSwiftPackageReference "API" */,
09055A732B594E740019FB9A /* XCLocalSwiftPackageReference "Authentication" */,
09055A762B594E7F0019FB9A /* XCLocalSwiftPackageReference "FeatureFlags" */,
09055A702B594E6B0019FB9A /* XCLocalSwiftPackageReference "../API" */,
09055A732B594E740019FB9A /* XCLocalSwiftPackageReference "../Authentication" */,
09055A762B594E7F0019FB9A /* XCLocalSwiftPackageReference "../FeatureFlags" */,
09DDD6C52B6BB05000E56631 /* XCRemoteSwiftPackageReference "rudder-sdk-ios" */,
817A8CE72C05BCA300E48E23 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
81480B342C3C0CCE0023D5B2 /* XCRemoteSwiftPackageReference "plugin-ios" */,
Expand Down Expand Up @@ -554,8 +540,6 @@
09055A362B57FC540019FB9A /* FrontPage.swift in Sources */,
09055A252B57FC540019FB9A /* PosterGridSection.swift in Sources */,
09055A222B57FC540019FB9A /* SectionItem.swift in Sources */,
09055A392B57FC540019FB9A /* Live.swift in Sources */,
09055A2F2B57FC540019FB9A /* LivePlayer.swift in Sources */,
09055A382B57FC540019FB9A /* SignIn.swift in Sources */,
0905599D2B57F22F0019FB9A /* BCC_Media_tvOSApp.swift in Sources */,
09055A232B57FC540019FB9A /* ProgressBar.swift in Sources */,
Expand Down Expand Up @@ -890,15 +874,15 @@
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
09055A702B594E6B0019FB9A /* XCLocalSwiftPackageReference "API" */ = {
09055A702B594E6B0019FB9A /* XCLocalSwiftPackageReference "../API" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../API;
};
09055A732B594E740019FB9A /* XCLocalSwiftPackageReference "Authentication" */ = {
09055A732B594E740019FB9A /* XCLocalSwiftPackageReference "../Authentication" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../Authentication;
};
09055A762B594E7F0019FB9A /* XCLocalSwiftPackageReference "FeatureFlags" */ = {
09055A762B594E7F0019FB9A /* XCLocalSwiftPackageReference "../FeatureFlags" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../FeatureFlags;
};
Expand All @@ -913,7 +897,7 @@
minimumVersion = 1.8.0;
};
};
090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0.swift" */ = {
090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/auth0/Auth0.swift";
requirement = {
Expand Down Expand Up @@ -975,7 +959,7 @@
};
090559BE2B57FB600019FB9A /* Auth0 */ = {
isa = XCSwiftPackageProductDependency;
package = 090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0.swift" */;
package = 090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0" */;
productName = Auth0;
};
09055A5F2B5807920019FB9A /* NpawPlugin */ = {
Expand Down
1 change: 0 additions & 1 deletion BCC Media tvOS/Components/Episodes/EpisodePlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ struct EpisodePlayer: View {
startFrom: progress ? q.episode.progress ?? 0 : 0,
audioLanguage: AppOptions.audioLanguage,
subtitleLanguage: AppOptions.subtitleLanguage,
isLive: false,
content: .init(
title: episode.originalTitle,
id: episode.id,
Expand Down
66 changes: 0 additions & 66 deletions BCC Media tvOS/Components/Live/LivePlayer.swift

This file was deleted.

5 changes: 0 additions & 5 deletions BCC Media tvOS/Components/Player/PlayerOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ struct PlayerOptions {
var audioLanguage: String?
var subtitleLanguage: String?

var isLive: Bool

var content: Content
struct Content {
var title: String?
Expand All @@ -30,7 +28,6 @@ struct PlayerOptions {
startFrom: Int = 0,
audioLanguage: String? = nil,
subtitleLanguage: String? = nil,
isLive: Bool = false,
content: Content = .init()
) {
self.title = title
Expand All @@ -39,8 +36,6 @@ struct PlayerOptions {
self.subtitleLanguage = subtitleLanguage ?? AppOptions.standard.subtitleLanguage
self.audioLanguage = audioLanguage ?? AppOptions.standard.audioLanguage

self.isLive = isLive

self.content = content
}
}
1 change: 0 additions & 1 deletion BCC Media tvOS/Components/Player/VideoPlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ class PlayerControls: ObservableObject {

let c = options.content
videoOptions.contentId = c.id
videoOptions.live = options.isLive as NSNumber
videoOptions.contentTitle = c.title
videoOptions.contentTvShow = c.showId
videoOptions.contentSeason = c.seasonId
Expand Down
19 changes: 1 addition & 18 deletions BCC Media tvOS/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,20 @@ var cardActiveBackgroundColor: Color {
}

enum StaticDestination: Hashable {
case live
case aboutUs
case signIn
}

enum TabType: Hashable {
case pages
case live
case search
case settings
}

typealias PlayCallback = (Bool, API.GetEpisodeQuery.Data.Episode) async -> Void

class Flags: ObservableObject {
@Published var removeLiveTab = true
@Published var forceBccLive = true

func load() {
removeLiveTab = FeatureFlags.has("remove-live-tab")
forceBccLive = FeatureFlags.has("force-bcc-live")
}
func load() {}
}

struct ContentView: View {
Expand Down Expand Up @@ -303,13 +295,6 @@ struct ContentView: View {
.tabItem {
Label("tab_home", systemImage: "house.fill").font(.barlow)
}.tag(TabType.pages)
if !flags.removeLiveTab && authenticated && bccMember {
LiveView {
path.append(StaticDestination.live)
}.tabItem {
Label("tab_live", systemImage: "video").font(.barlow)
}.tag(TabType.live)
}
SearchView(
queryString: $searchQuery,
clickItem: clickItem,
Expand Down Expand Up @@ -377,8 +362,6 @@ struct ContentView: View {
}
.navigationDestination(for: StaticDestination.self) { dest in
switch dest {
case .live:
LivePlayer()
case .aboutUs:
AboutUsView()
default:
Expand Down
4 changes: 1 addition & 3 deletions BCC Media tvOS/Utils/Events.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,15 @@ struct ApplicationOpened: Event {

class VideoEvent {
var sessionId: String
var livestream: Bool
var contentPodId: String
var position: Int?
var totalLength: Int
var videoPlayer = "AVPlayer"
var fullScreen = true
var hasVideo = true

init(sessionId: String, livestream: Bool, contentPodId: String, position: Int? = nil, totalLength: Int, videoPlayer: String = "AVPlayer", fullScreen: Bool = true, hasVideo: Bool = true) {
init(sessionId: String, contentPodId: String, position: Int? = nil, totalLength: Int, videoPlayer: String = "AVPlayer", fullScreen: Bool = true, hasVideo: Bool = true) {
self.sessionId = sessionId
self.livestream = livestream
self.contentPodId = contentPodId
self.position = position
self.totalLength = totalLength
Expand Down
61 changes: 0 additions & 61 deletions BCC Media tvOS/Views/Live.swift

This file was deleted.

0 comments on commit 5c98241

Please sign in to comment.