mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
[Videochats] Request thumbnail videos when a video is on stage
This commit is contained in:
parent
f21f7f66f7
commit
1567e6719c
@ -819,13 +819,21 @@ final class VideoChatParticipantsComponent: Component {
|
|||||||
if let members = component.members {
|
if let members = component.members {
|
||||||
for participant in members.participants {
|
for participant in members.participants {
|
||||||
var maxVideoQuality: PresentationGroupCallRequestedVideo.Quality = .medium
|
var maxVideoQuality: PresentationGroupCallRequestedVideo.Quality = .medium
|
||||||
if let expandedVideoState = component.expandedVideoState, expandedVideoState.mainParticipant.id == participant.peer.id, !expandedVideoState.mainParticipant.isPresentation {
|
if let expandedVideoState = component.expandedVideoState {
|
||||||
maxVideoQuality = .full
|
if expandedVideoState.mainParticipant.id == participant.peer.id, !expandedVideoState.mainParticipant.isPresentation {
|
||||||
|
maxVideoQuality = .full
|
||||||
|
} else {
|
||||||
|
maxVideoQuality = .thumbnail
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var maxPresentationQuality: PresentationGroupCallRequestedVideo.Quality = .medium
|
var maxPresentationQuality: PresentationGroupCallRequestedVideo.Quality = .medium
|
||||||
if let expandedVideoState = component.expandedVideoState, expandedVideoState.mainParticipant.id == participant.peer.id, expandedVideoState.mainParticipant.isPresentation {
|
if let expandedVideoState = component.expandedVideoState {
|
||||||
maxPresentationQuality = .full
|
if expandedVideoState.mainParticipant.id == participant.peer.id, expandedVideoState.mainParticipant.isPresentation {
|
||||||
|
maxPresentationQuality = .full
|
||||||
|
} else {
|
||||||
|
maxPresentationQuality = .thumbnail
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let videoChannel = participant.requestedVideoChannel(minQuality: .thumbnail, maxQuality: maxVideoQuality) {
|
if let videoChannel = participant.requestedVideoChannel(minQuality: .thumbnail, maxQuality: maxVideoQuality) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user