Youtube player fixes

This commit is contained in:
Ilya Laktyushin
2020-10-06 09:23:16 +04:00
parent 7fb0b48ded
commit c899d1dfa7
25 changed files with 1301 additions and 1183 deletions

View File

@@ -210,7 +210,9 @@ public func galleryItemForEntry(context: AccountContext, presentationData: Prese
content = SystemVideoContent(url: embedUrl, imageReference: .webPage(webPage: WebpageReference(webpage), media: image), dimensions: webpageContent.embedSize?.cgSize ?? CGSize(width: 640.0, height: 640.0), duration: Int32(webpageContent.duration ?? 0))
}
}
if content == nil, let webEmbedContent = WebEmbedVideoContent(webPage: webpage, webpageContent: webpageContent, forcedTimestamp: timecode.flatMap(Int.init)) {
if content == nil, let webEmbedContent = WebEmbedVideoContent(webPage: webpage, webpageContent: webpageContent, forcedTimestamp: timecode.flatMap(Int.init), openUrl: { url in
performAction(.url(url: url.absoluteString, concealed: false))
}) {
content = webEmbedContent
}
}