Fixed safari for the web client

canary
WolverinDEV 2020-09-07 14:52:30 +02:00 committed by WolverinDEV
parent 9f8c46d6f4
commit 20cbd0be45
7 changed files with 29 additions and 5 deletions

View File

@ -1,4 +1,7 @@
# Changelog:
* **07.09.20**
- Fixed the web client for safari
* **05.09.20**
- Smoother voice playback start (web client only)

5
package-lock.json generated
View File

@ -2749,6 +2749,11 @@
"fill-range": "^7.0.1"
}
},
"broadcastchannel-polyfill": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/broadcastchannel-polyfill/-/broadcastchannel-polyfill-1.0.1.tgz",
"integrity": "sha512-iooPAN913j4xfrIu5o+mDaks9UUDOBfgjn8SsuzysfXr/X+f8m9y5t8c5rAbW6P0LdUXBJx33zwN4Cs6b9BGRw=="
},
"brorand": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",

View File

@ -91,6 +91,7 @@
},
"homepage": "https://www.teaspeak.de",
"dependencies": {
"broadcastchannel-polyfill": "^1.0.1",
"detect-browser": "^5.1.1",
"dompurify": "^2.0.8",
"emoji-mart": "git+https://github.com/WolverinDEV/emoji-mart.git",

View File

@ -181,3 +181,7 @@ iframe {
border-radius: .2em;
border: none;
}
select, input {
-webkit-appearance: none;
}

View File

@ -284,6 +284,9 @@ export function getInstanceConnectHandler() {
}
export function supported() {
/* we've a polyfill now */
return true;
/* ios does not support this */
return typeof(window.BroadcastChannel) !== "undefined";
}

View File

@ -486,11 +486,18 @@ loader.register_task(Stage.LOADED, {
if(Notification.permission === "granted")
return;
Notification.requestPermission().then(result => {
/* yeahr fuck safari */
const promise = Notification.requestPermission(result => {
log.info(LogCategory.GENERAL, tr("Notification permission request (callback) resulted in %s"), result);
})
if(typeof promise !== "undefined" && 'then' in promise) {
promise.then(result => {
log.info(LogCategory.GENERAL, tr("Notification permission request resulted in %s"), result);
}).catch(error => {
log.warn(LogCategory.GENERAL, tr("Failed to execute notification permission request: %O"), error);
});
}
},
name: "Request notifications",
priority: 1

View File

@ -1,4 +1,5 @@
import "webrtc-adapter";
import "broadcastchannel-polyfill";
import "./index.scss";
import "./FileTransfer";