fix bitrix detection for desktop joiner
This commit is contained in:
1 parent
0878f56c90
commit
c2f0bbca08
3 files changed
+6
-4
No files matched your search
@@ -6,7 +6,7 @@ export const IPC = {
|
|||||||
RUNNING: 'joiner:running',
|
RUNNING: 'joiner:running',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export type JoinerPlatform = 'wbstream' | 'telemost' | 'vk' | 'dion';
|
export type JoinerPlatform = 'wbstream' | 'telemost' | 'vk' | 'dion' | 'bitrix';
|
||||||
|
|
||||||
export interface JoinerSettings {
|
export interface JoinerSettings {
|
||||||
platform: JoinerPlatform;
|
platform: JoinerPlatform;
|
||||||
|
|||||||
@@ -119,10 +119,10 @@ function spawnJoiner(settings: JoinerSettings): { ok: boolean; error?: string }
|
|||||||
if (settings.socksUser) args.push('--socks-user', settings.socksUser);
|
if (settings.socksUser) args.push('--socks-user', settings.socksUser);
|
||||||
if (settings.socksPass) args.push('--socks-pass', settings.socksPass);
|
if (settings.socksPass) args.push('--socks-pass', settings.socksPass);
|
||||||
if (noTun) args.push('--no-tun');
|
if (noTun) args.push('--no-tun');
|
||||||
if (settings.dualTrack && (settings.platform === 'vk' || settings.platform === 'wbstream')) {
|
if (settings.dualTrack && (settings.platform === 'vk' || settings.platform === 'wbstream' || settings.platform === 'bitrix')) {
|
||||||
args.push('--dual-track');
|
args.push('--dual-track');
|
||||||
}
|
}
|
||||||
if (settings.reliable && settings.platform === 'wbstream') {
|
if (settings.reliable && (settings.platform === 'wbstream' || settings.platform === 'bitrix')) {
|
||||||
args.push('--reliable');
|
args.push('--reliable');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
type JoinerPlatform = 'wbstream' | 'telemost' | 'vk' | 'dion';
|
type JoinerPlatform = 'wbstream' | 'telemost' | 'vk' | 'dion' | 'bitrix';
|
||||||
|
|
||||||
function detectPlatform(url: string): JoinerPlatform | null {
|
function detectPlatform(url: string): JoinerPlatform | null {
|
||||||
const u = url.toLowerCase();
|
const u = url.toLowerCase();
|
||||||
@@ -6,6 +6,7 @@ function detectPlatform(url: string): JoinerPlatform | null {
|
|||||||
if (u.includes('wbstream://') || u.includes('stream.wb.ru')) return 'wbstream';
|
if (u.includes('wbstream://') || u.includes('stream.wb.ru')) return 'wbstream';
|
||||||
if (u.includes('telemost.yandex')) return 'telemost';
|
if (u.includes('telemost.yandex')) return 'telemost';
|
||||||
if (u.includes('dion://') || u.includes('dion.vc')) return 'dion';
|
if (u.includes('dion://') || u.includes('dion.vc')) return 'dion';
|
||||||
|
if (u.includes('bitrix24') && u.includes('/video/')) return 'bitrix';
|
||||||
return 'vk';
|
return 'vk';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,6 +16,7 @@ function platformLabel(p: JoinerPlatform | null): string {
|
|||||||
case 'telemost': return 'Telemost';
|
case 'telemost': return 'Telemost';
|
||||||
case 'vk': return 'VK';
|
case 'vk': return 'VK';
|
||||||
case 'dion': return 'DION';
|
case 'dion': return 'DION';
|
||||||
|
case 'bitrix': return 'Bitrix';
|
||||||
default: return '-';
|
default: return '-';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user