diff --git a/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift b/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift index 868c4d27c3..2537e21ede 100644 --- a/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift +++ b/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift @@ -2489,7 +2489,15 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode { self.context.sharedContext.mediaManager.setOverlayVideoNode(nil) } else { - let scrubberTransition = (node.0 as? GalleryItemTransitionNode)?.scrubberTransition() + var scrubberTransition = (node.0 as? GalleryItemTransitionNode)?.scrubberTransition() + + if let data = self.context.currentAppConfiguration.with({ $0 }).data { + if let value = data["ios_gallery_scrubber_transition"] as? Double { + if value == 0.0 { + scrubberTransition = nil + } + } + } if let scrubberView = self.scrubberView { scrubberView.animateIn(from: scrubberTransition, transition: .animated(duration: 0.25, curve: .spring)) @@ -2633,7 +2641,14 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode { return } - let scrubberTransition = (node.0 as? GalleryItemTransitionNode)?.scrubberTransition() + var scrubberTransition = (node.0 as? GalleryItemTransitionNode)?.scrubberTransition() + if let data = self.context.currentAppConfiguration.with({ $0 }).data { + if let value = data["ios_gallery_scrubber_transition"] as? Double { + if value == 0.0 { + scrubberTransition = nil + } + } + } if let scrubberView = self.scrubberView { var scrubberEffectiveTransition = scrubberTransition diff --git a/submodules/TelegramCallsUI/Sources/PresentationCall.swift b/submodules/TelegramCallsUI/Sources/PresentationCall.swift index dccc63d629..c06fdd894f 100644 --- a/submodules/TelegramCallsUI/Sources/PresentationCall.swift +++ b/submodules/TelegramCallsUI/Sources/PresentationCall.swift @@ -399,8 +399,10 @@ public final class PresentationCallImpl: PresentationCall { if let data = context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_call_device"] { self.sharedAudioContext = nil - } else { + } else if context.sharedContext.immediateExperimentalUISettings.conferenceCalls { self.sharedAudioContext = SharedCallAudioContext(audioSession: audioSession, callKitIntegration: callKitIntegration) + } else { + self.sharedAudioContext = nil } if let _ = self.sharedAudioContext { diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift index 134ff0cb0f..60658434bb 100644 --- a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift +++ b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift @@ -7142,13 +7142,7 @@ public func shouldUseV2VideoChatImpl(context: AccountContext) -> Bool { } public func makeVoiceChatControllerInitialData(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall) -> Signal { - let useV2 = shouldUseV2VideoChatImpl(context: accountContext) - - if useV2 { - return VideoChatScreenV2Impl.initialData(call: call) |> map { $0 as Any } - } else { - return .single(Void()) - } + return VideoChatScreenV2Impl.initialData(call: call) |> map { $0 as Any } } public func makeVoiceChatController(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall, initialData: Any, sourceCallController: CallController?) -> VoiceChatController { diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Calls/GroupCalls.swift b/submodules/TelegramCore/Sources/TelegramEngine/Calls/GroupCalls.swift index 9001c25b2d..1b18b6615a 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Calls/GroupCalls.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Calls/GroupCalls.swift @@ -1260,11 +1260,12 @@ public final class GroupCallParticipantsContext { sortAgain = true } - if let hasLocalVideoPeerId = state.overlayState.hasLocalVideo, hasLocalVideoPeerId == publicState.participants[i].peer.id { + //TODO:wip-release + /*if let hasLocalVideoPeerId = state.overlayState.hasLocalVideo, hasLocalVideoPeerId == publicState.participants[i].peer.id { if publicState.participants[i].videoDescription == nil { publicState.participants[i].videoDescription = GroupCallParticipantsContext.Participant.VideoDescription(endpointId: "_local", ssrcGroups: [], audioSsrc: nil, isPaused: false) } - } + }*/ } if sortAgain { publicState.participants.sort(by: { GroupCallParticipantsContext.Participant.compare(lhs: $0, rhs: $1, sortAscending: publicState.sortAscending) }) @@ -1954,9 +1955,10 @@ public final class GroupCallParticipantsContext { self.localIsVideoPaused = isVideoPaused self.localIsPresentationPaused = isPresentationPaused - if let isVideoMuted { + //TODO:wip-release + /*if let isVideoMuted { self.stateValue.overlayState.hasLocalVideo = isVideoMuted ? nil : peerId - } + }*/ let disposable = MetaDisposable() diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveMediaNode/Sources/ChatMessageInteractiveMediaNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveMediaNode/Sources/ChatMessageInteractiveMediaNode.swift index dcb76a1996..c705d9fa6c 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveMediaNode/Sources/ChatMessageInteractiveMediaNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveMediaNode/Sources/ChatMessageInteractiveMediaNode.swift @@ -868,12 +868,27 @@ public final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTr let _ = peerType var useInlineHLS = true + var displayInlineScrubber = true + var startFromSavedPosition = true if let data = context.currentAppConfiguration.with({ $0 }).data { if let value = data["ios_inline_hls_v2"] as? Double { useInlineHLS = value != 0.0 } + if let value = data["ios_inline_scrubber"] as? Double { + displayInlineScrubber = value != 0.0 + } + if let value = data["ios_inline_continue"] as? Double { + startFromSavedPosition = value != 0.0 + } } + /*#if DEBUG + if "".isEmpty { + displayInlineScrubber = false + startFromSavedPosition = false + } + #endif*/ + var nativeSize: CGSize let isSecretMedia = message.containsSecretMedia @@ -1940,7 +1955,7 @@ public final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTr if let strongSelf = self { if firstTime { firstTime = false - if let videoTimestamp { + if startFromSavedPosition, let videoTimestamp { videoNode.seek(Double(videoTimestamp)) } } @@ -2028,7 +2043,7 @@ public final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTr } } - if let videoTimestamp, let file = media as? TelegramMediaFile, let duration = file.duration, duration > 1.0 { + if displayInlineScrubber, let videoTimestamp, let file = media as? TelegramMediaFile, let duration = file.duration, duration > 1.0 { let timestampContainerView: UIView if let current = strongSelf.timestampContainerView { timestampContainerView = current diff --git a/submodules/TelegramUI/Sources/AppDelegate.swift b/submodules/TelegramUI/Sources/AppDelegate.swift index 5c6b2df2fa..68d2ffec7e 100644 --- a/submodules/TelegramUI/Sources/AppDelegate.swift +++ b/submodules/TelegramUI/Sources/AppDelegate.swift @@ -2752,7 +2752,7 @@ private func extractAccountManagerState(records: AccountRecordsView