Update API scheme.

This commit is contained in:
John Preston 2020-11-28 09:38:55 +03:00
parent eb40edae22
commit c8dd486410
4 changed files with 14 additions and 3 deletions

View File

@ -1191,7 +1191,7 @@ inputGroupCall#d8aa840f id:long access_hash:long = InputGroupCall;
groupCallParticipant#56b087c9 flags:# muted:flags.0?true left:flags.1?true can_self_unmute:flags.2?true user_id:int date:int active_date:flags.3?int source:int = GroupCallParticipant; groupCallParticipant#56b087c9 flags:# muted:flags.0?true left:flags.1?true can_self_unmute:flags.2?true user_id:int date:int active_date:flags.3?int source:int = GroupCallParticipant;
phone.groupCall#985c2087 call:GroupCall sources:Vector<int> participants:Vector<GroupCallParticipant> participants_next_offset:string users:Vector<User> = phone.GroupCall; phone.groupCall#66ab0bfc call:GroupCall participants:Vector<GroupCallParticipant> participants_next_offset:string users:Vector<User> = phone.GroupCall;
phone.groupParticipants#9cfeb92d count:int participants:Vector<GroupCallParticipant> next_offset:string users:Vector<User> version:int = phone.GroupParticipants; phone.groupParticipants#9cfeb92d count:int participants:Vector<GroupCallParticipant> next_offset:string users:Vector<User> version:int = phone.GroupParticipants;
@ -1557,7 +1557,7 @@ phone.inviteToGroupCall#7b393160 call:InputGroupCall users:Vector<InputUser> = U
phone.discardGroupCall#7a777135 call:InputGroupCall = Updates; phone.discardGroupCall#7a777135 call:InputGroupCall = Updates;
phone.toggleGroupCallSettings#74bbb43d flags:# call:InputGroupCall join_muted:flags.0?Bool = Updates; phone.toggleGroupCallSettings#74bbb43d flags:# call:InputGroupCall join_muted:flags.0?Bool = Updates;
phone.getGroupCall#c7cb017 call:InputGroupCall = phone.GroupCall; phone.getGroupCall#c7cb017 call:InputGroupCall = phone.GroupCall;
phone.getGroupParticipants#ae1910a4 call:InputGroupCall offset:string limit:int = phone.GroupParticipants; phone.getGroupParticipants#c9f1d285 call:InputGroupCall ids:Vector<int> sources:Vector<int> offset:string limit:int = phone.GroupParticipants;
phone.checkGroupCall#b74a7bea call:InputGroupCall source:int = Bool; phone.checkGroupCall#b74a7bea call:InputGroupCall source:int = Bool;
langpack.getLangPack#f2f2330a lang_pack:string lang_code:string = LangPackDifference; langpack.getLangPack#f2f2330a lang_pack:string lang_code:string = LangPackDifference;

View File

@ -351,7 +351,8 @@ void GroupCall::createAndStartController() {
}, },
.audioLevelsUpdated = [=](const AudioLevels &data) { .audioLevelsUpdated = [=](const AudioLevels &data) {
}, },
.myAudioLevelUpdated = [=](float) { .myAudioLevelUpdated = [=](float level) {
crl::on_main(weak, [=] { myLevelUpdated(level); });
}, },
.initialInputDeviceId = settings.callInputDeviceId().toStdString(), .initialInputDeviceId = settings.callInputDeviceId().toStdString(),
.initialOutputDeviceId = settings.callOutputDeviceId().toStdString(), .initialOutputDeviceId = settings.callOutputDeviceId().toStdString(),
@ -387,6 +388,12 @@ void GroupCall::createAndStartController() {
//raw->setAudioOutputDuckingEnabled(settings.callAudioDuckingEnabled()); //raw->setAudioOutputDuckingEnabled(settings.callAudioDuckingEnabled());
} }
void GroupCall::myLevelUpdated(float level) {
if (level > 0.) {
}
}
void GroupCall::sendMutedUpdate() { void GroupCall::sendMutedUpdate() {
_api.request(_updateMuteRequestId).cancel(); _api.request(_updateMuteRequestId).cancel();
_updateMuteRequestId = _api.request(MTPphone_EditGroupCallMember( _updateMuteRequestId = _api.request(MTPphone_EditGroupCallMember(

View File

@ -104,6 +104,8 @@ private:
void applySelfInCallLocally(); void applySelfInCallLocally();
void rejoin(); void rejoin();
void myLevelUpdated(float level);
[[nodiscard]] MTPInputGroupCall inputCall() const; [[nodiscard]] MTPInputGroupCall inputCall() const;
const not_null<Delegate*> _delegate; const not_null<Delegate*> _delegate;

View File

@ -63,6 +63,8 @@ void GroupCall::requestParticipants() {
auto &api = _channel->session().api(); auto &api = _channel->session().api();
_participantsRequestId = api.request(MTPphone_GetGroupParticipants( _participantsRequestId = api.request(MTPphone_GetGroupParticipants(
input(), input(),
MTP_vector<MTPint>(), // ids
MTP_vector<MTPint>(), // sources
MTP_string(_nextOffset), MTP_string(_nextOffset),
MTP_int(kRequestPerPage) MTP_int(kRequestPerPage)
)).done([=](const MTPphone_GroupParticipants &result) { )).done([=](const MTPphone_GroupParticipants &result) {