mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[WIP] Dynamic video streaming
This commit is contained in:
@@ -22,7 +22,8 @@ private func generateStarsReactionFile(kind: Int, isAnimatedSticker: Bool) -> Te
|
||||
immediateThumbnailData: nil,
|
||||
mimeType: isAnimatedSticker ? "application/x-tgsticker" : "image/webp",
|
||||
size: nil,
|
||||
attributes: attributes
|
||||
attributes: attributes,
|
||||
alternativeRepresentations: []
|
||||
)
|
||||
}
|
||||
|
||||
@@ -261,23 +262,23 @@ private extension AvailableReactions.Reaction {
|
||||
convenience init?(apiReaction: Api.AvailableReaction) {
|
||||
switch apiReaction {
|
||||
case let .availableReaction(flags, reaction, title, staticIcon, appearAnimation, selectAnimation, activateAnimation, effectAnimation, aroundAnimation, centerIcon):
|
||||
guard let staticIconFile = telegramMediaFileFromApiDocument(staticIcon) else {
|
||||
guard let staticIconFile = telegramMediaFileFromApiDocument(staticIcon, altDocuments: []) else {
|
||||
return nil
|
||||
}
|
||||
guard let appearAnimationFile = telegramMediaFileFromApiDocument(appearAnimation) else {
|
||||
guard let appearAnimationFile = telegramMediaFileFromApiDocument(appearAnimation, altDocuments: []) else {
|
||||
return nil
|
||||
}
|
||||
guard let selectAnimationFile = telegramMediaFileFromApiDocument(selectAnimation) else {
|
||||
guard let selectAnimationFile = telegramMediaFileFromApiDocument(selectAnimation, altDocuments: []) else {
|
||||
return nil
|
||||
}
|
||||
guard let activateAnimationFile = telegramMediaFileFromApiDocument(activateAnimation) else {
|
||||
guard let activateAnimationFile = telegramMediaFileFromApiDocument(activateAnimation, altDocuments: []) else {
|
||||
return nil
|
||||
}
|
||||
guard let effectAnimationFile = telegramMediaFileFromApiDocument(effectAnimation) else {
|
||||
guard let effectAnimationFile = telegramMediaFileFromApiDocument(effectAnimation, altDocuments: []) else {
|
||||
return nil
|
||||
}
|
||||
let aroundAnimationFile = aroundAnimation.flatMap { telegramMediaFileFromApiDocument($0) }
|
||||
let centerAnimationFile = centerIcon.flatMap { telegramMediaFileFromApiDocument($0) }
|
||||
let aroundAnimationFile = aroundAnimation.flatMap { telegramMediaFileFromApiDocument($0, altDocuments: []) }
|
||||
let centerAnimationFile = centerIcon.flatMap { telegramMediaFileFromApiDocument($0, altDocuments: []) }
|
||||
let isEnabled = (flags & (1 << 0)) == 0
|
||||
let isPremium = (flags & (1 << 2)) != 0
|
||||
self.init(
|
||||
|
||||
Reference in New Issue
Block a user