mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Initial functionality of player items queue
Fix environment objects Hide video player placeholder on tvOS Queue improvements
This commit is contained in:
@@ -7,11 +7,11 @@ struct FixtureEnvironmentObjectsModifier: ViewModifier {
|
||||
.environmentObject(InstancesModel())
|
||||
.environmentObject(api)
|
||||
.environmentObject(NavigationModel())
|
||||
.environmentObject(PlaybackModel())
|
||||
.environmentObject(player)
|
||||
.environmentObject(PlaylistsModel())
|
||||
.environmentObject(RecentsModel())
|
||||
.environmentObject(SearchModel())
|
||||
.environmentObject(SubscriptionsModel(api: api))
|
||||
.environmentObject(subscriptions)
|
||||
}
|
||||
|
||||
private var api: InvidiousAPI {
|
||||
@@ -22,6 +22,24 @@ struct FixtureEnvironmentObjectsModifier: ViewModifier {
|
||||
|
||||
return api
|
||||
}
|
||||
|
||||
private var player: PlayerModel {
|
||||
let player = PlayerModel()
|
||||
|
||||
player.currentItem = PlayerQueueItem(Video.fixture)
|
||||
player.queue = Video.allFixtures.map { PlayerQueueItem($0) }
|
||||
player.history = player.queue
|
||||
|
||||
return player
|
||||
}
|
||||
|
||||
private var subscriptions: SubscriptionsModel {
|
||||
let subscriptions = SubscriptionsModel()
|
||||
|
||||
subscriptions.channels = Video.allFixtures.map { $0.channel }
|
||||
|
||||
return subscriptions
|
||||
}
|
||||
}
|
||||
|
||||
extension View {
|
||||
|
Reference in New Issue
Block a user