mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various improvements
This commit is contained in:
@@ -38,6 +38,8 @@ public enum WebEmbedType {
|
||||
public func webEmbedType(content: TelegramMediaWebpageLoadedContent, forcedTimestamp: Int? = nil) -> WebEmbedType {
|
||||
if let (videoId, timestamp) = extractYoutubeVideoIdAndTimestamp(url: content.url) {
|
||||
return .youtube(videoId: videoId, timestamp: forcedTimestamp ?? timestamp)
|
||||
} else if let embedUrl = content.embedUrl, let (videoId, timestamp) = extractYoutubeVideoIdAndTimestamp(url: embedUrl) {
|
||||
return .youtube(videoId: videoId, timestamp: forcedTimestamp ?? timestamp)
|
||||
} else if let (videoId, timestamp) = extractVimeoVideoIdAndTimestamp(url: content.url) {
|
||||
return .vimeo(videoId: videoId, timestamp: forcedTimestamp ?? timestamp)
|
||||
} else if let embedUrl = content.embedUrl, isTwitchVideoUrl(embedUrl) && false {
|
||||
|
||||
Reference in New Issue
Block a user