make ios detection a bit better, user better naming

This commit is contained in:
stefan.tollkuehn committed 2026-10-07 15:05:42 +02:00
1 parent 598ef1a32f
commit af7aefd85f
1 file changed
+24 -9
+24 -9
View File
@@ -497,11 +497,15 @@ function createAndroidIntentUrl(room) {
); );
} }
const ANDROID_APP_SCHEME = "org.jitsi.meet://"; /*
* Die Mobile-Apps (iOS, Firefox auf Android) registrieren
* "org.jitsi.meet", nicht das Desktop-Schema.
*/
const APP_SCHEME = "org.jitsi.meet://";
function createAndroidAppUrl(room) { function createAppSchemeUrl(room) {
return ( return (
ANDROID_APP_SCHEME + APP_SCHEME +
CONFIG.jitsiHost + CONFIG.jitsiHost +
"/" + "/" +
encodeURIComponent(room) encodeURIComponent(room)
@@ -513,12 +517,21 @@ function createAndroidAppUrl(room) {
* ============================================================ */ * ============================================================ */
function selectProtocolUrl(room) { function selectProtocolUrl(room) {
if (detectOperatingSystem() !== "android") { const os = detectOperatingSystem();
/*
* iOS-App kennt nur das App-Schema.
*/
if (os === "ios") {
return createAppSchemeUrl(room);
}
if (os !== "android") {
return createAppUrl(room); return createAppUrl(room);
} }
return detectBrowser() === "firefox" return detectBrowser() === "firefox"
? createAndroidAppUrl(room) ? createAppSchemeUrl(room)
: createAndroidIntentUrl(room); : createAndroidIntentUrl(room);
} }
@@ -581,11 +594,12 @@ function detectOperatingSystem() {
} }
/* /*
* iPadOS tarnt sich als macOS. * iPadOS tarnt sich als macOS – Touchpunkte verraten das iPad.
* Der Plattform-Check greift auch ohne geladenen ua-parser.
*/ */
if ( if (
uaResult.os.name === "macOS" && navigator.maxTouchPoints > 1 &&
navigator.maxTouchPoints > 1 (navigator.platform === "MacIntel" || uaResult.os.name === "macOS")
) { ) {
return OS_NAMES.iOS; return OS_NAMES.iOS;
} }
@@ -729,7 +743,7 @@ function launchJitsi() {
* das Custom-Schema direkt in der Hauptnavigation starten. * das Custom-Schema direkt in der Hauptnavigation starten.
*/ */
try { try {
if (protocolUrl.startsWith(ANDROID_APP_SCHEME)) { if (protocolUrl.startsWith(APP_SCHEME)) {
window.location.href = protocolUrl; window.location.href = protocolUrl;
} else { } else {
iframe.src = protocolUrl; iframe.src = protocolUrl;
@@ -1187,6 +1201,7 @@ function initialize() {
language: currentLanguage, language: currentLanguage,
room: room, room: room,
operatingSystem: detectOperatingSystem(), operatingSystem: detectOperatingSystem(),
touchPoints: navigator.maxTouchPoints,
browser: detectBrowser(), browser: detectBrowser(),
protocol: selectProtocolUrl(room), protocol: selectProtocolUrl(room),
browserUrl: createBrowserUrl(room) browserUrl: createBrowserUrl(room)