mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Initial functionality of player items queue
Fix environment objects Hide video player placeholder on tvOS Queue improvements
This commit is contained in:
@@ -5,7 +5,7 @@ extension Video {
|
||||
let id = "D2sxamzaHkM"
|
||||
|
||||
return Video(
|
||||
id: UUID().uuidString,
|
||||
videoID: UUID().uuidString,
|
||||
title: "Relaxing Piano Music that will make you feel amazingly good",
|
||||
author: "Fancy Videotuber",
|
||||
length: 582,
|
||||
|
@@ -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