feat: мультиплексирование звонков (#21)
This commit is contained in:
17 files changed
+1178
-48
No files matched your search
@@ -40,7 +40,7 @@ func (c *Client) getTokenChain(ctx context.Context, link string, streamID int, c
|
||||
// Шаг 1a: прогрев getCallPreview (не критично).
|
||||
previewData := fmt.Sprintf("vk_join_link=https://vk.ru/call/join/%s&fields=photo_200&access_token=%s", link, token1)
|
||||
if _, prevErr := c.doRequest(ctx, httpClient, profile, previewData,
|
||||
"https://api.vk.ru/method/calls.getCallPreview?v=5.275&client_id="+creds.ClientID); prevErr != nil {
|
||||
"https://api.vk.ru/method/calls.getCallPreview?v=5.274&client_id="+creds.ClientID); prevErr != nil {
|
||||
c.log.Warnf("[STREAM %d] [VK Auth] getCallPreview failed: %v", streamID, prevErr)
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ func (c *Client) fetchCallToken(
|
||||
link, escapedName, token1 string,
|
||||
creds VKCredentials,
|
||||
) (string, error) {
|
||||
urlAddr := fmt.Sprintf("https://api.vk.ru/method/calls.getAnonymousToken?v=5.275&client_id=%s", creds.ClientID)
|
||||
urlAddr := fmt.Sprintf("https://api.vk.ru/method/calls.getAnonymousToken?v=5.274&client_id=%s", creds.ClientID)
|
||||
data := fmt.Sprintf("vk_join_link=https://vk.ru/call/join/%s&name=%s&access_token=%s",
|
||||
link, escapedName, token1)
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@ var DefaultCredentials = []VKCredentials{
|
||||
{ClientID: "52461373", ClientSecret: "o557NLIkAErNhakXrQ7A"}, // VK_WEB_VKVIDEO_APP_ID
|
||||
{ClientID: "52649896", ClientSecret: "WStp4ihWG4l3nmXZgIbC"}, // VK_MVK_VKVIDEO_APP_ID
|
||||
{ClientID: "51781872", ClientSecret: "IjjCNl4L4Tf5QZEXIHKK"}, // VK_ID_AUTH_APP
|
||||
{ClientID: "2274003", ClientSecret: "hHbZxrka2uZ6jB1inYsH"}, // VK_ANDROID_APP (danyadev/vk-desktop)
|
||||
{ClientID: "6717234", ClientSecret: "KoSS8uGa3RrU081ucgvO"}, // VK_INTERNAL_APP (danyadev/vk-desktop)
|
||||
{ClientID: "51453752", ClientSecret: "4UyuCUsdK8pVCNoeQuGi"}, // VK_MESSENGER_DESKTOP (danyadev/vk-desktop)
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
Reference in new issue
Block a user