PiP and UI improvements

This commit is contained in:
Arkadiusz Fal
2021-10-28 19:14:55 +02:00
parent c387454d9a
commit 24f7c566bf
18 changed files with 169 additions and 55 deletions

View File

@@ -26,7 +26,7 @@ protocol VideosAPI {
func channelPlaylist(_ id: String) -> Resource?
func loadDetails(_ item: PlayerQueueItem, completionHandler: @escaping (PlayerQueueItem) -> Void)
func shareURL(_ item: ContentItem) -> URL
func shareURL(_ item: ContentItem) -> URL?
}
extension VideosAPI {
@@ -48,9 +48,13 @@ extension VideosAPI {
}
}
func shareURL(_ item: ContentItem) -> URL {
func shareURL(_ item: ContentItem) -> URL? {
guard let frontendHost = account.instance.frontendHost else {
return nil
}
var urlComponents = account.instance.urlComponents
urlComponents.host = account.instance.frontendHost
urlComponents.host = frontendHost
switch item.contentType {
case .video: