make ios detection a bit better, user better naming
This commit is contained in:
1 parent
598ef1a32f
commit
af7aefd85f
1 file changed
+24
-9
+24
-9
@@ -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 (
|
||||
ANDROID_APP_SCHEME +
|
||||
APP_SCHEME +
|
||||
CONFIG.jitsiHost +
|
||||
"/" +
|
||||
encodeURIComponent(room)
|
||||
@@ -513,12 +517,21 @@ function createAndroidAppUrl(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 detectBrowser() === "firefox"
|
||||
? createAndroidAppUrl(room)
|
||||
? createAppSchemeUrl(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 (
|
||||
uaResult.os.name === "macOS" &&
|
||||
navigator.maxTouchPoints > 1
|
||||
navigator.maxTouchPoints > 1 &&
|
||||
(navigator.platform === "MacIntel" || uaResult.os.name === "macOS")
|
||||
) {
|
||||
return OS_NAMES.iOS;
|
||||
}
|
||||
@@ -729,7 +743,7 @@ function launchJitsi() {
|
||||
* das Custom-Schema direkt in der Hauptnavigation starten.
|
||||
*/
|
||||
try {
|
||||
if (protocolUrl.startsWith(ANDROID_APP_SCHEME)) {
|
||||
if (protocolUrl.startsWith(APP_SCHEME)) {
|
||||
window.location.href = protocolUrl;
|
||||
} else {
|
||||
iframe.src = protocolUrl;
|
||||
@@ -1187,6 +1201,7 @@ function initialize() {
|
||||
language: currentLanguage,
|
||||
room: room,
|
||||
operatingSystem: detectOperatingSystem(),
|
||||
touchPoints: navigator.maxTouchPoints,
|
||||
browser: detectBrowser(),
|
||||
protocol: selectProtocolUrl(room),
|
||||
browserUrl: createBrowserUrl(room)
|
||||
|
||||
Reference in new issue
Block a user