mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
UI improvements, player state refactor
This commit is contained in:
40
Fixtures/Video+Fixtures.swift
Normal file
40
Fixtures/Video+Fixtures.swift
Normal file
@@ -0,0 +1,40 @@
|
||||
extension Video {
|
||||
static var fixture: Video {
|
||||
let id = "D2sxamzaHkM"
|
||||
|
||||
return Video(
|
||||
id: id,
|
||||
title: "Relaxing Piano Music",
|
||||
author: "Fancy Videotuber",
|
||||
length: 582,
|
||||
published: "7 years ago",
|
||||
views: 1024,
|
||||
channelID: "AbCdEFgHI",
|
||||
description: "Some relaxing live piano music",
|
||||
genre: "Music",
|
||||
thumbnails: Thumbnail.fixturesForAllQualities(videoId: id),
|
||||
live: false,
|
||||
upcoming: false
|
||||
)
|
||||
}
|
||||
|
||||
static var fixtureLiveWithoutPublishedOrViews: Video {
|
||||
var video = fixture
|
||||
|
||||
video.title = "\(video.title) \(video.title) \(video.title) \(video.title) \(video.title)"
|
||||
video.published = "0 seconds ago"
|
||||
video.views = 0
|
||||
video.live = true
|
||||
|
||||
return video
|
||||
}
|
||||
|
||||
static var fixtureUpcomingWithoutPublishedOrViews: Video {
|
||||
var video = fixtureLiveWithoutPublishedOrViews
|
||||
|
||||
video.live = false
|
||||
video.upcoming = true
|
||||
|
||||
return video
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user