Skip to content

Commit

Permalink
Merge branch 'main' into cecilia/bump-version-to-0.3.41
Browse files Browse the repository at this point in the history
  • Loading branch information
ceciliasaraiva authored Oct 28, 2024
2 parents 058605f + 28342f4 commit 9a03770
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions Sources/Player/Player.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public final class Player {
private var networkMonitor: NetworkMonitor
private var notificationsHandler: NotificationsHandler
private let featureFlagProvider: FeatureFlagProvider
private var registeredPlayers: [GenericMediaPlayer.Type] = []
private var externalPlayersSupplier: (() -> [GenericMediaPlayer.Type])?
private let credentialsProvider: CredentialsProvider

// MARK: - Initialization
Expand All @@ -72,7 +72,7 @@ public final class Player {
playerEngine: PlayerEngine,
offlineEngine: OfflineEngine,
featureFlagProvider: FeatureFlagProvider,
externalPlayers: [GenericMediaPlayer.Type],
externalPlayersSupplier: (() -> [GenericMediaPlayer.Type])?,
credentialsProvider: CredentialsProvider
) {
self.queue = queue
Expand All @@ -88,7 +88,7 @@ public final class Player {
self.playerEngine = playerEngine
self.offlineEngine = offlineEngine
self.featureFlagProvider = featureFlagProvider
registeredPlayers = externalPlayers
self.externalPlayersSupplier = externalPlayersSupplier
self.credentialsProvider = credentialsProvider
}
}
Expand All @@ -113,9 +113,9 @@ public extension Player {
offlineEngineListener: OfflineEngineListener? = nil,
listenerQueue: DispatchQueue = .main,
featureFlagProvider: FeatureFlagProvider = .standard,
externalPlayers: [GenericMediaPlayer.Type] = [],
credentialsProvider: CredentialsProvider,
eventSender: EventSender,
externalPlayersSupplier: (() -> [GenericMediaPlayer.Type])? = nil,
userClientIdSupplier: (() -> Int)? = nil,
shouldAddLogging: Bool = false
) -> Player? {
Expand Down Expand Up @@ -201,7 +201,7 @@ public extension Player {
playerEventSender,
notificationsHandler,
featureFlagProvider,
externalPlayers,
externalPlayersSupplier,
credentialsProvider
)

Expand All @@ -219,7 +219,7 @@ public extension Player {
playerEngine: playerEngine,
offlineEngine: offlineEngine,
featureFlagProvider: featureFlagProvider,
externalPlayers: externalPlayers,
externalPlayersSupplier: externalPlayersSupplier,
credentialsProvider: credentialsProvider
)

Expand Down Expand Up @@ -408,7 +408,7 @@ private extension Player {
playerEventSender,
notificationsHandler,
featureFlagProvider,
registeredPlayers,
externalPlayersSupplier,
credentialsProvider
)
}
Expand All @@ -423,7 +423,7 @@ private extension Player {
_ playerEventSender: PlayerEventSender,
_ notificationsHandler: NotificationsHandler?,
_ featureFlagProvider: FeatureFlagProvider,
_ externalPlayers: [GenericMediaPlayer.Type],
_ externalPlayersSupplier: (() -> [GenericMediaPlayer.Type])? = nil,
_ credentialsProvider: CredentialsProvider
) -> PlayerEngine {
let internalPlayerLoader = InternalPlayerLoader(
Expand All @@ -432,7 +432,7 @@ private extension Player {
featureFlagProvider: featureFlagProvider,
credentialsProvider: credentialsProvider,
mainPlayer: Player.mainPlayerType(featureFlagProvider),
externalPlayers: externalPlayers
externalPlayers: externalPlayersSupplier?() ?? []
)

let playerInstance = PlayerEngine(
Expand Down
2 changes: 1 addition & 1 deletion Tests/PlayerTests/Player/PlayerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ final class PlayerTests: XCTestCase {
playerEngine: playerEngine,
offlineEngine: offlineEngine,
featureFlagProvider: .mock,
externalPlayers: [],
externalPlayersSupplier: nil,
credentialsProvider: CredentialsProviderMock()
)
}
Expand Down

0 comments on commit 9a03770

Please sign in to comment.